OHDSI Home | Forums | Wiki | Github

Have Some Problmes About Atlas

Hello all
I am a students at NANJING MEDICAL UNIVERSITY in China and doing some researches about OHDSI.
However when I have configured WebAPI and load the URL http://localhost:8000/WebAPI(I have already changed the tomcat server port to 8000) to check,it shows that

{"payload":{"cause":null,"stackTrace":[{"methodName":"run","fileName":"ServerRuntime.java","lineNumber":323,"className":"org.glassfish.jersey.server.ServerRuntime$2","nativeMethod":false},{"methodName":"call","fileName":"Errors.java","lineNumber":271,"className":"org.glassfish.jersey.internal.Errors$1","nativeMethod":false},{"methodName":"call","fileName":"Errors.java","lineNumber":267,"className":"org.glassfish.jersey.internal.Errors$1","nativeMethod":false},{"methodName":"process","fileName":"Errors.java","lineNumber":315,"className":"org.glassfish.jersey.internal.Errors","nativeMethod":false},{"methodName":"process","fileName":"Errors.java","lineNumber":297,"className":"org.glassfish.jersey.internal.Errors","nativeMethod":false},{"methodName":"process","fileName":"Errors.java","lineNumber":267,"className":"org.glassfish.jersey.internal.Errors","nativeMethod":false},{"methodName":"runInScope","fileName":"RequestScope.java","lineNumber":317,"className":"org.glassfish.jersey.process.internal.RequestScope","nativeMethod":false},{"methodName":"process","fileName":"ServerRuntime.java","lineNumber":305,"className":"org.glassfish.jersey.server.ServerRuntime","nativeMethod":false},{"methodName":"handle","fileName":"ApplicationHandler.java","lineNumber":1154,"className":"org.glassfish.jersey.server.ApplicationHandler","nativeMethod":false},{"methodName":"serviceImpl","fileName":"WebComponent.java","lineNumber":473,"className":"org.glassfish.jersey.servlet.WebComponent","nativeMethod":false},{"methodName":"service","fileName":"WebComponent.java","lineNumber":427,"className":"org.glassfish.jersey.servlet.WebComponent","nativeMethod":false},{"methodName":"service","fileName":"ServletContainer.java","lineNumber":388,"className":"org.glassfish.jersey.servlet.ServletContainer","nativeMethod":false},{"methodName":"service","fileName":"ServletContainer.java","lineNumber":341,"className":"org.glassfish.jersey.servlet.ServletContainer","nativeMethod":false},{"methodName":"service","fileName":"ServletContainer.java","lineNumber":228,"className":"org.glassfish.jersey.servlet.ServletContainer","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":231,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"WsFilter.java","lineNumber":52,"className":"org.apache.tomcat.websocket.server.WsFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ProxiedFilterChain.java","lineNumber":61,"className":"org.apache.shiro.web.servlet.ProxiedFilterChain","nativeMethod":false},{"methodName":"executeChain","fileName":"AdviceFilter.java","lineNumber":108,"className":"org.apache.shiro.web.servlet.AdviceFilter","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"AdviceFilter.java","lineNumber":137,"className":"org.apache.shiro.web.servlet.AdviceFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":125,"className":"org.apache.shiro.web.servlet.OncePerRequestFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"ProxiedFilterChain.java","lineNumber":66,"className":"org.apache.shiro.web.servlet.ProxiedFilterChain","nativeMethod":false},{"methodName":"executeChain","fileName":"AbstractShiroFilter.java","lineNumber":449,"className":"org.apache.shiro.web.servlet.AbstractShiroFilter","nativeMethod":false},{"methodName":"call","fileName":"AbstractShiroFilter.java","lineNumber":365,"className":"org.apache.shiro.web.servlet.AbstractShiroFilter$1","nativeMethod":false},{"methodName":"doCall","fileName":"SubjectCallable.java","lineNumber":90,"className":"org.apache.shiro.subject.support.SubjectCallable","nativeMethod":false},{"methodName":"call","fileName":"SubjectCallable.java","lineNumber":83,"className":"org.apache.shiro.subject.support.SubjectCallable","nativeMethod":false},{"methodName":"execute","fileName":"DelegatingSubject.java","lineNumber":383,"className":"org.apache.shiro.subject.support.DelegatingSubject","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"AbstractShiroFilter.java","lineNumber":362,"className":"org.apache.shiro.web.servlet.AbstractShiroFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":125,"className":"org.apache.shiro.web.servlet.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"executeChain","fileName":"AdviceFilter.java","lineNumber":108,"className":"org.apache.shiro.web.servlet.AdviceFilter","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"AdviceFilter.java","lineNumber":137,"className":"org.apache.shiro.web.servlet.AdviceFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":125,"className":"org.apache.shiro.web.servlet.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"RequestContextFilter.java","lineNumber":99,"className":"org.springframework.web.filter.RequestContextFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":107,"className":"org.springframework.web.filter.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"HttpPutFormContentFilter.java","lineNumber":105,"className":"org.springframework.web.filter.HttpPutFormContentFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":107,"className":"org.springframework.web.filter.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"HiddenHttpMethodFilter.java","lineNumber":81,"className":"org.springframework.web.filter.HiddenHttpMethodFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":107,"className":"org.springframework.web.filter.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"CharacterEncodingFilter.java","lineNumber":197,"className":"org.springframework.web.filter.CharacterEncodingFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":107,"className":"org.springframework.web.filter.OncePerRequestFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ErrorPageFilter.java","lineNumber":115,"className":"org.springframework.boot.web.support.ErrorPageFilter","nativeMethod":false},{"methodName":"access$000","fileName":"ErrorPageFilter.java","lineNumber":59,"className":"org.springframework.boot.web.support.ErrorPageFilter","nativeMethod":false},{"methodName":"doFilterInternal","fileName":"ErrorPageFilter.java","lineNumber":90,"className":"org.springframework.boot.web.support.ErrorPageFilter$1","nativeMethod":false},{"methodName":"doFilter","fileName":"OncePerRequestFilter.java","lineNumber":107,"className":"org.springframework.web.filter.OncePerRequestFilter","nativeMethod":false},{"methodName":"doFilter","fileName":"ErrorPageFilter.java","lineNumber":108,"className":"org.springframework.boot.web.support.ErrorPageFilter","nativeMethod":false},{"methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":193,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":166,"className":"org.apache.catalina.core.ApplicationFilterChain","nativeMethod":false},{"methodName":"invoke","fileName":"StandardWrapperValve.java","lineNumber":199,"className":"org.apache.catalina.core.StandardWrapperValve","nativeMethod":false},{"methodName":"invoke","fileName":"StandardContextValve.java","lineNumber":96,"className":"org.apache.catalina.core.StandardContextValve","nativeMethod":false},{"methodName":"invoke","fileName":"StandardHostValve.java","lineNumber":140,"className":"org.apache.catalina.core.StandardHostValve","nativeMethod":false},{"methodName":"invoke","fileName":"ErrorReportValve.java","lineNumber":81,"className":"org.apache.catalina.valves.ErrorReportValve","nativeMethod":false},{"methodName":"invoke","fileName":"AbstractAccessLogValve.java","lineNumber":650,"className":"org.apache.catalina.valves.AbstractAccessLogValve","nativeMethod":false},{"methodName":"invoke","fileName":"StandardEngineValve.java","lineNumber":87,"className":"org.apache.catalina.core.StandardEngineValve","nativeMethod":false},{"methodName":"service","fileName":"CoyoteAdapter.java","lineNumber":342,"className":"org.apache.catalina.connector.CoyoteAdapter","nativeMethod":false},{"methodName":"service","fileName":"Http11Processor.java","lineNumber":803,"className":"org.apache.coyote.http11.Http11Processor","nativeMethod":false},{"methodName":"process","fileName":"AbstractProcessorLight.java","lineNumber":66,"className":"org.apache.coyote.AbstractProcessorLight","nativeMethod":false},{"methodName":"process","fileName":"AbstractProtocol.java","lineNumber":790,"className":"org.apache.coyote.AbstractProtocol$ConnectionHandler","nativeMethod":false},{"methodName":"doRun","fileName":"NioEndpoint.java","lineNumber":1459,"className":"org.apache.tomcat.util.net.NioEndpoint$SocketProcessor","nativeMethod":false},{"methodName":"run","fileName":"SocketProcessorBase.java","lineNumber":49,"className":"org.apache.tomcat.util.net.SocketProcessorBase","nativeMethod":false},{"methodName":"runWorker","fileName":"ThreadPoolExecutor.java","lineNumber":1149,"className":"java.util.concurrent.ThreadPoolExecutor","nativeMethod":false},{"methodName":"run","fileName":"ThreadPoolExecutor.java","lineNumber":624,"className":"java.util.concurrent.ThreadPoolExecutor$Worker","nativeMethod":false},{"methodName":"run","fileName":"TaskThread.java","lineNumber":61,"className":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","nativeMethod":false},{"methodName":"run","fileName":"Thread.java","lineNumber":748,"className":"java.lang.Thread","nativeMethod":false}],"response":{"context":{"headers":{},"entity":null,"entityType":null,"entityAnnotations":[],"entityStream":{"committed":false,"closed":false},"length":-1,"language":null,"location":null,"date":null,"lastModified":null,"committed":false,"mediaType":null,"lengthLong":-1,"entityTag":null,"entityClass":null,"acceptableLanguages":["*"],"responseCookies":{},"requestCookies":{},"allowedMethods":[],"stringHeaders":{},"links":[],"acceptableMediaTypes":[{"type":"*","subtype":"*","parameters":{},"quality":1000,"wildcardSubtype":true,"wildcardType":true}]},"status":404,"length":-1,"language":null,"location":null,"date":null,"lastModified":null,"entity":null,"cookies":{},"mediaType":null,"entityTag":null,"allowedMethods":[],"statusInfo":"NOT_FOUND","stringHeaders":{},"metadata":{},"links":[],"headers":{}},"localizedMessage":"HTTP 404 Not Found","message":"HTTP 404 Not Found","suppressed":[]},"headers":{"id":"4caba598-b6a8-f372-40ee-30bd61a0ffde","timestamp":1520327825602}}

I wonder whether these “false” indicate that I configure something wrong and how to make it correct.

In addition,I downloaded Atlas-2.3.0 and configured the config-local.js like this

define([], function () {
var configLocal = {};

// clearing local storage otherwise source cache will obscure the override settings
localStorage.clear();

// WebAPI
configLocal.api = {
	name: 'OHDSI',
	url: 'http://localhost:8000/WebAPI/'
};



return configLocal;

});
then login Atlas,but the window is very strange in blank.

How can I sovle this problem.
Any of your help will be appreciated!
Sincerely
-ZHU

From your screenshot, it appears you are tryign to load atlas from a local file (ie: file://C;/users…).

You need to store the Atlas files so that they are delivered through an HTTP server.

The URL you tested: http://localhost:8000/WebAPI isn’t a valid endpoint. You can try http://localhost:8000/WebAPI/info to see the version of WebAPI, and check your configured sources by accessing http://localhost:8000/WebAPI/source/sources

@Chris_Knoll Thanks for your reply.Sorry for disturbing you again.
I have checked as your suggestion,the http://localhost:8000/WebAPI/info shows “{“version”:“2.3.0”}”,and the http://localhost:8000/WebAPI/source/sources shows codes below

[

{“sourceId”:1,“sourceName”:“My Cdm”,“sourceDialect”:“oracle”,“sourceKey”:“MY_CDM”,“daimons”: [{“sourceDaimonId”:1,“daimonType”:“CDM”,“tableQualifier”:“cdm”,“priority”:“0”},
{“sourceDaimonId”:2,“daimonType”:“Vocabulary”,“tableQualifier”:“cdm”,“priority”:“0”},{“sourceDaimonId”:3,“daimonType”:“Results”,“tableQualifier”:“ohdsi”,“priority”:“0”}
]
},
{“sourceId”:2,“sourceName”:“Default vocabulary”,“sourceDialect”:“oracle”,“sourceKey”:“vocab”,“daimons”: [
{“sourceDaimonId”:4,“daimonType”:“Vocabulary”,“tableQualifier”:“cdm”,“priority”:“1”}
]
}]

Do I configure it correctly?

I’m new here and weak in codes,DB and web.Thanks for any of your help.

WebAPI does look like it is installed correctly since the /info and /source/sources returns information.

However, I’m unable to determine if the settings are correct for your environment. It appears that you have set up 2 sources:

{"sourceId":1,"sourceName":"My Cdm","sourceDialect":"oracle","sourceKey":"MY_CDM","daimons": ....
{"sourceId":2,"sourceName":"Default vocabulary","sourceDialect":"oracle","sourceKey":"vocab","daimons": ...

These are set to be Oracle, but we hide the connection details from the /source/sources URL so I don’t know if you have the right connection info.

For source 1, you have the following table qualifiers set:

"daimons": [{"sourceDaimonId":1,"daimonType":"CDM","tableQualifier":"cdm","priority":"0"},
{"sourceDaimonId":2,"daimonType":"Vocabulary","tableQualifier":"cdm","priority":"0"},{"sourceDaimonId":3,"daimonType":"Results","tableQualifier":"ohdsi","priority":"0"}]

Do you know if your Oracle database has the schemas ‘cdm’ and ‘ohdsi’ set up, where the ‘cdm’ schema has your CDM tables (person, visit, drug_exposure, and the vocabulary tables) vs. the ohdsi schema has the set of tables to store the results?

Oracle is especially challenging to setup if you do not have DB experience, and I am sorry that there isn’t an easy way to have it install automatically, but the CDM configuration/setup is something that is outside of the WebAPI installation/configuration. I think you’ll need some DBA help to ensure that it is configured correctly.

-Chris

@Chris_Knoll Sorry for my late reply because of the time difference.
I have already studied DB now.

I follow the steps what the OHDSI forum shown to configure these settings.I set up the ‘ohdsi’ schema only and put all tables in it including CDM tables.After reading your reply,I think I’m wrong.You mean I should create a ‘cdm’ schema single and only store CDM tables while ‘ohdsi’ schema only store results,by the way,is that CDM tables are created manually and the tables to store the results in ‘ohdsi’ schema are created automatically after configured WebAPI?.
Then should I do similar steps to deal with source 2?

It’s very kind of your help.
Sincerely.
-Zhu

Ok, I’m not sure which documentation you are using, but there’s the primary WebAPI database that you create your initial ‘ohdsi’ schema in, and WebAPI automatically deploys necessary tables for WebAPI functionality. This is completely different from the database that you input into the SOURCE and SOURCE_DAIMON tables. You could have a single oracle database, but the typical approach is 1 databse for WebAPI and one database per CDM/Results schema.

Since you already have your WebAPI running and that looks good, then all you need is to create a record (your source 1) that points to your CDM database, you’ll have 2 schemas in this database: ‘cdm’ and ‘results’. Once you load your CDM data (which includes vocabulary tables) you then need to create the tables in the ‘results’ schema manually. In release 2.3.0, we added a new endpoint that will give you the DDL you need: WebAPI/ddl/results?dialect=oracle (you can remove the dialect part if you just want to see the ‘standard’ DDL for creating the tables). These are the tables you want to create in your ‘results’ schema, and then in your SOURCE_DAIMON table, your table qualifier for the ‘results’ daimon type should be set to your results schema name (which I suggest you name ‘results’).

I don’t recommend you share the same database with WebAPI and your CDMs. Things get a bit more complicated once you start adding multiple CDMs to your SOURCE table. But if you have limited resources, you can set it up with a single database with the following schemas:

ohdsi: this is configured in your settings.xml file and points to the schema that WebAPI will create tables in
cdm: this is the schema with CDM and Vocabulary tables
results: this is the schema with the results tables which you can get the DDL from WebAPI/ddl/results?dialect=oracle

@Chris_Knoll Sorry for disturbing you again. I do don’t know how to deal with the next problems.
The ‘ohdsi’ schema has been set up with no problem.But I failed to set up the ‘cdm’ and ‘results’ schemas with your suggestion.
①.For ‘cdm’,I can’t find the Vocabulary tables, I downloaded ‘Vocabulary-v5.0’ from ‘athena’ and ran ‘java -jar cpt4.jar‘ successfully,although I don’t know whether it has relation with ‘Vocabulary tables’.Could you tell me where to find these tables?
②.For ‘results’,you say I can get the DDL from WebAPI/ddl/results?dialect=oracle,but I can’t open the page.Is that a local folde or should I add something before the ‘WebAPI/ddl/results?dialect=oracle’?

I‘m really sorry for disturbing you once again,but I can’t find someone else to help me.
Sincerely.
-ZHU

Hi, @ZHU_C,
It has been a long time since I’ve downloaded those files, but @lee_evans might be able to give you specific instructions or @chen_regen has experience on oracle, maybe they can help you with importing the text files into an oracle table.

Re the @results: Sorry, I meant to say access that URL under your WebAPI service, so looking back on your prior post, it looks like: http://localhost:8000/WebAPI/ddl/results?dialect=oracle. You can remove the dialect part if you just want to see the simple CREATE TABLE statements.

-Chris

@Chris_Knoll thank you! I find the DDL.But,it seems that some codes don‘t match with my oracle.I just want to modify it,but I don‘t konw whether it will make bad influence.

For example:
①: I set up the ‘results’ schema and run the codes

      CREATE TABLE @results_schema.cohort
(
	COHORT_DEFINITION_ID int NOT NULL,
	SUBJECT_ID bigint NOT NULL,
	cohort_start_date date NOT NULL,
	cohort_end_date date NOT NULL
);

The error is

00903. 00000 -  "invalid table name"
*Cause:    
*Action:

If I delete “@results_schema.”,it runs correctly.Therefore,should I delete it?

②: It seems that identifier should be less than 30 characters in oracle sql developer according to the specify,but the code below:

CONSTRAINT DF_heracles_results_dist_last_update DEFAULT GETDATE()

Obviously,the identifier is more than 30 characters.I do don’t know how to deal with it.

Could you help me once again?
Sincerely.
-ZHU.

Hi,

Everywhere you see an @results_schema token, you should find-replace it with the name of your schema. It might work with you just deleting the @results_schema, but I’m not sure which schema the default table creation will go into. I would look for any tables you created to make sure they are in the correct schema. If they are not in the results schema, you need to drop the table, and re-create it with the result schema specified. To be safe, please specify the results schema: do not let it choose a default schema to create the tables into.

The long identifiers: you can manually shorten them. For the ones you find that are too long, can you please post the list here and we’ll issue an update that will make the default lengths < 30 characters for all DBMS.

Thank you!

-Chris

HI,
This is my results shema


Is that correct?

Then,these are the two lists which identifiers are too long in my environment (oracle sql developer).
@heracles_results,

 CONSTRAINT DF_HERACLES_results_last_update DEFAULT GETDATE()

Sincerely.
-ZHU

@heracles_results_dist

CONSTRAINT DF_heracles_results_dist_last_update DEFAULT GETDATE()

Yes, that looks like you have all the required tables in the results schema.

We’ll make an update so that the /ddl returns identifiers that are shorter than 30 characters.

Thank you!

Thank you all of your help.
Thank you very much.

Please let us know if you’ve resolved your problems and we’ll close out the github issue you opened.

OK,you can colse out the issue.Thank you.

t