I'm able to reproduce the following exception (at least the first one which
happens on startup of Karaf).  Karaf 3.0.2 and we've replaced BoneCP with
HikariCP-java6 2.2.2 recently as BoneCP has been deprecated.

Please note that in my Spring applicationConfig.xml for this WAR
mega-bundle, I'm using the following to lookup the JDBC datasource (which
was working previously without these exceptions with BoneCP):

  <jee:jndi-lookup id="dataSource"
jndi-name="osgi:service/jdbc/FooDataSource"/>

What is the recommended way of doing the JNDI lookup here?  jee:jndi-lookup
is a Spring specific way but I'm not sure is recommended for OSGi.
    
The interesting thing to note is that there are some inserts happening into
the DB in question after startup when I execute some test cases from the web
app front end.

20141203 15:43:47.320 [ERROR] Thread-66 | 273:my-project-server |
org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable | exception during
job acquisition: Could not open JDBC Connection for transaction; nested
exception is org.osgi.framework.ServiceException
org.springframework.transaction.CannotCreateTransactionException: Could not
open JDBC Connection for transaction; nested exception is
org.osgi.framework.ServiceException
        at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:240)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)[273:my-project-server:1.0.0.SNAPSHOT]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
Caused by: org.osgi.framework.ServiceException
        at
org.apache.aries.jndi.services.ServiceHelper$JNDIServiceDamper.call(ServiceHelper.java:197)[98:org.apache.aries.jndi.url:1.0.0]
        at Proxy3e789f04_5f82_464a_ab5b_df52583e7c46.getConnection(Unknown
Source)[:]
        at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:202)[273:my-project-server:1.0.0.SNAPSHOT]
        ... 6 more




20141204 08:40:37.490 [ERROR] Thread-67 | 273:my-project-server |
org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable | exception during
job acquisition: Could not open JDBC Connection for transaction; nested
exception is java.sql.SQLException: Timeout after 47143144ms of waiting for
a connection.
org.springframework.transaction.CannotCreateTransactionException: Could not
open JDBC Connection for transaction; nested exception is
java.sql.SQLException: Timeout after 47143144ms of waiting for a connection.
        at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:240)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)[273:my-project-server:1.0.0.SNAPSHOT]
        at
org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)[273:my-project-server:1.0.0.SNAPSHOT]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
Caused by: java.sql.SQLException: Timeout after 47143144ms of waiting for a
connection.
        at
com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:205)[231:com.zaxxer.HikariCP-java6:2.2.2]
        at
com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:108)[231:com.zaxxer.HikariCP-java6:2.2.2]
        at Proxydb8a93e5_8d4e_43a2_b487_005e667ffa99.getConnection(Unknown
Source)[:]
        at Proxy479ae98e_177d_4ad4_8509_6f6eb9d96b88.getConnection(Unknown
Source)[:]
        at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:202)[273:my-project-server:1.0.0.SNAPSHOT]
        ... 6 more



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Could-not-open-JDBC-connection-for-transaction-tp4036968.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to