db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Errors when running JUnit suite directly
Date Wed, 13 Sep 2006 12:16:49 GMT
Hi Deepa,

I'm seeing the same errors as you are.

I would like to point out that the specification of derby.system.home is 
currently required when running directly with JUnit. If you leave it 
out, you will get AccessControlExceptions with access denied for user.dir.

It was said in another thread that this was a known problem, and that it 
  will be fixed.



-- 
Kristian

Deepa Remesh wrote:
> Hi,
> 
> I am getting the following errors when I run JUnit tests directly. I
> would like to know if anyone else is also getting them (specifically
> the OutOfMemoryError):
> 
> 1) OutOfMemoryError when I run "All" suite directly using the following 
> command:
> 
> java -Dderby.system.home=$PWD junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All
> 
> The problem seems to occur when running the client tests. But I did
> not get OutOfMemoryError when I ran "Embedded" or "Client" suite
> directly.
> 
> 2) I am getting the following errors when I run the "Client" suite
> directly. The first error is in the new test I added recently
> (SQLAuthorizationPropTest). I haven't figured out what is causing
> this. Other two errors seem unrelated. Below are the errors from the
> test run:
> 
> There were 3 errors:
> 1) 
> grantRevokeAfterSettingSQLAuthProperty(org.apache.derbyTesting.functionTests.tests.lang.SQLAuthor

> 
> izationPropTest)java.sql.SQLException: A network protocol error was
> encountered and the connection h
> as been terminated: the requested command encountered an unarchitected
> and implementation-specific c
> ondition for which there was no architected message
>        at 
> org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:4

> 
> 6)
>        at 
> org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:345) 
> 
>        at org.apache.derby.client.am.Statement.execute(Statement.java:826)
>        at 
> org.apache.derbyTesting.functionTests.tests.lang.SQLAuthorizationPropTest.grantRevokeAfte

> 
> rSettingSQLAuthProperty(SQLAuthorizationPropTest.java:126)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
> 
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

> 
>        at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.client.am.DisconnectException: A network
> protocol error was encountered
> and the connection has been terminated: the requested command
> encountered an unarchitected and imple
> mentation-specific condition for which there was no architected message
>        at 
> org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(NetConnectionReply.java:888)

> 
> 
>        at 
> org.apache.derby.client.net.NetStatementReply.parseExecuteImmediateError(NetStatementRepl

> 
> y.java:562)
>        at 
> org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(NetStatementReply.java:

> 
> 210)
>        at 
> org.apache.derby.client.net.NetStatementReply.readExecuteImmediate(NetStatementReply.java

> 
> :58)
>        at 
> org.apache.derby.client.net.StatementReply.readExecuteImmediate(StatementReply.java:45)

> 
>        at 
> org.apache.derby.client.net.NetStatement.readExecuteImmediate_(NetStatement.java:125)

> 
>        at 
> org.apache.derby.client.am.Statement.readExecuteImmediate(Statement.java:1320) 
> 
>        at 
> org.apache.derby.client.am.Statement.flowExecute(Statement.java:2016)
>        at org.apache.derby.client.am.Statement.executeX(Statement.java:831)
>        at org.apache.derby.client.am.Statement.execute(Statement.java:817)
>        ... 35 more
> 2) junit.framework.TestSuite@d830ebjava.sql.SQLException:
> java.net.ConnectException : Error connecti
> ng to server localhost on port 1527 with message Connection refused: 
> connect.
>        at 
> org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:4

> 
> 6)
>        at 
> org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:345) 
> 
>        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:149)
>        at java.sql.DriverManager.getConnection(DriverManager.java:512)
>        at java.sql.DriverManager.getConnection(DriverManager.java:171)
>        at 
> org.apache.derbyTesting.junit.TestConfiguration.openConnection(TestConfiguration.java:429

> 
> )
>        at 
> org.apache.derbyTesting.junit.TestConfiguration.openDefaultConnection(TestConfiguration.j

> 
> ava:411)
>        at 
> org.apache.derbyTesting.junit.BaseJDBCTestSetup.getConnection(BaseJDBCTestSetup.java:74)

> 
>        at 
> org.apache.derbyTesting.junit.CleanDatabaseTestSetup.setUp(CleanDatabaseTestSetup.java:68

> 
> )
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.client.am.DisconnectException:
> java.net.ConnectException : Error connect
> ing to server localhost on port 1527 with message Connection refused: 
> connect.
>        at org.apache.derby.client.net.NetAgent.<init>(NetAgent.java:124)
>        at 
> org.apache.derby.client.net.NetConnection.newAgent_(NetConnection.java:1086) 
> 
>        at org.apache.derby.client.am.Connection.<init>(Connection.java:324)
>        at 
> org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:209)
>        at 
> org.apache.derby.client.net.ClientJDBCObjectFactoryImpl.newNetConnection(ClientJDBCObject

> 
> FactoryImpl.java:201)
>        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:140)
>        ... 26 more
> Caused by: java.net.ConnectException: Connection refused: connect
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
>        at 
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
>        at java.net.Socket.connect(Socket.java:452)
>        at java.net.Socket.connect(Socket.java:402)
>        at java.net.Socket.<init>(Socket.java:309)
>        at java.net.Socket.<init>(Socket.java:124)
>        at 
> org.apache.derby.client.net.OpenSocketAction.run(OpenSocketAction.java:34)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.apache.derby.client.net.NetAgent.<init>(NetAgent.java:122)
>        ... 31 more
> 3) AllPackagesjava.lang.Exception: DRDA_NoIO.S:Could not connect to
> Derby Network Server on host 127
> .0.0.1, port 1527.
>        at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessageWork(NetworkSer

> 
> verControlImpl.java:2691)
>        at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessage(NetworkServerC

> 
> ontrolImpl.java:1502)
>        at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.setUpSocket(NetworkServerControlImpl.

> 
> java:2081)
>        at 
> org.apache.derby.impl.drda.NetworkServerControlImpl.shutdown(NetworkServerControlImpl.jav

> 
> a:787)
>        at 
> org.apache.derby.drda.NetworkServerControl.shutdown(NetworkServerControl.java:301) 
> 
>        at 
> org.apache.derbyTesting.junit.NetworkServerTestSetup.tearDown(NetworkServerTestSetup.java

> 
> :83)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>        at junit.extensions.TestSetup.run(TestSetup.java:23)
> 
> FAILURES!!!
> Tests run: 870,  Failures: 0,  Errors: 3
> 
> I would appreciate if someone else can run the JUnit tests standalone
> and post if they get similar errors.
> 
> Thanks,
> Deepa


Mime
View raw message