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 Mon, 04 Feb 2008 15:19:12 GMT
Hi Frank,

This looks like a bug in Derby. Table functions should raise 
SQLException according to the ResultSet contract.

Regards,
-Rick

Frank Griffin wrote:
> When my Table Function throws SQLException, 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