db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4888) ClassCastException when calling boolean meta-data functions with 10.7 client against 10.6 server
Date Fri, 05 Nov 2010 19:22:47 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-4888:
--------------------------------------

    Attachment: boolean.diff

The problem appears to be that the client thinks 10.6 sends boolean meta-data values as java.lang.Boolean
objects because of a typo in this method in client.am.DatabaseMetaData:

    final public boolean serverSupportsBooleanValues() {
        return supportsUDTs_;
    }

It should return supportsBooleanValues_ (true for server >= 10.7) instead of supportsUDTs_
(true for server >= 10.6). The attached patch makes the ClassCastException go away for
me.

> ClassCastException when calling boolean meta-data functions with 10.7 client against
10.6 server
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4888
>                 URL: https://issues.apache.org/jira/browse/DERBY-4888
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: boolean.diff
>
>
> I noticed that DESCRIBE didn't work when I tried to connect to a 10.6 server with ij/client
driver at version 10.7.
> ij> describe t;
> JAVA ERROR: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
> 	at org.apache.derby.client.am.DatabaseMetaData.getMetaDataInfoBoolean(DatabaseMetaData.java:2401)
> 	at org.apache.derby.client.am.DatabaseMetaData.storesLowerCaseIdentifiers(DatabaseMetaData.java:191)
> 	at org.apache.derby.impl.tools.ij.ij.caIdentifier(ij.java:3040)
> 	at org.apache.derby.impl.tools.ij.ij.DescTableStatement(ij.java:1624)
> 	at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:1121)
> 	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:341)
> 	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:261)
> 	at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
> 	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
> 	at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
> 	at org.apache.derby.tools.ij.main(ij.java:59)
> 	at org.apache.derby.iapi.tools.run.main(run.java:53)

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


Mime
View raw message