db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DERBY-6785) Latest JDBC driver from 10.11.1.1 gives exception when trying to connect to 10.10.2.0
Date Fri, 19 Dec 2014 05:15:13 GMT

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

Mike Matrigali edited comment on DERBY-6785 at 12/19/14 5:14 AM:
-----------------------------------------------------------------

I agree with rick, derby explicitly does not support direct access to the COLUMNDATATYPE.
 Derby provides
jdbc standard interfaces to look at metadata.  While it may have worked in the past this was
an accident.  Some day
derby may want to change the class that implements COLUMNDATATYPE internally and then it would
not work at all
for an old client to access a new database as it would not have a class that understood the
new type.  But using the jdbc metadata standards would work.

It was necessary to change the java version used to compile derby in 10.11 as the community
voted to allow that release to use new java language features that required using a newer
java version to build derby.


Do post if you have any other examples of the marshaling error that do not involve directly
querying derby private
system catalog data.  Your initial report mentioned problems with alter table and creating
indexes.  My guess is that
if you are seeing that problem with your tool doing those operations, it may indicate that
the tool is again incorrectly
querying the private system catalog data.


was (Author: mikem):
I agree with rick, derby explicitly does not support direct access to the COLUMNDATATYPE.
 Derby provides
jdbc standard interfaces to look at metadata.  While it may have worked in the past this was
an accident.  Some day
derby may want to change class that implements COLUMNDATATYPE internally and then it would
not work at all
for an old client to access a new database as it would not have a class that understood the
new type.

Do post if you have any other examples of the marshaling error that do not involve directly
querying derby private
system catalog data.  Your initial report mentioned problems with alter table and creating
indexes.  My guess is that
if you are seeing that problem with your tool doing those operations, it may indicate that
the tool is again incorrectly
querying the private system catalog data.

> Latest JDBC driver from 10.11.1.1 gives exception when trying to connect to 10.10.2.0
> -------------------------------------------------------------------------------------
>
>                 Key: DERBY-6785
>                 URL: https://issues.apache.org/jira/browse/DERBY-6785
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.10.2.0
>         Environment: Win 7, Win 8, Mac OSX and Ubuntu 14.04
>            Reporter: tariq rahiman
>             Fix For: 10.11.1.3
>
>         Attachments: DERBY-6785.sql, Screen Shot 2014-12-18 at 5.13.15 PM.png, Screen
Shot 2014-12-18 at 5.13.58 PM.png, derby.log, log.zip
>
>
> I have downloaded 10.11.1.1 and 10.10.2.0 from Apache Derby download and installed them
in 2 separate machines.
> I have a GUI client that connects to the toursdb database of both versions using a JDBC
connection that makes uses of derby.jar, derbyclient.jar and derbynet.jar
> I use the latest JDBC drivers from 10.11.1.1 to connect to both the database versions.
The drivers I make use of are derby.jar, derbyclient.jar and derbynet.jar
> Connection to 10.10.2.0 is successful, but when I try to Alter/Drop Tables and Views,
Create an Index or try to retrieve column information of tables, i get the below exception:
> The classpath settings for the two environments are identical and If i replace the derby.jar,
derbyclient.jar and derbynet.jar of the latest release with the 10.10.2.0 ones, it works fine
with 10.10.2.0. 
> So my question is backward compatibility of the latest Apache Derby JDBC drivers. Can
I use 10.11.1.1 jars to connect to 10.10.2.0 ?
> Exception:
> java.sql.SQLException: Error marshalling or unmarshalling a user defined type: org.apache.derby.catalog.types.TypeDescriptorImpl;
local class incompatible: stream classdesc serialVersionUID = -5485274209578709396, local
class serialVersionUID = -3812847726962874375
> 	at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.ClientResultSet.getString(Unknown Source)
> 	at \\...\\ .\\हिñçêČάй語简�?한\\.cꋦᚹ⣞ꊼ 8.a(Unknown Source)
> 	at com.common.ui.tree.eꏷꃒꆶᡰ.a(Unknown Source)
> 	at com.common.ui.tree.eꏷꃒꆶᡰ.wR(Unknown Source)
> 	at com.common.ui.tree.eꏷꃒꆶᡰ$1.process(Unknown Source)
> 	at com.common.ui.util.BackgroundThread.run(Unknown Source)
> Caused by: ERROR XN020: Error marshalling or unmarshalling a user defined type: org.apache.derby.catalog.types.TypeDescriptorImpl;
local class incompatible: stream classdesc serialVersionUID = -5485274209578709396, local
class serialVersionUID = -3812847726962874375
> 	at org.apache.derby.client.am.Cursor.get_UDT(Unknown Source)
> 	at org.apache.derby.client.am.Cursor.getString(Unknown Source)
> 	... 6 more
> Caused by: java.io.InvalidClassException: org.apache.derby.catalog.types.TypeDescriptorImpl;
local class incompatible: stream classdesc serialVersionUID = -5485274209578709396, local
class serialVersionUID = -3812847726962874375
> 	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:617)
> 	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622)
> 	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> 	... 8 more
> Let me know if you need any more information



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message