db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: SQLException thrown from Table Function ResultSet
Date Tue, 05 Feb 2008 14:45:35 GMT
Thanks for pointing out this issue, Frank. I think that this is an 
instance of a larger problem: A SQLException thrown by any user-coded 
function will choke the network connection on a ClassCastException. I 
see this behavior as far back as Derby 10.1. I have logged DERBY-3390 to 
track this.

Regards,
-Rick

Frank Griffin wrote:
> When I do this, I get lots of:
>
> 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.DRDAConnThread.buildTokenizedSqlerrmc(DRDAConnThread.java:5906)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.buildSqlerrmc(DRDAConnThread.java:5844)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.writeSQLCAGRP(DRDAConnThread.java:5733)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARD(DRDAConnThread.java:5559)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.cleanUpAndCloseResultSet(DRDAConnThread.java:681)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:847)
>     at
> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:277)
> Execution failed because of Permanent Agent Error: SVRCOD = 40; RDBNAM =
> NOMAD; diagnostic msg = java.sql.SQLException cannot be cast to
> org.apache.derby.impl.jdbc.EmbedSQLException
>
>
> Should Table Function ResultSets be throwing EmbedSQLException ?  The
> current docs only say that the Table Function should implement
> ResultSet, which throws SQLException.
>   


Mime
View raw message