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: nested exceptions and junit tests?
Date Sat, 05 May 2007 10:18:13 GMT
Mike Matrigali skrev:
> Is the printing of nested exceptions a problem with my junit test 
> runner, our junit test, or something else.

Hi Mike,

Haven't checked this out, but I believe Derby is still using some 
"custom"/pre-1.4 error chaining. I have observed that sometimes the real 
error is not printed in the stack trace, even when I iterate through the 
whole chain available using the standard mechanism (outside of JUnit). 
However, the real error (usually?) shows up in derby.log.

The test I have been working on lately (EncryptionKeyTest) seems to 
suffer from this issue, so I'll have a look at it over the weekend to 
confirm if what I just described is actually the case or not.

Are there some Jiras on this issue as well?


-- 
Kristian

>
> When running upgrade tests my test runner gets the following which
> is pretty useless without the following/nested exception:
>
> 2) Upgrade Phase: UPGRADEjava.sql.SQLException: Failed to start 
> database 'single
> Use/oneuse0', see the next exception for details.
>     at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExcepti
> onFactory.java:45)
>     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
>     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:94)
>     at 
> org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:173)
>     at 
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnectio
> n.java:2119)
>     at 
> org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.j
> ava:1783)
>     at 
> org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:24
> 9)
>     at 
> org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:74)
>     at 
> org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:209)
>     at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
> .java:479)
>     at 
> org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
> .java:423)
>     at 
> org.apache.derbyTesting.functionTests.tests.upgradeTests.PhaseChanger.set
> Up(PhaseChanger.java:94)
>     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)
>     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)
>     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)
>
>
>


Mime
View raw message