db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1710) Unchecked casts from SQLException to EmbedSQLException cause ClassCastException in NetworkServerControlImpl when running Java SE 6
Date Thu, 17 Aug 2006 22:03:15 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1710?page=comments#action_12428807 ] 
            
Bryan Pendleton commented on DERBY-1710:
----------------------------------------

Hi Knut Anders, this change looks good to me. I think your technique is fine.


> Unchecked casts from SQLException to EmbedSQLException cause ClassCastException in NetworkServerControlImpl
when running Java SE 6
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1710
>                 URL: http://issues.apache.org/jira/browse/DERBY-1710
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.2.0.0
>         Environment: Java SE 6 (beta)
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1710.diff, derby-1710.stat
>
>
> Since Derby doesn't raise EmbedSQLExceptions when running Java SE 6 or later, casts from
SQLException to EmbedSQLException fail with a ClassCastException.
> To reproduce, start a network server with Java SE 6, and with derby.drda.debug enabled:
>   java -Dderby.drda.debug=true org.apache.derby.drda.NetworkServerControl start
> In another terminal, stop the server with this command:
>   java org.apache.derby.drda.NetworkServerControl shutdown
> When the server stops, it will print
> java.sql.SQLException cannot be cast to org.apache.derby.impl.jdbc.EmbedSQLException
> java.lang.ClassCastException: java.sql.SQLException cannot be cast to org.apache.derby.impl.jdbc.EmbedSQLException
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(NetworkServerControlImpl.java:665)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(NetworkServerControlImpl.java:1739)
>         at org.apache.derby.drda.NetworkServerControl.main(NetworkServerControl.java:239)

-- 
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

        

Mime
View raw message