OHDSI Home | Forums | Wiki | Github

Could not start WebAPI on Tomcat (ATLAS)

(Chris Knoll) #21

It looks like you didn’t provide a local settings.xml and then pass the path to the settings XML as part of your mvn command. The documents describe this here.


Thank you Chris, I have provided the settings.xml for postgreSQL as am using the postgreSQL database but the application wont deploy in the tomcat. And the WebApi.war build does not update the password as set in the settings.xml.

<security.db.datasource.password>${datasource.password}</security.db.datasource.password> <security.db.datasource.authenticationQuery>select password from ${security.db.datasource.schema}.users where lower(email) = lower(?)</security.db.datasource.authenticationQuery>

I also tried changing the above lines with the correct username and password but it did not work. Kindly help.

(Chris Knoll) #23

I’m sorry, I’m not sure what I can do to help. The core of the problem is the values in your settings is not being reflected in the final application.properties file, and I don’t expect the application to work until the values get populated properly.

I’d double check your work and try to figure out why it’s not populating in your environment. Many other people have followed the instructions and managed to get their local settings configured, so I’m fairly certain the issue is on your side.

If anyone else in the community has experience with configuring a WebAPI on postgresql, please share your experiences / points of failure and maybe it will help @EdnahM.


Hi @Chris_Knoll , thanks for the help.

I changed my pom.xml to be same as the settings.xml as the .war file was building from the configurations in the pom.xml file and it worked.

The only issues it did not add the sources to the database.

“the current webapi has no sources defined.
please add one or more on configuration page.”

This is what am trying to figure out why.

Thank You.

(mintmountain89) #25

Hi @EdnahM

I had similar issues deploying using the settings.xml file too. You can try some of these tips so that the .war file gets built from the settings.xml file.

  1. Check that the correct settings are specified when running the mvn build command, for example if using postgresql, {profile id} in the maven command will be webapi-postgresql:

C:\Git\OHDSI\WebAPI> mvn clean package -DskipTests -s WebAPIConfig/settings.xml -P {profile id}

In the settings.xml file, there are different sections for different settings like postgresql, oracle etc, so another thing you may want to check is whether you have edited the section for the profile you want (i.e. webapi-postgresql)

  1. Make sure the folder name is spelt correctly, case matches, etc. For example in the above example the settings.xml file is stored in a folder called WebAPIConfig, that is located in C:\Git\OHDSI\WebAPI

  2. Edit the settings.xml file using a text editor instead of word editor. I had error building because I saved the settings.xml in a word editor.

  3. After running the maven build command, one way to check if it has successfully taken in the settings.xml is to look out for any error message that the settings.xml file cannot be located, or if there is error reading from the xml file. Usually this error message appears shortly after you run the build. If you see that message, it means the settings.xml file has not been used.

Hope this helps!
Hui Xing


Hi @hui_xing_tan

I have counterchecked my settings.xml and the case together with the command am using to build my webAPI.war file.

It seems its reading my settings.xml file as it shows the following warning message on running the command, but it doesn’t use the password I set in the settings.xml file instead its using the pom.xml file.

[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: ‘profile’ (position: START_TAG seen …\r\n … @7:11) @ C:\Users\edna\Desktop\WebAPI\WebAPIConfig\settings.xml, line 7, column 11

But still I haven’t figured out why its not having any sources added to my database.

I still have this when accessing the data sources or any part of the ATLAS.

application initialization failed

the current webapi has no sources defined.
please add one or more on configuration page.

Thank you.

(Chris Knoll) #27

Did you follow these instructions?


Thanks so much for this, I hadn’t followed the CDM-configuration. I am still configuring the Achilles.

Plus on the issue of settings.xml. I was able to generate the webAPI.war file from the settings.xml instead of the pom.xml by using the latest webAPI version 2.9.0 and it created the tables in the database.

Thanks alot @Chris_Knoll , @hui_xing_tan