Caused by: java.lang.IllegalStateException: Why am I in a transaction?

Installation Forum (Inactive)
Caused by: java.lang.IllegalStateException: Why am I in a transaction? felix rauscher  2015-07-17 03:03
Status: Closed
 
Hi,

I am trying to install labkey on a Ubuntu 14.04 linux. I am using the tomcat7 installation from the distribution. I am using postgres 9.4 installed via the postgres repositories.

The connection to the database is made, and the labkey database is created, but stays empty. In the browser I get the following exception:


org.labkey.api.util.ConfigurationException: Cannot connect to DataSource "labkeyDataSource" defined in labkey.xml. Server cannot start.
       at org.labkey.api.data.DbScope.initializeScopes(DbScope.java:985)
       at org.labkey.api.module.ModuleLoader.initializeDataSources(ModuleLoader.java:890)
       at org.labkey.api.module.ModuleLoader.doInit(ModuleLoader.java:318)
       at org.labkey.api.module.ModuleLoader.init(ModuleLoader.java:230)
       at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
       at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
       at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
       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: java.lang.IllegalStateException: Why am I in a transaction?
       at org.labkey.core.dialect.PostgreSql91Dialect.configureToDisableJdbcCaching(PostgreSql91Dialect.java:1604)
       at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.getResultSet(SqlExecutingSelector.java:316)
       at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:254)
       at org.labkey.api.data.BaseSelector.getObject(BaseSelector.java:163)
       at org.labkey.api.data.BaseSelector.getObject(BaseSelector.java:158)
       at org.labkey.core.dialect.PostgreSql91Dialect.determineSettings(PostgreSql91Dialect.java:813)
       at org.labkey.core.dialect.PostgreSql91Dialect.prepare(PostgreSql91Dialect.java:756)
       at org.labkey.api.data.DbScope.initializeScopes(DbScope.java:973)
       ... 19 more


I attached the relevant log files.

Could you give me a hint on how to proceed?

Thanks

Felix
 
 
Jon (LabKey DevOps) responded:  2015-07-17 11:07
Hi Felix,

Is this issue also apart of this other forum question you started here?

https://www.labkey.org/announcements/home/Server/Forum/thread.view?rowId=11127

I noticed you have two different operating systems listed and two different versions of postgres as well.

Also, was both versions of Apache you were using installed via the binary distributions directly from Oracle or were they installed via package manager? If so, we suspect that the problems you're seeing are related to connection pools that are available in the binary distribution and may not work correctly in the package manager versions.

Regards,

Jon
 
felix rauscher responded:  2015-07-20 00:23
Hi John,

the issues are not really related. As I did not succeed with sl7, I switched to ubuntu, because I am more at home whith this distribution. However, I think, I messed something up with the database connection there.

Anyway, this issue got resolved by using the tomcat server downloaded from the tomcat site. So there might really be an issue with the distributors packages.

Thanks for the hint!

Felix