OHDSI Home | Forums | Wiki | Github

WebAPI Tables Not Being Created in Windows 10

Hello, this is my first time installing WebAPI on Windows. I think there is probably something wrong with the settings configuration or something else is not happening correctly. It is not giving me any indication of a database connection error in the log files. Any ideas on what could be the issue? Here is the webapi log file.

Using CATALINA_BASE: “C:\tomcat\apache-tomcat-8.5.43”
Using CATALINA_HOME: “C:\tomcat\apache-tomcat-8.5.43”
Using CATALINA_TMPDIR: “C:\tomcat\apache-tomcat-8.5.43\temp”
Using JRE_HOME: “C:\Program Files\Java\jdk1.8.0_221”
Using CLASSPATH: “C:\tomcat\apache-tomcat-8.5.43\bin\bootstrap.jar;C:\tomcat\apache-tomcat-8.5.43\bin\tomcat-juli.jar”
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.43
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 4 2019 20:53:15 UTC
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.43.0
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_221\jre
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_221-b11
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
16-Aug-2019 16:30:20.149 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\tomcat\apache-tomcat-8.5.43
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\tomcat\apache-tomcat-8.5.43
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\tomcat\apache-tomcat-8.5.43\conf\logging.properties
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\tomcat\apache-tomcat-8.5.43
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\tomcat\apache-tomcat-8.5.43
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\tomcat\apache-tomcat-8.5.43\temp
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
16-Aug-2019 16:30:20.164 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
16-Aug-2019 16:30:20.305 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8080”]
16-Aug-2019 16:30:20.492 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2019 16:30:20.508 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“ajp-nio-8009”]
16-Aug-2019 16:30:20.508 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Aug-2019 16:30:20.508 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 702 ms
16-Aug-2019 16:30:20.524 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
16-Aug-2019 16:30:20.524 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.43
16-Aug-2019 16:30:20.555 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\tomcat\apache-tomcat-8.5.43\webapps\WebAPI.war]
16-Aug-2019 16:30:20.570 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property ‘antiJARLocking’ to ‘true’ did not find a matching property.

:: Spring Boot :: (v1.5.20.RELEASE)
2019-08-16 16:30:31.488 INFO localhost-startStop-1 org.ohdsi.webapi.WebApi - - Starting WebApi on 4901-PC-210-FD9 with PID 18400 (C:\tomcat\apache-tomcat-8.5.43\webapps\WebAPI\WEB-INF\classes started by mallingl in C:\tomcat\apache-tomcat-8.5.43\bin)
2019-08-16 16:30:31.488 INFO localhost-startStop-1 org.ohdsi.webapi.WebApi - - The following profiles are active: default
2019-08-16 16:30:31.566 INFO localhost-startStop-1 org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4ba3bd7f: startup date [Fri Aug 16 16:30:31 CDT 2019]; root of context hierarchy
2019-08-16 16:30:31.722 INFO background-preinit org.hibernate.validator.internal.util.Version - - HV000001: Hibernate Validator 5.3.6.Final
2019-08-16 16:30:35.566 INFO localhost-startStop-1 org.springframework.beans.factory.support.DefaultListableBeanFactory - - Overriding bean definition for bean ‘jobBuilders’ with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration; factoryMethodName=jobBuilders; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=jobConfig; factoryMethodName=jobBuilders; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/ohdsi/webapi/JobConfig.class]]
2019-08-16 16:30:35.863 INFO localhost-startStop-1 org.springframework.beans.factory.support.DefaultListableBeanFactory - - Overriding bean definition for bean ‘requestContextFilter’ with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class]] with [Root bean: class [org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2019-08-16 16:30:36.754 INFO localhost-startStop-1 org.springframework.integration.config.IntegrationRegistrar - - No bean named ‘integrationHeaderChannelRegistry’ has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2019-08-16 16:30:37.269 INFO localhost-startStop-1 org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor - - No bean named ‘errorChannel’ has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2019-08-16 16:30:37.300 INFO localhost-startStop-1 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - - JSR-330 ‘javax.inject.Inject’ annotation found and supported for autowiring
2019-08-16 16:30:37.363 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘converterConfiguration’ of type [org.ohdsi.webapi.ConverterConfiguration$$EnhancerBySpringCGLIB$$98ef2179] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:37.379 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘conversionService’ of type [org.springframework.core.convert.support.DefaultConversionService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:37.707 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration’ of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$3253fa2d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:38.160 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘shiroConfiguration’ of type [org.ohdsi.webapi.ShiroConfiguration$$EnhancerBySpringCGLIB$$76c26028] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:38.175 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘flywayConfig’ of type [org.ohdsi.webapi.FlywayConfig$$EnhancerBySpringCGLIB$$34f7ac81] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:38.879 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘secondaryDataSource’ of type [org.apache.tomcat.jdbc.pool.DataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:38.910 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration’ of type [org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$14479d8d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:38.988 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties’ of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:39.019 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - - Bean ‘dataSourceInitializer’ of type [org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-16 16:30:39.113 INFO localhost-startStop-1 org.flywaydb.core.internal.util.VersionPrinter - - Flyway 4.2.0 by Boxfuse

Attached are the settings.xml. I had to put the actual IP address or machine name instead of leaving it as localhost even though the database and webapi are both on my machine. Actual IP and password have been replaced with pseudo ones. I have only included the mssql portion.

settings.xml (4.4 KB)

Updated log file:
webapi.xml (108.7 KB)

Now there seems to be some issues accessing http://localhost:8080/WebAPI/source/sources. When I go to this link, I get []. In the log, it seems I have a 404 and 405 java exception when trying to access these urls. I posted the updated log on the forum post because github is not letting me upload text files. You can see the exceptions starting here in the log file:

2019-08-20 16:28:30.284 INFO taskScheduler-5 org.ohdsi.webapi.executionengine.service.ScriptExecutionServiceImpl - - Invalidating execution engine based analyses 2019-08-20 16:29:52.038 ERROR http-nio-8080-exec-6 org.ohdsi.webapi.util.GenericExceptionMapper - - javax.ws.rs.NotFoundException: HTTP 404 Not Found

Any ideas on what the issue is? Should I redeploy the war file? When I go here, it says

Can someone help with this? Thank you

In your screenshot above, there is nothing handling the endpoint /WebAPI, therefore accessing that path will yield a 404 (not found).

If you are getting back [] from /WebAPI/source/sources, then your webAPI’s source table is empty.

Okay, so at this point am I supposed to be able to see something besides the above screenshot at these urls before moving on to the CDM configuration piece? If so, what should I do to fix it?

If you look at the updated log webapi.xml posted above, after the server startup in 50149 seconds, it looks like it is trying to complete a task multiple times before it throws the 404 and 405 (this one says not allowed exception). That task is ‘Invalidating execution engine based analysis’.

The endpoint WebAPI/info will give you some statistics about the installation of WebAPI. If that gives you a response, then the service is running.

As far as the errors you are seeing in the logs, the one about ‘invalidating execution engine’ you can probably ignore since you probably do not have an ‘execution engine’ installed…the execution engine is an external module used to execute R-based scripts in an external R session. You probably don’t have that but the startup routine of WebAPI probably tries to invoke the execution engine service blindly.

There isn’t a lot of things you can do with WebAPI/Atlas without configuring some CDM sources, so I would follow the guide for configuring the CDM sources so you can do some simple things like vocabulary searching.

Hi, It has been awhile since I got to get back to this. I am at the end of the initial setup, but I am getting some more 404 errors, but this time with the Atlas url.

http://localhost:8080/WebAPI/source/sources brings back the following which I assume is correct.

Any ideas?

From your /source/sources endpoint, it appears WebAPI is up an running, and you’ve defined a source. So, tables were created and the service is running.

What is not clear is that the URL that you are accessing Atlas (locahost:8080/atlas) is where you placed the HTML app for Atlas. Are you using IIS in windows 10? If so, you should create a new application under the webroot (called atlas) and then you’ll copy the Atlas HTML content fo that root folder. Then you’ll access the application via localhost/atlas (no :8080). port 8080 on localhost is pointing you at the Tomcat/Java servlet container (where atlas runs) if you want IIS to serve the HTML pages, then put it in wwwroot (or create the folder via IIS manager). I think apache tomcat CAN server HTML pages, I just don’t have a lot of familarity with setting that up. THe idea of Atlas and WebAPI is that Atlas can be served from any HTTP service, while WebAPI is hosted in a Java JVM. So, keep those ideas separate when thinking about the Atlas application…what is your web-root serving the Atlas HTML?

It may be as simple as adding /atlas/index.html to the fully qualified URL, but most likely your Atlas HTML pages are not actually located in a location that you an access the app from the URL you specified.

As someone who is not very familiar with creating web servers, is apache server built into tomcat to do that? Is there any documentation that can explain how to configure this without having to use another application to host a web server? Is IIS the easiest way to spin up a web server?

I tried putting the Atlas folder contents in the directory where the war file is, but keep getting a 404 error. Plus I am also getting a warning here that the Apache tomcat native library failed to load. It is weird because I have a 64 bit platform. Is this an issue?

04-Nov-2019 16:15:38.719 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library failed to load. The error reported was [C:\tomcat\apache-tomcat-8.5.43\bin\tcnative-1.dll: Can’t load AMD 64-bit .dll on a IA 32-bit platform]
java.lang.UnsatisfiedLinkError: C:\tomcat\apache-tomcat-8.5.43\bin\tcnative-1.dll: Can’t load AMD 64-bit .dll on a IA 32-bit platform

Not sure about that error, but it sounds bad…some type of compatability between an AMD 64 bit ddl on a IA32-bit platform…are you running windows 95? haha. Maybe the real probem is you installed a 32bit Java…try to uninstall 32 bit java and install 64 bit java. I am guessing this is the issue since you are getting a java.lang.UnsatisfiedLinkError…it’s probably the JVM trying to launch a Tomcat instance to host the WebAPI…but, considering this is a Warning, it’s possible that the error you see is not related to WebAPI…since you saw the /sources endpoint return results…maybe you can ignore this.

As far as hosting HTML pages under tomcat…

based on this, it seems like you can create a .xml file that will act as a ‘deployment descriptor’ that you place into your Catalina folder that will direct requests to /{yourApp} based on the fine called {yourApp}.xml. I haven’t hosted it this way msyelf, but you should read up on the Tomcat 8 documenation to see how this is done. It looks like Tomcat8 can act as a HTTP server.

-Chris

Reading further, this link describes just creating a folder under /webapps (in your case atlas) and then copy the contents of the repository (but not the .git folder) into /webapps/atlas. You should be able to then go to localhost:8080/atlas and it will pull up index.html by default.

t