Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDOServer throws "The object is already closed [90007-168]" errors with H2-DB
[CDO] CDOServer throws "The object is already closed [90007-168]" errors with H2-DB [message #1051466] Sun, 28 April 2013 21:06 Go to next message
Stefan Schedl is currently offline Stefan SchedlFriend
Messages: 3
Registered: July 2009
Junior Member
From time to time my cdo server (4.2 latest nightly-build) throws following error, at this moment only restarting of the server helps.
It seems that this error have someting to do with conflicting transactions.

Up to now I'm wasn't able to reproduce this with an junit test. Perhaps someone has an idea what the problem could be, or at where to start debugging.

Best Regards

Stefan Schedl


!ENTRY org.eclipse.net4j 4 0 2013-04-28 21:01:42.212
!MESSAGE org.h2.jdbc.JdbcSQLException: The object is already closed
The object is already closed [90007-168]
!STACK 0
org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: The object is already closed
The object is already closed [90007-168]
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.readValuesFromStatement(AbstractHorizontalClassMapping.java:345)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.readRevision(HorizontalBranchingClassMapping.java:381)
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readRevision(DBStoreAccessor.java:251)
at org.eclipse.emf.cdo.internal.server.Repository.loadRevisions(Repository.java:485)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:387)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:292)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:275)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.execute(RevisionInfo.java:133)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadRevisionsIndication.responding(LoadRevisionsIndication.java:169)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:133)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.h2.jdbc.JdbcSQLException: The object is already closed
The object is already closed [90007-168]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:169)
at org.h2.message.DbException.get(DbException.java:146)
at org.h2.message.DbException.get(DbException.java:135)
at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:925)
at org.h2.jdbc.JdbcPreparedStatement.checkClosed(JdbcPreparedStatement.java:1523)
at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:901)
at org.h2.jdbc.JdbcStatement.setMaxRows(JdbcStatement.java:358)
at org.eclipse.net4j.internal.db.DBPreparedStatement.setMaxRows(DBPreparedStatement.java:194)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.readValuesFromStatement(AbstractHorizontalClassMapping.java:275)
... 18 more
Re: [CDO] CDOServer throws "The object is already closed [90007-168]" errors with [message #1051700 is a reply to message #1051466] Mon, 29 April 2013 06:03 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5587
Registered: July 2009
Senior Member
Hi Stefan,

This one is interesting because it seems that the problem has always been in HorizontalBranchingClassMapping.readRevision():

...
finally
{
statementCache.releasePreparedStatement(stmt);
}

readValuesFromStatement(stmt, revision, accessor);

In other words, the statement had been release to the pool but nevertheless been used thereafter. This could have
resulted in unpredictable behaviour everywhere. But recently there was this major overhaul of the DB framework:

401763: Make CDO Server more robust against data dictionary changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763

So that the code now looks like this:

...
finally
{
DBUtil.close(stmt);
}

readValuesFromStatement(stmt, revision, accessor);

And the usage of statement leads to an immediate exception. Good, I can fix this now. Please submit a bugzilla.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 28.04.2013 23:06, schrieb Stefan Schedl:
> From time to time my cdo server (4.2 latest nightly-build) throws following error, at this moment only restarting of
> the server helps. It seems that this error have someting to do with conflicting transactions.
>
> Up to now I'm wasn't able to reproduce this with an junit test. Perhaps someone has an idea what the problem could be,
> or at where to start debugging.
>
> Best Regards
>
> Stefan Schedl
>
>
> !ENTRY org.eclipse.net4j 4 0 2013-04-28 21:01:42.212
> !MESSAGE org.h2.jdbc.JdbcSQLException: The object is already closed
> The object is already closed [90007-168]
> !STACK 0
> org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: The object is already closed
> The object is already closed [90007-168]
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.readValuesFromStatement(AbstractHorizontalClassMapping.java:345)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.readRevision(HorizontalBranchingClassMapping.java:381)
> at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readRevision(DBStoreAccessor.java:251)
> at org.eclipse.emf.cdo.internal.server.Repository.loadRevisions(Repository.java:485)
> at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:387)
> at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:292)
> at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:275)
> at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.execute(RevisionInfo.java:133)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadRevisionsIndication.responding(LoadRevisionsIndication.java:169)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:133)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: org.h2.jdbc.JdbcSQLException: The object is already closed
> The object is already closed [90007-168]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
> at org.h2.message.DbException.get(DbException.java:169)
> at org.h2.message.DbException.get(DbException.java:146)
> at org.h2.message.DbException.get(DbException.java:135)
> at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:925)
> at org.h2.jdbc.JdbcPreparedStatement.checkClosed(JdbcPreparedStatement.java:1523)
> at org.h2.jdbc.JdbcStatement.checkClosed(JdbcStatement.java:901)
> at org.h2.jdbc.JdbcStatement.setMaxRows(JdbcStatement.java:358)
> at org.eclipse.net4j.internal.db.DBPreparedStatement.setMaxRows(DBPreparedStatement.java:194)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.readValuesFromStatement(AbstractHorizontalClassMapping.java:275)
> ... 18 more
Re: [CDO] CDOServer throws "The object is already closed [90007-168]" errors with [message #1051778 is a reply to message #1051700] Mon, 29 April 2013 08:06 Go to previous message
Stefan Schedl is currently offline Stefan SchedlFriend
Messages: 3
Registered: July 2009
Junior Member
Great, Yesterday I thought about to create the bug directly, but I thought the bug description would be to unspecified Smile

Bug is created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=406766.

Thanks for the support

Stefan
Previous Topic:[CDO] Tables in DB without Primary Key
Next Topic:[Teneo] Dynamic EMF, References
Goto Forum:
  


Current Time: Fri Dec 19 13:50:47 GMT 2014

Powered by FUDForum. Page generated in 0.02356 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software