[
https://issues.apache.org/jira/browse/DERBY-6785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14252693#comment-14252693
]
Rick Hillegas commented on DERBY-6785:
--------------------------------------
I am not able to reproduce what Tariq is seeing. This is what I did:
1) I downloaded and unzipped the 10.10.2.0 binzip distro into
/Users/rhillegas/derby/10.10.2.0
2) In one shell window, I cd'd to
/Users/rhillegas/derby/10.10.2.0/db-derby-10.10.2.0-bin/bin and ran the
startNetworkServer script, bringing up the 10.10.2.0 server.
3) In another shell window, I brought up ij using the 10.11.1.1 jars. Then I
successfully created an index on the airliines table using this command:
{noformat}
create index distance_discount_index on airlines( distance_discount );
{noformat}
The derby.log which Tariq attached indicates that he was NOT able to even
connect to the 10.10.2.0 toursdb database. But he claims that he did
successfully connect to the 10.10.2.0 database using a 10.10.2.0 server and a
10.11.1.1 client--just as I did. I am not able to make sense of this evidence.
The error message is consistent with the fact that TypeDescriptorImpl does not
explicitly declare a serialVersionUID and the two versions of Derby were
compiled with different compilers. So you would expect to see that error if you
were trying to select, say, SYS.SYSCOLUMNS.COLUMNDATATYPE out of a 10.10.2.0
database using a 10.10.2.0 server and a 10.11.1.1 client. The Derby Reference
Manual section on SYS.SYSCOLUMNS says that the TypeDescriptor interface is not
part of the public API. You should not expect to be able to select this column
directly. Instead, you should use JDBC metadata to retrieve column information.
For complicated queries, you can use the optional databaseMetaData tool
described in the Tools Guide.
If you MUST select this column, you might try the following: On the client
side, use the 10.11.1.1 derbyclient.jar and the 10.10.2.0 derby.jar. Note that
I haven't tried that experiment.
Hope this helps,
-Rick
> 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, 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)