[ http://issues.apache.org/jira/browse/DERBY-2067?page=comments#action_12448558 ] Knut Anders Hatlen commented on DERBY-2067: -------------------------------------------
The assert failure is raised on a connection to a Derby instance which has been shut down. It is raised because ContextService.getCurrentContextManager() returns null and TransactionResourceImpl.getContextManager() returns a ContextManager, whereas they are expected to return the same value. I believe it is OK for getCurrentContextManager() to return null instead of a ContextManager after the engine has been shut down, and that the assert should be changed. > Assert failure in EmbedConnection.restoreContextStack() when running > lang/closed.java > ------------------------------------------------------------------------------------- > > Key: DERBY-2067 > URL: http://issues.apache.org/jira/browse/DERBY-2067 > Project: Derby > Issue Type: Bug > Components: Services > Affects Versions: 10.3.0.0 > Environment: Java SE 5.0, Java SE 6, Solaris 10, sane build of Derby > Reporter: Knut Anders Hatlen > > I see two assert failures when I'm running lang/closed.java on one particular > machine with Java SE 5.0/Java SE 6 and Solaris 10. It fails consistently on > that machine, but I have never seen the failure on other machines. Stack > trace: > org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Current > Context Manager not the one was expected: null [EMAIL PROTECTED] > at > org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:149) > at org.apache.derby.impl.jdbc.Util.THROWASSERT(Util.java:140) > at > org.apache.derby.impl.jdbc.EmbedConnection.restoreContextStack(EmbedConnection.java:1563) > at > org.apache.derby.impl.jdbc.ConnectionChild.restoreContextStack(ConnectionChild.java:131) > at > org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:587) > at > org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517) > at > org.apache.derbyTesting.functionTests.tests.lang.closed.run(closed.java:193) > at java.lang.Thread.run(Thread.java:595) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira