You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/02/04 20:38:05 UTC

[jira] Commented: (DERBY-790) SQLException used by the networked interface to Derby is not serializable

    [ https://issues.apache.org/jira/browse/DERBY-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470077 ] 

Knut Anders Hatlen commented on DERBY-790:
------------------------------------------

I don't see the build issue if I do an "ant clean" after applying your patch. If I don't do "ant clean", or if I run "touch java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java" before I run "ant all", I see this failure:

junitcomponents:
    [javac] Compiling 2 source files to /export/home/kah/derby/trunk/classes
    [javac] /export/home/kah/derby/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java:727: cannot find symbol
    [javac] symbol  : method getCause()
    [javac] location: class java.sql.SQLException
    [javac]             if (se1.getCause() != (Throwable) null)
    [javac]                    ^
    [javac] /export/home/kah/derby/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java:728: cannot find symbol
    [javac] symbol  : method getCause()
    [javac] location: class java.sql.SQLException
    [javac]                 assertThrowableEquals(se1.getCause(), se2.getCause());
    [javac]                                          ^
    [javac] /export/home/kah/derby/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java:728: cannot find symbol
    [javac] symbol  : method getCause()
    [javac] location: class java.sql.SQLException
    [javac]                 assertThrowableEquals(se1.getCause(), se2.getCause());
    [javac]                                                          ^
    [javac] /export/home/kah/derby/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java:730: cannot find symbol
    [javac] symbol  : method getCause()
    [javac] location: class java.sql.SQLException
    [javac]                 assertNull(se2.getCause());
    [javac]                               ^
    [javac] 4 errors

BUILD FAILED

I think this is because of a problem with the dependencies in the build scripts. build.xml in the junit directory specifies that BaseJDBCTestCase should be compiled against the 1.3 libraries, and that is what happens if BaseJDBCTestCase is the only file that has been modified. However, it seems like it is compiled against the 1.4 libraries after a clean/clobber.

BaseJDBCTestCase.assertSQLState() uses reflection to invoke Throwable.initCause(). I guess that could also be done for getCause() in assertSQLExceptionEquals() to avoid the problem.

> SQLException used by the networked interface to Derby is not serializable
> -------------------------------------------------------------------------
>
>                 Key: DERBY-790
>                 URL: https://issues.apache.org/jira/browse/DERBY-790
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client, Network Server
>    Affects Versions: 10.1.1.0
>         Environment: Windows XP; WebLogic Server 9.0
>            Reporter: David Cabelus
>         Assigned To: Francois Orsini
>         Attachments: DERBY-790-v1.diff, DERBY-790-v1.stat, DERBY-790-v2.diff, DERBY-790-v2.stat, DERBY-790-v3.diff, DERBY-790-v3.stat, Serialize.java
>
>
> When running RMI client tests with Derby,  many tests failed with the following message:
> Caused by: java.rmi.UnmarshalException: Failed to marshal error response: 
> 'org.apache.derby.client.am.SqlException: 'DROP TABLE' cannot be performed on 
> 'SDF014B7' because it does not exist.' because exception ; nested exception 
> is:
>         java.io.NotSerializableException: 
> org.apache.derby.client.net.NetSqlca
>         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191)
>         at 
> weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:176)
> This issue is a blocking issue for us.

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