Hi,

(I still consider this a bug in H2, but...)

I think the problem is triggered by concurrent usage of the same session.
If you are using a connection pool, then possibly you close a connection,
and access the result set (or an input stream) after that? Or use the same
connection concurrently in multiple threads?

Regards,
Thomas


On Thu, Aug 13, 2015 at 2:04 PM, Michal Wojcik <[email protected]
<javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:

> Hi Thomas,
>
> My application is multithreaded and using UCP as connection pooler.
>
> Thanks,
> Michal
>
>
> On Tuesday, August 11, 2015 at 3:52:05 PM UTC+2, Michal Wojcik wrote:
>>
>> Hi,
>>
>> I have problem with H2 database working in server mode. It happens very
>> often, that my Fitnesse tests are failing with the error "Connection is
>> broken: "unexpected status 16842752" [90067-187]".
>> "16842752" is only example, there were also values like 256, 50, 5, etc.
>>
>> Please advice what is the reason of this behavior.
>>
>>
>>
>> The same problem was with older versions of H2 - 1.3.146
>> Database is working in TCP mode with data stored in memory (however for
>> file based database the error was too). Following command is used to start
>> it
>> java -Dh2 -Xmx1024M -Dcom.sun.management.jmxremote -classpath
>> "/C:/Users/00000/.m2/repository/com/h2database/h2/1.4.187/h2-1.4.187.jar"
>> org.h2.tools.Server  -tcp -tcpAllowOthers -tcpPort 33025
>>
>> Tests are executed on Windows 7 64 bit and Java version is 1.7.60
>>
>> Application is accessing two databases hosted on one H2 server.
>> Connection strings are:
>> jdbc:h2:tcp://localhost:33025/mem:brap;MVCC=TRUE;MODE=Oracle;JMX=TRUE
>> jdbc:h2:tcp://localhost:33025/mem:AAdb;MVCC=TRUE;MODE=Oracle;JMX=TRUE
>>
>> Sample call stack is:
>> [14:36:27,537] [main] ERROR - org.hibernate.transaction.JDBCTransaction -
>> JDBC begin failed
>> org.h2.jdbc.JdbcSQLException: Connection is broken: "unexpected status
>> 16842752" [90067-187]
>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.message.DbException.get(DbException.java:179)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.message.DbException.get(DbException.java:155)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.engine.SessionRemote.done(SessionRemote.java:637)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.engine.SessionRemote.setAutoCommitSend(SessionRemote.java:251)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.engine.SessionRemote.setAutoCommit(SessionRemote.java:226)
>> ~[h2-1.4.187.jar:1.4.187]
>> at org.h2.jdbc.JdbcConnection.setAutoCommit(JdbcConnection.java:432)
>> ~[h2-1.4.187.jar:1.4.187]
>> at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) ~[na:na]
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> ~[na:1.7.0_60]
>> at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60]
>> at
>> org.springframework.jdbc.datasource.SingleConnectionDataSource$CloseSuppressingInvocationHandler.invoke(SingleConnectionDataSource.java:352)
>> ~[spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at com.sun.proxy.$Proxy64.setAutoCommit(Unknown Source) ~[na:na]
>> at
>> org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:91)
>> ~[hibernate-core-3.3.1.GA.jar:3.3.1.GA]
>> at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
>> [hibernate-core-3.3.1.GA.jar:3.3.1.GA]
>> at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
>> [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]
>> at
>> org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
>> [spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:59)
>> [spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:377)
>> [spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
>> [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
>> [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
>> [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>> [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
>> [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>> [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
>> [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> com.xx.apd.prm.datamodel.dao.HbmCityDao$$EnhancerByCGLIB$$83cbc731.retrieveByCode(<generated>)
>> [cglib-2.2.jar:na]
>> at 
>> com.xx.apd.prm.fixtures.setup.AddAirportFixture.findCityByCityCode(AddAirportFixture.java:71)
>> [classes/:na]
>> at 
>> com.xx.apd.prm.fixtures.setup.AddAirportFixture.addAirport(AddAirportFixture.java:53)
>> [classes/:na]
>> at 
>> com.xx.apd.prm.fixtures.setup.AddAirportFixture.execute(AddAirportFixture.java:45)
>> [classes/:na]
>> at 
>> com.xx.apd.prm.fixtures.setup.AddPnrcAirportFixture.execute(AddPnrcAirportFixture.java:14)
>> [classes/:na]
>> at fit.ColumnFixture.doRow(ColumnFixture.java:27)
>> [fitnesse-20121220.jar:na]
>> at fit.Fixture.doRows(Fixture.java:160) [fitnesse-20121220.jar:na]
>> at fit.ColumnFixture.doRows(ColumnFixture.java:18)
>> [fitnesse-20121220.jar:na]
>> at fit.Fixture.doTable(Fixture.java:154) [fitnesse-20121220.jar:na]
>> at fit.Fixture.interpretFollowingTables(Fixture.java:120)
>> [fitnesse-20121220.jar:na]
>> at fit.Fixture.interpretTables(Fixture.java:106)
>> [fitnesse-20121220.jar:na]
>> at fit.Fixture.doTables(Fixture.java:80) [fitnesse-20121220.jar:na]
>> at fit.FitServer.process(FitServer.java:81) [fitnesse-20121220.jar:na]
>> at fit.FitServer.run(FitServer.java:56) [fitnesse-20121220.jar:na]
>> at fit.FitServer.main(FitServer.java:41) [fitnesse-20121220.jar:na]
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to