OHDSI Home | Forums | Wiki | Github

Loading Profiles and Cohort Generation in Atlas


(mintmountain89) #1

Hi! This follows from the another discussion thread

Background is we have set up WebAPI and installed atlas and configured our source and source_daimon tables. We are able to search for the vocabulary using atlas, however, the profile section takes a long time to load and returns no results apart from the gender and number of events.


The error messages upon opening the console (Ctrl+Shift+J) are as follows:





In addition, we do not have the permissions to generate cohorts:

We would really appreciate any assistance we can get here and thanks in advance! Lastly, we would like to check if there is a step-by-step guide to using atlas or some test case/scenario that we can try out to see if Atlas is properly installed and working.

Thank you!
Regards,
Hui Xing


Error in installing R-Packages
(mintmountain89) #2

Hi,

We are still facing these errors:

  1. Profile is unable to load
  2. No permissions to generate cohort.

Please could anyone advise

Thanks so much in advance :slight_smile:

Regards,
Hui Xing


(mintmountain89) #3

@Chris_Knoll @t_abdul_basser @Ajit_Londhe

Hi!
We have re run the steps to set up webapi below and we still are facing the problem of 1. not being able to load profiles and 2. not having the permissions to generate the cohorts.

Steps taken:

As we not familiar with javascript and are having trouble understanding the error messages above, we are still not quite sure where to start debugging Further, we are able to browse the vocabulary and see some achilles results in the Data Sources section in Atlas so the source and source daimon tables should have been configured correctly. Would really appreciate any advice available. Thanks so much!

Regards,
Hui Xing


(Chris Knoll) #4

I’m seeing very strange errors in your screenshots: the ‘SyntaxError: illegal character’ is very strange.

I also can’t tell if you are running on Chrome or some other browser. Can you try the latest version of Chrome?

What version of Atlas are you using?
What version of WebAPI have you installed on your java container?

By default, security should be disabled, so it is strange that you are seeing any ‘permission denied’ errors at all. But once you can confirm the version of the browser, WebAPI and Atlas you are using, we can narrow it down.


(mintmountain89) #5

Hi @Chris_Knoll

We’re using Safari browser, Atlas 2.5.0 and WEBAPI 2.5.0

Tried it on Chrome browser and it produces the HTTP Status 404 error shown below:

Thanks


(Chris Knoll) #6

I am not sure why Safari would return the Atlas application, but Chrome returns a 404 (file not found). It looks like your URLs are case-sensitive, and from your origional error, the URL was localhost:8080/Atlas. Can you try either localhost:8080/Atlas or localhost:8080/Atlas/index.html?


(mintmountain89) #7

@Chris_Knoll

Thanks for the advice. I’ve tried with localhost:8080/Atlas and it works! However, we are still encountering the same issues:

-Ok: Able to see data sources: Dashboard, Data Density, Person, Visit, Death

-Not ok: Not able to see data sources: Condition, Condition Era, Procedure, Drug, Drug Era, Measurement, Observation

-Not ok: Profile is unable to load

-Not ok: No permissions to generate cohort

Thank you.


(Chris Knoll) #8

Ok, the first error about ‘Invalid or unexpected token’ when loading config-local.js:

You have some kind of invalid character or syntax error in config-local.js. It says line 5. Could you give us the top 10 lines of your config-local.js file?

Also, if you have whitespace (like a space) in your ‘SOURCE_KEY’ value of your WebAPI source table, I’d change it so that your source key has non-whitespace. Ie:
source_name = 'My CDM', source_key = 'MY_CDM'.

If you do update your source table, you will need to clear the WebAPI source cache by going to this URL:

locahost:8080/WebAPI/source/refresh

-Chris


(mintmountain89) #9

13%20AM

Ah, yes, I had typed in ` instead of ’ in the name field. Have corrected it now (to above) and the invalid character error is gone, thanks

No whitespace in the source key though, here is the tables on pdAgminIII

Also unable to clear cache:

Thanks much!


(Chris Knoll) #10

OK, glad one of the errors was resolved. The problem with your ‘refresh’ call was you didn’t spell ‘localhost’ correct, you put ‘locahost’ not ‘localhost’.

After correcting your config-local.js file, what errors are you seeing now in the console?


(mintmountain89) #11

i see! OK…here are the errors after correcting config-local.js and clearing the source cache:


With regards to the failed to load resource…status of 500…clicked on it and this was at the end of the pages loaded:

http://localhost:8080/WebAPI/cdmresults/MY_CDM/conditionera

http://localhost:8080/WebAPI/vocabulary/vocab/included-concepts/count

http://localhost:8080/WebAPI/vocabulary/vocab/optimize

and upon clicking on ‘Estimation’:
37%20PM

Thank you!


(Chris Knoll) #12

Ok, the ohdsi.concept_heirarchy error is due to a table not being created in your results schema. I thought this was available in 2.5.0, but you want to execute the following scripts to create and then initialize the table (note you must replace the place-hodlers with your own local cdm/vocabulary schema:

https://github.com/OHDSI/WebAPI/blob/master/src/main/resources/ddl/results/concept_hierarchy.sql

https://github.com/OHDSI/WebAPI/blob/master/src/main/resources/ddl/results/init_concept_hierarchy.sql

The 404 in included-concepts/count and the 405 in /vocab/optimize is (I believe) because those URls get POST’ed to (ie: the browser posts JSON to get procssed) so just trying to open the URL directly results in a GET, which is not found/ method not supported. The POST/GET is the ‘method’ they are referring to in the error. But in the debug console, you can click ont he request to see what the data was that was posted up, and see the actual error (i’m not sure if your output is from the console report or if you opened the URL in a new tab, which would change the POST to a GET)

Finally, the ‘Estimation’ error, it is saying it can’t find the cohort-comparison-browser module, and the URL it tried to access was under /js/cohort-comparison-browser.js. But in 2.5.0, that module is found in /js/components/cohort-comparison-browser.js.

And, according to the main.js file, this line exists:

"cohort-comparison-browser": "components/cohort-comparison-browser",

So, I’m not quite sure where it is thinking that when ‘cohort-comparison-browser’ is being loaded, that ti doesn’t actually try to go to the /js/components path. That’s a bit of a mystery. Could you confirm that in your js/main.js file, you have an entry for ‘cohort-comparison-browser’ around line 17?


(mintmountain89) #13

hmm ok… these are some of the screenshots from clicking on the error in the console
on clicking concept sets> concept:


in the console where the error is showed, click on the ‘sources’ tab

click on the ‘network’ tab. ‘count’ is highlighted in red

yes, its in the main.js file, shown below:

const bustCache = (() => {
	const key = 'bustCache';
	let hash = localStorage.getItem(key) || (localStorage[key] = Math.random().toString(36).substring(7));
	return '_=' + hash;
})();

const localRefs = {
	"configuration": "components/configuration",
	"concept-manager": "components/concept-manager",
	"conceptset-browser": "components/conceptset/conceptset-browser",
	"conceptset-editor": "components/conceptset/conceptset-editor",
	"conceptset-manager": "components/conceptset/conceptset-manager",
	"conceptset-modal": "components/conceptsetmodal/conceptSetSaveModal",
	"conceptset-list-modal": "components/conceptset/conceptset-list-modal",
	"cohort-comparison-manager": "components/cohort-comparison-manager",
	"job-manager": "components/job-manager",
	"cohort-comparison-browser": "components/cohort-comparison-browser",
	"cohort-comparison-print-friendly": "components/cohort-comparison-print-friendly",
	"cohort-comparison-r-code": "components/cohort-comparison-r-code",
	"cohort-comparison-multi-r-code": "components/cohort-comparison-multi-r-code",
	"user-bar": "components/user-bar",
	"faceted-datatable": "components/faceted-datatable",
	"explore-cohort": "components/explore-cohort",
	"r-manager": "components/r-manager",
	"home": "components/home",
	"welcome": "components/welcome",
	"forbidden": "components/ac-forbidden",
	"unauthenticated": "components/ac-unauthenticated",
	"roles": "components/roles",
	"role-details": "components/role-details",
	"loading": "components/loading",
	"atlas-state": "components/atlas-state",
	"plp-manager": "components/plp-manager",
	"plp-inspector": "components/plp-inspector",
	"plp-browser": "components/plp-browser",
	"plp-roc": "components/plp-roc",
	"plp-calibration": "components/plp-calibration",
	"plp-spec-editor": "components/plp-spec-editor",
	"plp-r-code": "components/plp-r-code",
	"plp-print-friendly": "components/plp-print-friendly",
	"feedback": "components/feedback",
	"conceptsetbuilder": "modules/conceptsetbuilder",
	"conceptpicker": "modules/conceptpicker",
	"webapi": "modules/WebAPIProvider",
	"vocabularyprovider": "modules/WebAPIProvider/VocabularyProvider",
	"css": "plugins/css.min",
};

// set 'optional' path prior to first call to require
requirejs.config({paths: {"optional": "plugins/optional"}});

require([
	'./settings',
	'optional', // require this plugin separately to check in advance whether we have a local config
	'config'
], (settings, optional, appConfig) => {
	const cdnRefs = {};
	Object.entries(settings.paths).forEach(([name, path]) => {
		cdnRefs[name] = appConfig.useBundled3dPartyLibs
			? 'assets/bundle/bundle'
			: path;
	});

	requirejs.config({
		...settings,
		urlArgs: bustCache,
		deps: ['css!styles/jquery.dataTables.min',
			'css!styles/jquery.dataTables.colVis.css'
		],
		paths: {
			...localRefs,
			...cdnRefs,
		},
	});
	require(['bootstrap'], function () { // bootstrap must come first
    $.fn.bstooltip = $.fn.tooltip;
		require([
			'providers/Application',
			'providers/Model',
			'providers/Router',
			'atlas-state',
			'jquery.ui.autocomplete.scroll',
			'loading',
			'user-bar',
			'welcome',
			'components/white-page'
		],
			(
				Application,
				Model,
				Router,
				sharedState,
			) => {
				const app = new Application(new Model(), new Router());

				app.bootstrap()
					.then(() => app.synchronize())
					.then(() => app.run())
					.catch(er => {
						sharedState.appInitializationStatus(Model.applicationStatuses.failed);
						console.error('App initialization failed', er);
					});

				return app;
		});
	});
});

(Chris Knoll) #14

On that one, can you flip over to the ‘response’ tab on the right. it will give you a server-side stack trace and we might be able to find out what the underlying cause is. Failing that, we may have to go through the server logs. Do you have access to the tomcat/java server logs?


(mintmountain89) #15

Ok, i have done so!

Below is the text under ‘response’

{"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":53,"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":"AuthenticatorBase.java","lineNumber":491,"className":"org.apache.catalina.authenticator.AuthenticatorBase","nativeMethod":false},{"methodName":"invoke","fileName":"StandardHostValve.java","lineNumber":139,"className":"org.apache.catalina.core.StandardHostValve","nativeMethod":false},{"methodName":"invoke","fileName":"ErrorReportValve.java","lineNumber":92,"className":"org.apache.catalina.valves.ErrorReportValve","nativeMethod":false},{"methodName":"invoke","fileName":"AbstractAccessLogValve.java","lineNumber":668,"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":343,"className":"org.apache.catalina.connector.CoyoteAdapter","nativeMethod":false},{"methodName":"service","fileName":"Http11Processor.java","lineNumber":408,"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":764,"className":"org.apache.coyote.AbstractProtocol$ConnectionHandler","nativeMethod":false},{"methodName":"doRun","fileName":"NioEndpoint.java","lineNumber":1388,"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,"links":[],"responseCookies":{},"acceptableLanguages":["*"],"entityClass":null,"lengthLong":-1,"requestCookies":{},"committed":false,"mediaType":null,"lastModified":null,"date":null,"allowedMethods":[],"stringHeaders":{},"entityTag":null,"acceptableMediaTypes":[{"type":"*","subtype":"*","parameters":{},"quality":1000,"wildcardType":true,"wildcardSubtype":true}]},"status":404,"length":-1,"language":null,"location":null,"metadata":{},"links":[],"cookies":{},"entity":null,"mediaType":null,"lastModified":null,"date":null,"allowedMethods":[],"stringHeaders":{},"statusInfo":"NOT_FOUND","entityTag":null,"headers":{}},"message":"HTTP 404 Not Found","localizedMessage":"HTTP 404 Not Found","suppressed":[]},"headers":{"id":"35ee1841-5fbe-3c00-cb33-685984aa1a2a","timestamp":1541492723531}}

Well…I went to the tomcat folder and couldn’t find a java folder… sorry is that how I should be accessing the tomcat/java server logs? Thanks!


(Daniel Lima) #16

Hi, @hui_xing_tan!
I also had some trouble to access tomcat logs inside docker. So I changed log4j.xml to:

?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender class="org.apache.log4j.FileAppender" name="stdout">
    <param name="file"   value="webapi.log" />
    <param name="append" value="false" />
    <layout class="org.apache.log4j.PatternLayout">
      <param value="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %t %c - %x - %m%n"
        name="ConversionPattern" />
    </layout>
  </appender>

  <logger name="org.ohdsi">
    <level value="debug" />
  </logger>
  <!-- <logger name="org.springframework.orm"> -->
  <!--  <level value="debug" /> -->
  <!-- </logger> -->
  <!-- <logger name="org.springframework.jdbc"> -->
  <!--  <level value="debug" /> -->
  <!-- </logger> -->
  <root>
    <level value="info" />
    <appender-ref ref="stdout" />
  </root>
</log4j:configuration>

After redeploying the tomcat webapp, any org.ohdsi exceptions are appended to webapi.log and can be accessed with
docker exec -it postgresql_broadsea-webtools_1 tail -f webapi.log
(docker container should be running).


(Chris Knoll) #17

So, from the javascript error side, I can’t tell what the real problem is. The serer is reporting a 500 error (meaning that there is a runtime error happening trying to make this request) but it eventually becomes a 404 at the bottom of the error message. I’m not sure what error condition leads to that. Sorry. If you do find where the logs are being written, you can do some calls to the server and see if any additional information can be found in the logs.


(Taha Abdul-Basser) #18

Alternatively you can tail the supervisor logs as per the Broadsea docs.

docker-compose exec broadsea-webtools bash

then, in the container shell

tail -f /var/log/supervisor/deploy-script-stdout*.log

This makes changing the log configuration and restarting tomcat in the container unnecessary.


(Taha Abdul-Basser) #19

Also try sending us using the Preview tab in the network area (between headers and response) and expanding payload. In addition to a prettified version of the response it often includes the localized message and message from the server-side Java exception.


(mintmountain89) #20

Thank you all for the helpful responses. We did not implement with docker but managed to find the tomcat logs, let me know which you need:
08%20PM

Ok, here it is!



Thank you! Cheers :slight_smile:


t