Error deploying ODKAggregate,war file in apache tomcat

I used tomcat 6, ODKAggregate1.4.4 , JDK 7, MySQL server 5.6.
When I try to start the /ODKAggregate in manager.html , i get FAIL- application at context /ODKAggregate could not be started . Though I added my mysqlconnector,jar I get this error. and not able to access the ODKAggregate page, I get 404 error.

My tomcat log filecatalina log.txt (3.3 KB)

ODK Aggregate v1.4.4 five years old and unsupported. Please use the most recent version. https://github.com/opendatakit/aggregate/releases/latest (currently v2.0.0).

Previously I installed aggregatev2.0 with the combination of
-mysql 5.5
-tomcat 8.5
-java 8
I had the same problem. when I try to start /ODKAggregate in manager.html , I got the error

FAIL- application at context /ODKAggregate could not be started .And I got 404 error when I hit the url
http://myIP:8080/ODKAggregate.

So, that's why tried installing aggregate 1.4.4.

Please tell me the components along with their versions which will make the ODKAggregate.war get deployed. I don't know where the problem occurs. Please help me.

See https://docs.opendatakit.org/aggregate-deployment-planning/#component-versions

Did you check your Catalina.out log file? It should be in /opt/tomcat/logs/ somewhere.

I posted about a bug in version 2.0 yesterday, if you are getting the same error in the logs then we probably have a common problem:

Feb 28, 2019 1:44:50 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [odk-settings.xml]: Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}"
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:223)

  • I am using Postgres as opposed to MySQL though.

  • Although I was able to get past this issue and have Aggregate load up in my browser, more bugs appeared and this time it was complaining something about XSRF Tokens in the tomcat logs, or Cross Site Scripting Attack, which would cause the browser to keep refreshing, or prevent the ability to save any changes, enable or disable forms, add users, change passwords etc... I put detailed instructions on my other post.

  • I was trying to go from v1.7.0 to v2.0.0 following the guide and installing each release at a time so v1.7.1 v2.0.0 beta etc...

  • Finally got fed up and decided to stick with v1.7.1 as v2.0.0 has lots of bugs its not ready yet, there had been major changes in the code base

Let me know if you are getting a similar error in Catalina.out

1 Like

I did the changes which you had mentioned in your previous post. ( adding jdbc.driverclassName and jdbc.resource) Thanks a lot. Now /ODKAggregate is in running status . But when I hit the url
http://myIP:8080/ODKAggregate once again I get 404 error.

Here is my log file

02-Mar-2019 18:47:35.178 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Java\jdk1.7.0_01\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;"JAVAFX_HOME\bin;";C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\Java\jdk1.7.0_01\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_201\bin;C:\Program Files\Java\jre1.8.0_201\bin;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.]
02-Mar-2019 18:47:35.420 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-192.168.0.164-8080"]
02-Mar-2019 18:47:35.740 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Mar-2019 18:47:35.759 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
02-Mar-2019 18:47:35.762 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Mar-2019 18:47:35.762 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1042 ms
02-Mar-2019 18:47:35.787 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Mar-2019 18:47:35.787 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.38
02-Mar-2019 18:47:35.808 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ODKAggregate.war]
02-Mar-2019 18:47:39.777 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Mar-2019 18:47:39.832 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ODKAggregate.war] has finished in [4,023] ms
02-Mar-2019 18:47:39.832 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs]
02-Mar-2019 18:47:40.161 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Mar-2019 18:47:40.175 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs] has finished in [342] ms
02-Mar-2019 18:47:40.175 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager]
02-Mar-2019 18:47:40.496 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Mar-2019 18:47:40.506 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager] has finished in [331] ms
02-Mar-2019 18:47:40.506 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT]
02-Mar-2019 18:47:40.783 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Mar-2019 18:47:40.783 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT] has finished in [277] ms

If u are able to work with v1.7.0 perfectly , please tell me the link where I could download that software and also please tell me the component softwares along with their version which u installed. I mean - JDK, JRE version, Tomcat version, PostgreSQL or MySQL version

I think you are getting the 404 because it is redirecting to http://site/Aggregate.html, when that happens you either get a 404, or the page loads only halfway and then complain about a permissions issue (You do not have permission for this action. Error: Invalid request).

The TLD messages in your logs are only information, so they can safely be ignored.

Try going to http://site/ODKAggregate/Aggregate.html

  • It might also keep on refreshing, if this happens, clear your cookies and cache, restart your browser and try again. The /index.html by default goes to /Aggregate.html yet the README tells you to go to ODKAggregate/Aggregate.html I don't know if this is another bug they never fixed.

JDK, JRE version, Tomcat version, PostgreSQL or MySQL version

For 1.7.0 or 1.7.1 on my server

  • OS: Ubuntu 18.04.1
  • JDK: OpenJDK 1.8.0_191 (JRE is included with JDK)
  • Tomcat: 8.5.34
  • Postgres: 10.6

Let me know if your 2.0 version works. For me when I tried to save any changes like enable form submissions or add user the Catalina.out keeps on showing this error (that I why I went back to 1.7.1):

Mar 04, 2019 1:48:38 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.google.gwt.user.client.rpc.XsrfToken com.google.gwt.user.client.rpc.XsrfTokenService.getNewXsrfToken()' threw an unexpected exception: java.lang.IllegalArgumentException: Duplicate cookie! Cookie override attack?

Version 1.7.1 also does this under Internet Explorer (tried clearing cache / cookies to no avail), but works fine in Google Chrome / Firefox

here are the links to v1.7.1 and v1.7.0

Thanks Achim :slight_smile: I will try v2.0 once again and let u know what is the error I get.
I somehow browsed and got the installer for Aggregate v.1.7.7 .
I am using

windows 10
tomcat 8.5
jdk 8
mysql 5.6( it also works with postgresql 9.2.4)

Now when I deploy the war file, the page automatically redirects to http://site/ODKAggregate/Aggregate.html.

While deploying the war and accessing the aggregate site, I use the URL as http://myIPadd:8080/ODKAggregate

At this point I have problem connecting my ODK collect app and ODK Aggregate installed on tomcat.
I have added my XML form in the ODK site after logging in. I keep the XML form for data collection in my device's internal storage.I am able to fill the form, edit it etc. When I try to select the filled form and upload it to server ( SELECT THE REQUIRED FORM AND CLICK 'send selected') , I get Error : client Protocol Exception

Please tell me what is to be given as submission url entry under general settings->server->ODKAggregate settings ?

For username I give the ODK super user username which I used to login to aggregate site and password I give the default password aggregate

Please tell me what should be given in submission URL, username, password and also the SUBMISSION ACTION value in the XML form used for data collection?

In collect app, for submission url, I give http://myIPadd:8080/ODKAggregate/submission
I give the following in XML form

Is the code of ODK COLLECT to be edited a little for the form upload to work? Because in code by default , the URL of ODKAggregate is given in ODK Aggregate settings. And the username and password are left blank.

I also disabled the 'data collector' permission for 'anonymous user' and hit save. But still I am not able to send the form.
Also tell me how to view the submissions from collect app.

As of now I am testing my app with local server, once I get the server (static IP address, I should use that URL only). Please add your points on it too.

Thanks in advance

On my ODK Collect App the URL is simply http://myIPAdd:8080 or https://myIPAdd:8443 (if you use 8443 as your SSL Port).

As for the username and password, you could test using the default admin account. See if that works.

Hope this helps!

A post was split to a new topic: Aggregate refreshed indefinitely

A post was split to a new topic: How will the data be stored in database