Deployment Help Needed - Aggregate 1.4.13 on Tomcat 8.0

Whenever I go to the webpage where ODK Aggregate is supposed to be, it just
gives me back a blank page.

Looking at the Tomcat Manager, the ODK Aggregate application isn't running.
Trying to start it gives the message: "FAIL - Application at context path /
could not be started". (I've set ODK Aggregate to ROOT.war in the Tomcat
webapps folder)

What I think are the relevant lines in the catalina.out log are these:

INFO: Initializing ExecutorService 'task_scheduler'
Inside setServletContextafterPropertiesSet WATCHDOG TASK IN TOMCAT
Mar 06, 2017 2:18:08 PM org.opendatakit.common.security.spring.
RoleHierarchyImpl refreshReachableGrantedAuthorities
INFO: Executing: refreshReachableGrantedAuthorities
Mar 06, 2017 2:18:11 PM org.opendatakit.common.security.spring.
RoleHierarchyImpl refreshReachableGrantedAuthorities
WARNING: Datastore failure: refreshReachableGrantedAuthorities -- adjusting
retry time
Mar 06, 2017 2:18:11 PM org.springframework.web.context.support.
XmlWebApplicationContext refresh
WARNING: Exception encountered during context initialization - cancelling
refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'hierarchicalRoleRelationships' defined in
ServletContext resource [/WEB-INF/applicationContext-security.xml]:
Invocation of init method failed; nested exception is org.opendatakit.common
.persistence.exception.ODKDatastoreException: org.springframework.
transaction.CannotCreateTransactionException: Could not open JDBC Connection
for transaction; nested exception is java.sql.SQLException: Cannot create
PoolableConnectionFactory (validationQuery didn't return a row)
Mar 06, 2017 2:18:11 PM
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler shutdown
INFO: Shutting down ExecutorService 'task_scheduler'
Mar 06, 2017 2:18:11 PM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'hierarchicalRoleRelationships' defined in ServletContext
resource [/WEB-INF/applicationContext-security.xml]: Invocation of init
method failed; nested exception is
org.opendatakit.common.persistence.exception.ODKDatastoreException:
org.springframework.transaction.CannotCreateTransactionException: Could not
open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.initializeBean(
AbstractAutowireCapableBeanFactory.java:1583)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.doCreateBean(
AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.createBean(
AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.
getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.
DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
230)
at org.springframework.beans.factory.support.AbstractBeanFactory.
doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:754)
at org.springframework.context.support.AbstractApplicationContext.
finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.
refresh(AbstractApplicationContext.java:542)
at org.springframework.web.context.ContextLoader.
configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at org.springframework.web.context.ContextLoader.
initWebApplicationContext(ContextLoader.java:326)
at org.springframework.web.context.ContextLoaderListener.
contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(
StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.opendatakit.common.persistence.exception.
ODKDatastoreException: org.springframework.transaction.
CannotCreateTransactionException: Could not open JDBC Connection for
transaction; nested exception is java.sql.SQLException: Cannot create
PoolableConnectionFactory (validationQuery didn't return a row)
at
org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.assertRelation(DatastoreImpl.java:650)
at
org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.assertRelation(GrantedAuthorityHierarchyTable.java:115)
at
org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.getEntireGrantedAuthorityHierarchy(GrantedAuthorityHierarchyTable.java:186)
at
org.opendatakit.common.security.spring.RoleHierarchyImpl.buildRolesReachableInOneStepMap(RoleHierarchyImpl.java:464)
at
org.opendatakit.common.security.spring.RoleHierarchyImpl.refreshReachableGrantedAuthorities(RoleHierarchyImpl.java:281)
at
org.opendatakit.common.security.spring.RoleHierarchyImpl.afterPropertiesSet(RoleHierarchyImpl.java:132)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
... 25 more
Caused by:
org.springframework.transaction.CannotCreateTransactionException: Could not
open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.
doBegin(DataSourceTransactionManager.java:252)
at org.springframework.transaction.support.
AbstractPlatformTransactionManager.getTransaction(
AbstractPlatformTransactionManager.java:373)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.
assertRelation(DatastoreImpl.java:506)
... 32 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (validationQuery
didn't return a row)
at
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)
at
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
at
org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:211)
... 34 more
Caused by: java.sql.SQLException: validationQuery didn't return a row
at org.apache.commons.dbcp2.PoolableConnection.validate(
PoolableConnection.java:303)
at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection
(PoolableConnectionFactory.java:357)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(
BasicDataSource.java:2307)
at org.apache.commons.dbcp2.BasicDataSource.
createPoolableConnectionFactory(BasicDataSource.java:2290)
... 37 more

Mar 06, 2017 2:18:11 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'hierarchicalRoleRelationships' defined in ServletContext
resource [/WEB-INF/applicationContext-security.xml]: Invocation of init
method failed; nested exception is org.opendatakit.common.persistence.
exception.ODKDatastoreException: org.springframework.transaction.
CannotCreateTransactionException: Could not open JDBC Connection for
transaction; nested exception is java.sql.SQLException: Cannot create
PoolableConnectionFactory (validationQuery didn't return a row)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by:
org.opendatakit.common.persistence.exception.ODKDatastoreException:
org.springframework.transaction.CannotCreateTransactionException: Could not
open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.
assertRelation(DatastoreImpl.java:650)
at org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable
.assertRelation(GrantedAuthorityHierarchyTable.java:115)
at org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable
.getEntireGrantedAuthorityHierarchy(GrantedAuthorityHierarchyTable.java:186)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.
buildRolesReachableInOneStepMap(RoleHierarchyImpl.java:464)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.
refreshReachableGrantedAuthorities(RoleHierarchyImpl.java:281)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.
afterPropertiesSet(RoleHierarchyImpl.java:132)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.invokeInitMethods(
AbstractAutowireCapableBeanFactory.java:1642)
at org.springframework.beans.factory.support.
AbstractAutowireCapableBeanFactory.initializeBean(
AbstractAutowireCapableBeanFactory.java:1579)
... 25 more
Caused by: org.springframework.transaction.CannotCreateTransactionException:
Could not open JDBC Connection for transaction; nested exception is java.sql
.SQLException: Cannot create PoolableConnectionFactory (validationQuery didn't
return a row)
at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:252)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at
org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.assertRelation(DatastoreImpl.java:506)
... 32 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.apache.commons.dbcp2.BasicDataSource.
createPoolableConnectionFactory(BasicDataSource.java:2294)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(
BasicDataSource.java:2039)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(
BasicDataSource.java:1533)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.
doBegin(DataSourceTransactionManager.java:211)
... 34 more
Caused by: java.sql.SQLException: validationQuery didn't return a row
at
org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:303)
at
org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357)
at
org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2307)
at
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
... 37 more

06-Mar-2017 14:18:11.322 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal One or more
listeners failed to start. Full details will be found in the appropriate
container log file
Mar 06, 2017 2:18:11 PM org.apache.catalina.util.SessionIdGeneratorBase
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [271] milliseconds.
06-Mar-2017 14:18:11.667 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Context startup
failed due to previous errors
Mar 06, 2017 2:18:11 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
06-Mar-2017 14:18:11.906 WARNING [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The
web application [ROOT] registered the JDBC driver [org.postgresql.Driver]
but failed to unregister it when the web application was stopped. To
prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Any help would be appreciated! I've been wrestling with this problem for a
while and can't find what's wrong.

I've tried the following things:

  1. Re-installed Tomcat 8.0.41
  2. Ran through the ODK Aggregate 1.4.13 setup several times to make new
    ODKAggregate.war files
  3. Did a DROP DATABASE and DROP ROLE for odk_prod and odk_user in
    postgres then ran the create_db_and_user.sql again
  4. Pointed my Tomcat JVM version (via setenv.sh) from jre 1.8.0_91 to
    java-7-oracle, java-8-oracle, and java-7-openjdk-amd64
  5. Placed the JDBC drivers postgresql-42.0.0.jar and
    mysql-connector-java-5.1.41-bin.jar in the Tomcat lib folder

Other information:

  1. I'm on Ubuntu 14.04.5 LTS
  2. I'm using PostgreSQL 9.6.2
  3. The JRE I'm using is JRE 1.8.0_91-b14
  4. The set-up I was using before that worked just fine was ODK Aggregate
    1.4.11 on Tomcat 6.0.45

This is apparently an issue with permissions to the information_schema in
PostgreSQL.

We have only tested Aggregate 1.4.13 on PostgreSQL 9.4 where this problem
does not exist.

The apparent fix is to execute an additional grant in the
create_db_and_user.sql script.

I believe the missing command (you will need to replace the database and
user names with the ones appropriate for your installation) is:

alter database "odk_prod_db" owner to "odk_prod";

Mitch

··· On Sun, Mar 5, 2017 at 11:39 PM, Roddiek Cuyno wrote:

Whenever I go to the webpage where ODK Aggregate is supposed to be, it
just gives me back a blank page.

Looking at the Tomcat Manager, the ODK Aggregate application isn't
running. Trying to start it gives the message: "FAIL - Application at
context path / could not be started". (I've set ODK Aggregate to ROOT.war
in the Tomcat webapps folder)

What I think are the relevant lines in the catalina.out log are these:

INFO: Initializing ExecutorService 'task_scheduler'
Inside setServletContextafterPropertiesSet WATCHDOG TASK IN TOMCAT
Mar 06, 2017 2:18:08 PM org.opendatakit.common.security.spring.
RoleHierarchyImpl refreshReachableGrantedAuthorities
INFO: Executing: refreshReachableGrantedAuthorities
Mar 06, 2017 2:18:11 PM org.opendatakit.common.security.spring.
RoleHierarchyImpl refreshReachableGrantedAuthorities
WARNING: Datastore failure: refreshReachableGrantedAuthorities --
adjusting retry time
Mar 06, 2017 2:18:11 PM org.springframework.web.context.support.
XmlWebApplicationContext refresh
WARNING: Exception encountered during context initialization - cancelling
refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'hierarchicalRoleRelationships' defined in
ServletContext resource [/WEB-INF/applicationContext-security.xml]:
Invocation of init method failed; nested exception is org.opendatakit.
common.persistence.exception.ODKDatastoreException: org.springframework.
transaction.CannotCreateTransactionException: Could not open JDBC
Connection for transaction; nested exception is java.sql.SQLException:
Cannot create PoolableConnectionFactory (validationQuery didn't return a
row)
Mar 06, 2017 2:18:11 PM org.springframework.scheduling
.concurrent.ThreadPoolTaskScheduler shutdown
INFO: Shutting down ExecutorService 'task_scheduler'
Mar 06, 2017 2:18:11 PM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'hierarchicalRoleRelationships' defined in ServletContext
resource [/WEB-INF/applicationContext-security.xml]: Invocation of init
method failed; nested exception is org.opendatakit.common.persist
ence.exception.ODKDatastoreException: org.springframework.transactio
n.CannotCreateTransactionException: Could not open JDBC Connection for
transaction; nested exception is java.sql.SQLException: Cannot create
PoolableConnectionFactory (validationQuery didn't return a row)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
1583)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.
getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBe
anRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.
doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.
getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBea
nFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
at org.springframework.context.support.AbstractApplicationContext.
finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.
refresh(AbstractApplicationContext.java:542)
at org.springframework.web.context.ContextLoader.configureAndRe
freshWebApplicationContext(ContextLoader.java:444)
at org.springframework.web.context.ContextLoader.initWebApplica
tionContext(ContextLoader.java:326)
at org.springframework.web.context.ContextLoaderListener.contex
tInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(Stand
ardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(Stand
ardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145
)
at org.apache.catalina.core.ContainerBase.addChildInternal(Cont
ainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:
940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.
java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
Executor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
lExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.opendatakit.common.persistence.exception.ODKDatastoreExc
eption: org.springframework.transaction.CannotCreateTransactionException:
Could not open JDBC Connection for transaction; nested exception is java.
sql.SQLException: Cannot create PoolableConnectionFactory (validationQuery
didn't return a row)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImp
l.assertRelation(DatastoreImpl.java:650)
at org.opendatakit.common.security.spring.GrantedAuthorityHiera
rchyTable.assertRelation(GrantedAuthorityHierarchyTable.java:115)
at org.opendatakit.common.security.spring.GrantedAuthorityHiera
rchyTable.getEntireGrantedAuthorityHierarchy(GrantedAuthorit
yHierarchyTable.java:186)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.bui
ldRolesReachableInOneStepMap(RoleHierarchyImpl.java:464)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.ref
reshReachableGrantedAuthorities(RoleHierarchyImpl.java:281)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.aft
erPropertiesSet(RoleHierarchyImpl.java:132)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.invokeInitMethods(AbstractAuto
wireCapableBeanFactory.java:1642)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.initializeBean(AbstractAutowir
eCapableBeanFactory.java:1579)
... 25 more
Caused by: org.springframework.transaction.CannotCreateTransactionException:
Could not open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.
doBegin(DataSourceTransactionManager.java:252)
at org.springframework.transaction.support.AbstractPlatformTran
sactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.
assertRelation(DatastoreImpl.java:506)
... 32 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConne
ctionFactory(BasicDataSource.java:2294)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(Ba
sicDataSource.java:2039)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(Basic
DataSource.java:1533)
at org.springframework.jdbc.datasource.DataSourceTransactionMan
ager.doBegin(DataSourceTransactionManager.java:211)
... 34 more
Caused by: java.sql.SQLException: validationQuery didn't return a row
at org.apache.commons.dbcp2.PoolableConnection.validate(Poolabl
eConnection.java:303)
at org.apache.commons.dbcp2.PoolableConnectionFactory.validateC
onnection(PoolableConnectionFactory.java:357)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(
BasicDataSource.java:2307)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConne
ctionFactory(BasicDataSource.java:2290)
... 37 more

Mar 06, 2017 2:18:11 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance
of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'hierarchicalRoleRelationships' defined in ServletContext
resource [/WEB-INF/applicationContext-security.xml]: Invocation of init
method failed; nested exception is org.opendatakit.common.persistence.
exception.ODKDatastoreException: org.springframework.transaction.
CannotCreateTransactionException: Could not open JDBC Connection for
transaction; nested exception is java.sql.SQLException: Cannot create
PoolableConnectionFactory (validationQuery didn't return a row)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.initializeBean(AbstractAutowir
eCapableBeanFactory.java:1583)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactor
y$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBe
anRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactor
y.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactor
y.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBea
nFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
at org.springframework.context.support.AbstractApplicationConte
xt.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationConte
xt.refresh(AbstractApplicationContext.java:542)
at org.springframework.web.context.ContextLoader.configureAndRe
freshWebApplicationContext(ContextLoader.java:444)
at org.springframework.web.context.ContextLoader.initWebApplica
tionContext(ContextLoader.java:326)
at org.springframework.web.context.ContextLoaderListener.contex
tInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(Stand
ardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(Stand
ardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.
java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(Cont
ainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBas
e.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.
java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.
java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostCon
fig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(
Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
Executor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
lExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.opendatakit.common.persistence.exception.ODKDatastoreException:
org.springframework.transaction.CannotCreateTransactionException: Could
not open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.
assertRelation(DatastoreImpl.java:650)
at org.opendatakit.common.security.spring.GrantedAuthorityHiera
rchyTable.assertRelation(GrantedAuthorityHierarchyTable.java:115)
at org.opendatakit.common.security.spring.GrantedAuthorityHiera
rchyTable.getEntireGrantedAuthorityHierarchy(GrantedAuthorit
yHierarchyTable.java:186)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.bui
ldRolesReachableInOneStepMap(RoleHierarchyImpl.java:464)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.ref
reshReachableGrantedAuthorities(RoleHierarchyImpl.java:281)
at org.opendatakit.common.security.spring.RoleHierarchyImpl.aft
erPropertiesSet(RoleHierarchyImpl.java:132)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java
:1642)
at org.springframework.beans.factory.support.AbstractAutowireCa
pableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
1579)
... 25 more
Caused by: org.springframework.transaction.CannotCreateTransactionExcep
tion: Could not open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Cannot create PoolableConnectionFactory (validationQuery
didn't return a row)
at org.springframework.jdbc.datasource.DataSourceTransactionMan
ager.doBegin(DataSourceTransactionManager.java:252)
at org.springframework.transaction.support.AbstractPlatformTran
sactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.opendatakit.common.persistence.engine.pgres.DatastoreImp
l.assertRelation(DatastoreImpl.java:506)
... 32 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory
(validationQuery didn't return a row)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConne
ctionFactory(BasicDataSource.java:2294)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(Ba
sicDataSource.java:2039)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(Basic
DataSource.java:1533)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.
doBegin(DataSourceTransactionManager.java:211)
... 34 more
Caused by: java.sql.SQLException: validationQuery didn't return a row
at org.apache.commons.dbcp2.PoolableConnection.validate(Poolabl
eConnection.java:303)
at org.apache.commons.dbcp2.PoolableConnectionFactory.validateC
onnection(PoolableConnectionFactory.java:357)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionF
actory(BasicDataSource.java:2307)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConne
ctionFactory(BasicDataSource.java:2290)
... 37 more

06-Mar-2017 14:18:11.322 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal One or more
listeners failed to start. Full details will be found in the appropriate
container log file
Mar 06, 2017 2:18:11 PM org.apache.catalina.util.SessionIdGeneratorBase
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [271] milliseconds.
06-Mar-2017 14:18:11.667 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Context startup
failed due to previous errors
Mar 06, 2017 2:18:11 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
06-Mar-2017 14:18:11.906 WARNING [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The
web application [ROOT] registered the JDBC driver [org.postgresql.Driver]
but failed to unregister it when the web application was stopped. To
prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Any help would be appreciated! I've been wrestling with this problem for a
while and can't find what's wrong.

I've tried the following things:

  1. Re-installed Tomcat 8.0.41
  2. Ran through the ODK Aggregate 1.4.13 setup several times to make
    new ODKAggregate.war files
  3. Did a DROP DATABASE and DROP ROLE for odk_prod and odk_user in
    postgres then ran the create_db_and_user.sql again
  4. Pointed my Tomcat JVM version (via setenv.sh) from jre 1.8.0_91 to
    java-7-oracle, java-8-oracle, and java-7-openjdk-amd64
  5. Placed the JDBC drivers postgresql-42.0.0.jar and
    mysql-connector-java-5.1.41-bin.jar in the Tomcat lib folder

Other information:

  1. I'm on Ubuntu 14.04.5 LTS
  2. I'm using PostgreSQL 9.6.2
  3. The JRE I'm using is JRE 1.8.0_91-b14
  4. The set-up I was using before that worked just fine was ODK
    Aggregate 1.4.11 on Tomcat 6.0.45

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hi, Mitch!

That command is already in the create_db_and_user.sql script. I ran it
again but there's no change.

However, your advice helped me figure out an alternative, that maybe the
permission problem itself was with the schema instead of the database. So I
did:

\c "odk_prod_db"
alter schema "odk_prod_schema" owner to "odk_prod";

And that seemed to work!

Thank you very much for your help.

··· On Tuesday, March 7, 2017 at 2:15:50 AM UTC+8, Mitch Sundt wrote: > > This is apparently an issue with permissions to the information_schema in > PostgreSQL. > > We have only tested Aggregate 1.4.13 on PostgreSQL 9.4 where this problem > does not exist. > > The apparent fix is to execute an additional grant in the > create_db_and_user.sql script. > > I believe the missing command (you will need to replace the database and > user names with the ones appropriate for your installation) is: > > alter database "odk_prod_db" owner to "odk_prod"; > > Mitch > > On Sun, Mar 5, 2017 at 11:39 PM, Roddiek Cuyno <rodc...@gmail.com > wrote: > >> Whenever I go to the webpage where ODK Aggregate is supposed to be, it >> just gives me back a blank page. >> >> Looking at the Tomcat Manager, the ODK Aggregate application isn't >> running. Trying to start it gives the message: "FAIL - Application at >> context path / could not be started". (I've set ODK Aggregate to ROOT.war >> in the Tomcat webapps folder) >> >> What I think are the relevant lines in the catalina.out log are these: >> >> INFO: Initializing ExecutorService 'task_scheduler' >> Inside setServletContextafterPropertiesSet WATCHDOG TASK IN TOMCAT >> Mar 06, 2017 2:18:08 PM org.opendatakit.common.security.spring. >> RoleHierarchyImpl refreshReachableGrantedAuthorities >> INFO: Executing: refreshReachableGrantedAuthorities >> Mar 06, 2017 2:18:11 PM org.opendatakit.common.security.spring. >> RoleHierarchyImpl refreshReachableGrantedAuthorities >> WARNING: Datastore failure: refreshReachableGrantedAuthorities -- >> adjusting retry time >> Mar 06, 2017 2:18:11 PM org.springframework.web.context.support. >> XmlWebApplicationContext refresh >> WARNING: Exception encountered during context initialization - >> cancelling refresh attempt: org.springframework.beans.factory. >> BeanCreationException: Error creating bean with name >> 'hierarchicalRoleRelationships' defined in ServletContext resource [ >> /WEB-INF/applicationContext-security.xml]: Invocation of init method >> failed; nested exception is org.opendatakit.common.persistence.exception. >> ODKDatastoreException: org.springframework.transaction. >> CannotCreateTransactionException: Could not open JDBC Connection for >> transaction; nested exception is java.sql.SQLException: Cannot create >> PoolableConnectionFactory (validationQuery didn't return a row) >> Mar 06, 2017 2:18:11 PM >> org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler shutdown >> INFO: Shutting down ExecutorService 'task_scheduler' >> Mar 06, 2017 2:18:11 PM org.springframework.web.context.ContextLoader >> initWebApplicationContext >> SEVERE: Context initialization failed >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean with name 'hierarchicalRoleRelationships' defined in ServletContext >> resource [/WEB-INF/applicationContext-security.xml]: Invocation of init >> method failed; nested exception is >> org.opendatakit.common.persistence.exception.ODKDatastoreException: >> org.springframework.transaction.CannotCreateTransactionException: Could not >> open JDBC Connection for transaction; nested exception is >> java.sql.SQLException: Cannot create PoolableConnectionFactory >> (validationQuery didn't return a row) >> at org.springframework.beans.factory.support. >> AbstractAutowireCapableBeanFactory.initializeBean( >> AbstractAutowireCapableBeanFactory.java:1583) >> at org.springframework.beans.factory.support. >> AbstractAutowireCapableBeanFactory.doCreateBean( >> AbstractAutowireCapableBeanFactory.java:553) >> at org.springframework.beans.factory.support. >> AbstractAutowireCapableBeanFactory.createBean( >> AbstractAutowireCapableBeanFactory.java:482) >> at org.springframework.beans.factory.support.AbstractBeanFactory$1. >> getObject(AbstractBeanFactory.java:306) >> at org.springframework.beans.factory.support. >> DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry. >> java:230) >> at org.springframework.beans.factory.support.AbstractBeanFactory. >> doGetBean(AbstractBeanFactory.java:302) >> at org.springframework.beans.factory.support.AbstractBeanFactory. >> getBean(AbstractBeanFactory.java:197) >> at org.springframework.beans.factory.support. >> DefaultListableBeanFactory.preInstantiateSingletons( >> DefaultListableBeanFactory.java:754) >> at org.springframework.context.support.AbstractApplicationContext. >> finishBeanFactoryInitialization(AbstractApplicationContext.java:866) >> at org.springframework.context.support.AbstractApplicationContext. >> refresh(AbstractApplicationContext.java:542) >> at org.springframework.web.context.ContextLoader. >> configureAndRefreshWebApplicationContext(ContextLoader.java:444) >> at org.springframework.web.context.ContextLoader. >> initWebApplicationContext(ContextLoader.java:326) >> at org.springframework.web.context.ContextLoaderListener. >> contextInitialized(ContextLoaderListener.java:107) >> at org.apache.catalina.core.StandardContext.listenerStart( >> StandardContext.java:4853) >> at org.apache.catalina.core.StandardContext.startInternal( >> StandardContext.java:5314) >> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java: >> 145) >> at org.apache.catalina.core.ContainerBase.addChildInternal( >> ContainerBase.java:753) >> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java >> :729) >> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: >> 717) >> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java: >> 940) >> at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig. >> java:1816) >> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java >> :511) >> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >> at java.util.concurrent.ThreadPoolExecutor.runWorker( >> ThreadPoolExecutor.java:1142) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run( >> ThreadPoolExecutor.java:617) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.opendatakit.common.persistence.exception. >> ODKDatastoreException: org.springframework.transaction. >> CannotCreateTransactionException: Could not open JDBC Connection for >> transaction; nested exception is java.sql.SQLException: Cannot create >> PoolableConnectionFactory (validationQuery didn't return a row) >> at >> org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.assertRelation(DatastoreImpl.java:650) >> at >> org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.assertRelation(GrantedAuthorityHierarchyTable.java:115) >> at >> org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.getEntireGrantedAuthorityHierarchy(GrantedAuthorityHierarchyTable.java:186) >> at >> org.opendatakit.common.security.spring.RoleHierarchyImpl.buildRolesReachableInOneStepMap(RoleHierarchyImpl.java:464) >> at >> org.opendatakit.common.security.spring.RoleHierarchyImpl.refreshReachableGrantedAuthorities(RoleHierarchyImpl.java:281) >> at >> org.opendatakit.common.security.spring.RoleHierarchyImpl.afterPropertiesSet(RoleHierarchyImpl.java:132) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579) >> ... 25 more >> Caused by: >> org.springframework.transaction.CannotCreateTransactionException: Could not >> open JDBC Connection for transaction; nested exception is >> java.sql.SQLException: Cannot create PoolableConnectionFactory >> (validationQuery didn't return a row) >> at org.springframework.jdbc.datasource.DataSourceTransactionManager. >> doBegin(DataSourceTransactionManager.java:252) >> at org.springframework.transaction.support. >> AbstractPlatformTransactionManager.getTransaction( >> AbstractPlatformTransactionManager.java:373) >> at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl. >> assertRelation(DatastoreImpl.java:506) >> ... 32 more >> Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory >> (validationQuery didn't return a row) >> at >> org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294) >> at >> org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039) >> at >> org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) >> at >> org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:211) >> ... 34 more >> Caused by: java.sql.SQLException: validationQuery didn't return a row >> at org.apache.commons.dbcp2.PoolableConnection.validate( >> PoolableConnection.java:303) >> at org.apache.commons.dbcp2.PoolableConnectionFactory. >> validateConnection(PoolableConnectionFactory.java:357) >> at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory >> (BasicDataSource.java:2307) >> at org.apache.commons.dbcp2.BasicDataSource. >> createPoolableConnectionFactory(BasicDataSource.java:2290) >> ... 37 more >> >> Mar 06, 2017 2:18:11 PM org.apache.catalina.core.StandardContext >> listenerStart >> SEVERE: Exception sending context initialized event to listener instance >> of class org.springframework.web.context.ContextLoaderListener >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean with name 'hierarchicalRoleRelationships' defined in ServletContext >> resource [/WEB-INF/applicationContext-security.xml]: Invocation of init >> method failed; nested exception is org.opendatakit.common.persistence. >> exception.ODKDatastoreException: org.springframework.transaction. >> CannotCreateTransactionException: Could not open JDBC Connection for >> transaction; nested exception is java.sql.SQLException: Cannot create >> PoolableConnectionFactory (validationQuery didn't return a row) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) >> at >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) >> at >> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754) >> at org.springframework.context.su >> pport.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) >> at org.springframework.context.su >> pport.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) >> at >> org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) >> at >> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) >> at >> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) >> at >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853) >> at >> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314) >> at >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) >> at >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) >> at >> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940) >> at >> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816) >> at >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) >> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: >> org.opendatakit.common.persistence.exception.ODKDatastoreException: >> org.springframework.transaction.CannotCreateTransactionException: Could not >> open JDBC Connection for transaction; nested exception is >> java.sql.SQLException: Cannot create PoolableConnectionFactory >> (validationQuery didn't return a row) >> at org.opendatakit.common.persistence.engine.pgres.DatastoreImpl. >> assertRelation(DatastoreImpl.java:650) >> at org.opendatakit.common.security.spring. >> GrantedAuthorityHierarchyTable.assertRelation( >> GrantedAuthorityHierarchyTable.java:115) >> at org.opendatakit.common.security.spring. >> GrantedAuthorityHierarchyTable.getEntireGrantedAuthorityHierarchy( >> GrantedAuthorityHierarchyTable.java:186) >> at org.opendatakit.common.security.spring.RoleHierarchyImpl. >> buildRolesReachableInOneStepMap(RoleHierarchyImpl.java:464) >> at org.opendatakit.common.security.spring.RoleHierarchyImpl. >> refreshReachableGrantedAuthorities(RoleHierarchyImpl.java:281) >> at org.opendatakit.common.security.spring.RoleHierarchyImpl. >> afterPropertiesSet(RoleHierarchyImpl.java:132) >> at org.springframework.beans.factory.support. >> AbstractAutowireCapableBeanFactory.invokeInitMethods( >> AbstractAutowireCapableBeanFactory.java:1642) >> at org.springframework.beans.factory.support. >> AbstractAutowireCapableBeanFactory.initializeBean( >> AbstractAutowireCapableBeanFactory.java:1579) >> ... 25 more >> Caused by: org.springframework.transaction. >> CannotCreateTransactionException: Could not open JDBC Connection for >> transaction; nested exception is java.sql.SQLException: Cannot create >> PoolableConnectionFactory (validationQuery didn't return a row) >> at >> org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:252) >> at >> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) >> at >> org.opendatakit.common.persistence.engine.pgres.DatastoreImpl.assertRelation(DatastoreImpl.java:506) >> ... 32 more >> Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory >> (validationQuery didn't return a row) >> at org.apache.commons.dbcp2.BasicDataSource. >> createPoolableConnectionFactory(BasicDataSource.java:2294) >> at org.apache.commons.dbcp2.BasicDataSource.createDataSource( >> BasicDataSource.java:2039) >> at org.apache.commons.dbcp2.BasicDataSource.getConnection( >> BasicDataSource.java:1533) >> at org.springframework.jdbc.datasource.DataSourceTransactionManager. >> doBegin(DataSourceTransactionManager.java:211) >> ... 34 more >> Caused by: java.sql.SQLException: validationQuery didn't return a row >> at >> org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:303) >> at >> org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357) >> at >> org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2307) >> at >> org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290) >> ... 37 more >> >> 06-Mar-2017 14:18:11.322 SEVERE [localhost-startStop-1] >> org.apache.catalina.core.StandardContext.startInternal One or more >> listeners failed to start. Full details will be found in the appropriate >> container log file >> Mar 06, 2017 2:18:11 PM org.apache.catalina.util.SessionIdGeneratorBase >> createSecureRandom >> INFO: Creation of SecureRandom instance for session ID generation using >> [SHA1PRNG] took [271] milliseconds. >> 06-Mar-2017 14:18:11.667 SEVERE [localhost-startStop-1] >> org.apache.catalina.core.StandardContext.startInternal Context [] startup >> failed due to previous errors >> Mar 06, 2017 2:18:11 PM org.apache.catalina.core.ApplicationContext log >> INFO: Closing Spring root WebApplicationContext >> 06-Mar-2017 14:18:11.906 WARNING [localhost-startStop-1] >> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The >> web application [ROOT] registered the JDBC driver [org.postgresql.Driver] >> but failed to unregister it when the web application was stopped. To >> prevent a memory leak, the JDBC Driver has been forcibly unregistered. >> >> >> >> Any help would be appreciated! I've been wrestling with this problem for >> a while and can't find what's wrong. >> >> I've tried the following things: >> >> 1. Re-installed Tomcat 8.0.41 >> 2. Ran through the ODK Aggregate 1.4.13 setup several times to make >> new ODKAggregate.war files >> 3. Did a DROP DATABASE and DROP ROLE for odk_prod and odk_user in >> postgres then ran the create_db_and_user.sql again >> 4. Pointed my Tomcat JVM version (via setenv.sh) from jre 1.8.0_91 to >> java-7-oracle, java-8-oracle, and java-7-openjdk-amd64 >> 5. Placed the JDBC drivers postgresql-42.0.0.jar and >> mysql-connector-java-5.1.41-bin.jar in the Tomcat lib folder >> >> Other information: >> >> 1. I'm on Ubuntu 14.04.5 LTS >> 2. I'm using PostgreSQL 9.6.2 >> 3. The JRE I'm using is JRE 1.8.0_91-b14 >> 4. The set-up I was using before that worked just fine was ODK >> Aggregate 1.4.11 on Tomcat 6.0.45 >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >