[ 
https://issues.apache.org/jira/browse/DERBY-4310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12737341#action_12737341
 ] 

Kathey Marsden commented on DERBY-4310:
---------------------------------------

I tried the test and  found the first failure to be in 
testSingleConnectionOnePhaseCommit

junit.framework.AssertionFailedError: Unexpected row count expected:<1> but 
was:<2>
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.failNotEquals(Assert.java:282)
        at junit.framework.Assert.assertEquals(Assert.java:64)
        at junit.framework.Assert.assertEquals(Assert.java:201)
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1227)
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1164)
        at 
org.apache.derbyTesting.junit.XATestUtil.checkXATransactionView(XATestUtil.java:82)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.XATest.testSingleConnectionOnePhaseCommit(XATest.java:111
)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at 
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at junit.textui.TestRunner.doRun(TestRunner.java:116)
        at junit.textui.TestRunner.start(TestRunner.java:172)
        at junit.textui.TestRunner.main(TestRunner.java:138)

I think the other issues cascade from there.  Tiago said if he took out his new 
test this problem does not occur.  It would be interesting 1) To print the 
transaction table at the failure point to see what our extra transaction is.  
2) put an xar.rollback(xid)  after 
                xar.end(xid, XAResource.TMSUCCESS);
in testDerby4310. It could be that  transaction  is sticking around for a while 
even though we have done no work.





> jdbcapi.XATest passes but shows Table/View 'APP.FOO' does not exist. under 
> logs/serverConsoleOutput.log
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4310
>                 URL: https://issues.apache.org/jira/browse/DERBY-4310
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.6.0.0
>            Reporter: Tiago R. Espinha
>            Assignee: Tiago R. Espinha
>         Attachments: console.out.txt, DERBY-4310-1.diff, DERBY-4310.diff, 
> derby.log.tar.gz, outall.txt, ReproDerby4310.java, ReproDerby4310.java, 
> ReproDerby4310.java, ReproEmbeddedDerby4310.java, Tests.zip, utilXid.java, 
> XATestLog.tar.gz
>
>
> The XATest is showing the following on the log:
> 2009-07-16 00:15:42.838 GMT : Apache Derby Network Server - 10.6.0.0 alpha - 
> (794457M) started and ready to accept connections on port 9920
> 2009-07-16 00:15:44.394 GMT : Unexpected exception:
>  Table/View 'APP.FOO' does not exist.
> Here is the full stack trace  from derby.log.  The error comes closing a 
> prepared statement on a brokered connection if the table referenced by the 
> statement has been dropped.  This looks like an embedded bug causing network 
> server shutdown to fail.  Also if this test is enabled in a suite DERBY-4155, 
> the next time network server is started the tests will hang with 
> java.net.BindException: Address already in use: NET_Bind in the derby.log
> 2009-07-16 17:05:45.062 GMT 
> Thread[derby.NetworkServerStarter,5,derby.daemons] (XID = 497), (SESSIONID = 
> 53), (DATABASE = wombat), (DRDAID = {7}), Failed Statement is: SELECT * FROM 
> APP.FOO
> ERROR 42X05: Table/View 'APP.FOO' does not exist.
>       at 
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java:286)
>       at 
> org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(FromBaseTable.java:2463)
>       at 
> org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(FromBaseTable.java:2183)
>       at 
> org.apache.derby.impl.sql.compile.FromList.bindTables(FromList.java:310)
>       at 
> org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(SelectNode.java:390)
>       at 
> org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(DMLStatementNode.java:199)
>       at 
> org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:137)
>       at 
> org.apache.derby.impl.sql.compile.CursorNode.bindStatement(CursorNode.java:245)
>       at 
> org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:316)
>       at 
> org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
>       at 
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:822)
>       at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:129)
>       at 
> org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:105)
>       at 
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1542)
>       at 
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1423)
>       at 
> org.apache.derby.iapi.jdbc.BrokeredPreparedStatement30.createDuplicateStatement(BrokeredPreparedStatement30.java:56)
>       at 
> org.apache.derby.jdbc.XAStatementControl.getRealPreparedStatement(XAStatementControl.java:143)
>       at 
> org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getPreparedStatement(BrokeredPreparedStatement.java:526)
>       at 
> org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getStatement(BrokeredPreparedStatement.java:533)
>       at 
> org.apache.derby.iapi.jdbc.BrokeredStatement.close(BrokeredStatement.java:130)
>       at 
> org.apache.derby.impl.drda.DRDAStatement.close(DRDAStatement.java:1027)
>       at org.apache.derby.impl.drda.Database.close(Database.java:352)
>       at org.apache.derby.impl.drda.Session.close(Session.java:115)
>       at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:833)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>       at java.lang.reflect.Method.invoke(Method.java:599)
>       at 
> org.apache.derby.iapi.jdbc.DRDAServerStarter.run(DRDAServerStarter.java:236)
>       at java.lang.Thread.run(Thread.java:735)
> Cleanup action completed
> 2009-07-16 17:05:45.078 GMT : Unexpected exception:
>  Table/View 'APP.FOO' does not exist.
> An exception was thrown during network server startup. 
> DRDA_UnexpectedException.S:Unexpected exception:
>  Table/View 'APP.FOO' does not exist.
> java.lang.reflect.InvocationTargetException
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>       at java.lang.reflect.Method.invoke(Method.java:599)
>       at 
> org.apache.derby.iapi.jdbc.DRDAServerStarter.run(DRDAServerStarter.java:236)
>       at java.lang.Thread.run(Thread.java:735)
> Caused by: java.lang.Exception: DRDA_UnexpectedException.S:Unexpected 
> exception:
>  Table/View 'APP.FOO' does not exist.
>       at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessageWork(NetworkServerControlImpl.java:3216)
>       at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessage(NetworkServerControlImpl.java:1885)
>       at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:835)
>       ... 6 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to