OHDSI Home | Forums | Wiki | Github

Atlas deployment

Hello all.

I am trying to setup Atlas on my local computer, I am using a Mac with El Capitan and tomcat 6.0.48, so far I have successfully used Achilles to generate AchillesWeb and put it there and works perfectly.

Now… trying first to build my WebAPI, how can I know that it build correctly?

Here is my settings.xml file:

  <profile>
    <id>webapi-oracle</id>
    <properties>             
      <datasource.driverClassName>oracle.jdbc.OracleDriver</datasource.driverClassName>
     <datasource.url>jdbc:oracle:thin:@//myserverIP:1521/myschema</datasource.url>
      <datasource.username>ohdsi_db</datasource.username>
      <datasource.password>ohdsi_pass</datasource.password>
      <datasource.dialect>oracle</datasource.dialect>
      <datasource.ohdsi.schema>ohdsi_db</datasource.ohdsi.schema>
      <flyway.datasource.driverClassName>oracle.jdbc.OracleDriver</flyway.datasource.driverClassName>
      <flyway.datasource.url>jdbc:oracle:thin:@//myserverIP:1521/myschema</flyway.datasource.url>
      <flyway.datasource.username>ohdsi_db</flyway.datasource.username>
      <flyway.datasource.password>ohdsi_pass</flyway.datasource.password>
      <flyway.locations>classpath:db/migration/oracle</flyway.locations>
    </properties>
  </profile>   
</profiles>

Then I run:

mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=ojdbc -DartifactId=ojdbc -Dversion=6.0.0 -Dpackaging=jar
cd ~/MyOHDSIfolder/WebAPI-master/
mvn clean package -s WebAPIConfig/settings.xml -P webapi-oracle

and finally here is the log from the build, which ends in “BUILD SUCCESS”

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Expected root element 'settings' but found 'profile' (position: START_TAG seen   <profile>... @1:11)  @ /MyOHDSIfolder/WebAPI-master/WebAPIConfig/settings.xml, line 1, column 11
[WARNING] 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WebAPI 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ WebAPI ---
[INFO] Deleting /MyOHDSIfolder/WebAPI-master/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ WebAPI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 301 resources
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ WebAPI ---
[INFO] Compiling 276 source files to /MyOHDSIfolder/WebAPI-master/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ WebAPI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ WebAPI ---
[INFO] Compiling 7 source files to /MyOHDSIfolder/WebAPI-master/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ WebAPI ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ WebAPI ---
[INFO] Packaging webapp
[INFO] Assembling webapp [WebAPI] in [/MyOHDSIfolder/WebAPI-master/target/WebAPI]
[INFO] Processing war project
[INFO] Copying webapp resources [/MyOHDSIfolder/WebAPI-master/src/main/webapp]
[INFO] Webapp assembled in [2032 msecs]
[INFO] Building war: /MyOHDSIfolder/WebAPI-master/target/WebAPI.war
[INFO] 
[INFO] --- miredot-plugin:1.5.1:restdoc (default) @ WebAPI ---
[WARNING] Miredot is unable to document the status codes of rest interfaces, unless a statusCodes-block is specified in pom.xml
[INFO] Building reflective model of API and reading annotations...
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.annotation.PostConstruct()
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[class java.lang.Exception], dontRollbackOn=[class org.springframework.dao.EmptyResultDataAccessException])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[INFO] Built.
[INFO] Reading javadoc comments from sourcefiles...
[INFO] Read.
[INFO] Merging reflective and javadoc models...
[WARNING] Limited support for jdk8 (@link, @see, @linkplain javadoc tags won't format properly)
[INFO] Merged.
[INFO] Performing issue analysis...
[INFO] Analysis done.
[INFO] Constructing Html documentation
[WARNING] Could not find html intro file file: miredot.htmlintro.html
[INFO] MireDot: Completed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.403 s
[INFO] Finished at: 2016-11-30T09:28:35-06:00
[INFO] Final Memory: 51M/465M
[INFO] ------------------------------------------------------------------------

When I deploy the war file Atlas doesn’t work and inside the WebAPI folder I just have 2 other folders META-INF and WEB_INF.

So… how can I trace back what I am doing wrong?

Also… more like another question but I will drop it here anyways since is related to the WebAPI, I just saw the tutorial videos from the Symposium, which is amazing, thank you to all for that… and in the OHDSI in a Box there are 2 different Databases, one for CDM and one for WebAPI, is this last one something I need, can it be the same where I have the CDM? Any information about this “extra” DB will be appreciated.

Thanks again.

EV

Hi, @Emanuel_Villa,
I’d like to take just a step back for a second and confirm you have your WebAPI set up correctly… This might be a typo in the install documentation found here: http://www.ohdsi.org/web/wiki/doku.php?id=documentation:software:webapi:setup, but it looks like your settings.xml file is malformed. It should start with:

  <profiles>
    <profile>
...
...
    </profile>  
  </profiles>

according to the documentation, so your example you gave me looks malformed, but beyond that it looks like the warning says that the settings.xml file should begin with:

<settings>
  <profiles>
    <profile>
...
...
    </profile>  
  </profiles>
</settings>

Could you rerun the mvn command with the updated settings.xml file that is well formed, and if it clears the warning where it expected a starting tag of ‘settings’ then I will update the wiki documentation with the correct example.

Once you think you have WebAPI started up, there’s REST urls you can access in a browser to confirm the WebAPI is operating properly, such as localhost:8080/WebAPI/source/sources . The documentation has the details on verifying your istallation.

Once you confirm that, we can talk about where to put the Atlas folder. @Rijnbeek has some experience about setting up the website so that WebAPI is installed in one location and the Atlas files go under the web root (not under WebAPI!). Think of the /WebAPI folder as where all the server side code goes, and separately there’s a /atlas folder where you put the client code (javascript and HTML files). These are different things and don’t get bundled together under the same directory.

-Chris

Thanks Chris, that seems to help a little, the WebAPI is still not working though, here is the new log when creating the war file:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building WebAPI 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ WebAPI ---
[INFO] Deleting /MyOHDSIfolder/WebAPI-master/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ WebAPI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 301 resources
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ WebAPI ---
[INFO] Compiling 276 source files to /MyOHDSIfolder/WebAPI-master/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ WebAPI ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ WebAPI ---
[INFO] Compiling 7 source files to /MyOHDSIfolder/WebAPI-master/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ WebAPI ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ WebAPI ---
[INFO] Packaging webapp
[INFO] Assembling webapp [WebAPI] in [/MyOHDSIfolder/WebAPI-master/target/WebAPI]
[INFO] Processing war project
[INFO] Copying webapp resources [/MyOHDSIfolder/WebAPI-master/src/main/webapp]
[INFO] Webapp assembled in [1590 msecs]
[INFO] Building war: /MyOHDSIfolder/WebAPI-master/target/WebAPI.war
[INFO] 
[INFO] --- miredot-plugin:1.5.1:restdoc (default) @ WebAPI ---
[WARNING] Miredot is unable to document the status codes of rest interfaces, unless a statusCodes-block is specified in pom.xml
[INFO] Building reflective model of API and reading annotations...
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.annotation.PostConstruct()
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[class java.lang.Exception], dontRollbackOn=[class org.springframework.dao.EmptyResultDataAccessException])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @javax.transaction.Transactional(value=REQUIRED, rollbackOn=[], dontRollbackOn=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=true, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[WARNING] Unknown annotation on service method: skipped @org.springframework.transaction.annotation.Transactional(propagation=REQUIRED, rollbackForClassName=[], isolation=DEFAULT, readOnly=false, noRollbackFor=[], noRollbackForClassName=[], value=, timeout=-1, rollbackFor=[])
[INFO] Built.
[INFO] Reading javadoc comments from sourcefiles...
[INFO] Read.
[INFO] Merging reflective and javadoc models...
[WARNING] Limited support for jdk8 (@link, @see, @linkplain javadoc tags won't format properly)
[INFO] Merged.
[INFO] Performing issue analysis...
[INFO] Analysis done.
[INFO] Constructing Html documentation
[WARNING] Could not find html intro file file: miredot.htmlintro.html
[INFO] MireDot: Completed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.757 s
[INFO] Finished at: 2016-11-30T14:56:08-06:00
[INFO] Final Memory: 51M/526M
[INFO] ------------------------------------------------------------------------

Hope you can help.

Thanks.

EV

Ok, that build message looks cleaner now so the .war is probably built with all the correct settings now.

Next step: deploying the .war file. mvn did the build (apologies if I’m stating the obvious) but after the war is built (should be found in a /target subdirectory from your build location) you’ll need to take specific steps to deploy it to the Tomcat service. Now I have some experience with Tomcat, but not on a Mac, and Tomcat is up to 8.0 and you’re saying you have Tomcat 6.0 Maybe it’s something you can update, or maybe the mac version only goes up to 6? Don’t know, but the next question I have is: how have you deployed the WAR file to tomcat?

If you have done this, you should be able to to look at the log files that tomcat produces. Most likely cause of your problem is that the JDBC connection strings or user/password you’re using is incorrect so during startup it can’t make the necessary db connections. But that’s just my guess (and a very common first problem you encounter).

-Chris

t