db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3380) derbyclient.jar is dependent on Java v6
Date Mon, 25 Feb 2008 23:05:51 GMT

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

Daniel John Debrunner commented on DERBY-3380:
----------------------------------------------

All the JDBC drivers are in a single jar (derby.jar for embedded) to make it easier for users,
they only ever have to worry about a single jar, not specific jars for specific JDK versions.

I would have thought Eclipse should be ignoring classes it cannot load (e.g. any java.lang.LinkageError
exception)

> derbyclient.jar is dependent on Java v6
> ---------------------------------------
>
>                 Key: DERBY-3380
>                 URL: https://issues.apache.org/jira/browse/DERBY-3380
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.2.1
>         Environment: Mac OS X 10.4, up to date with latest Apple Java updates 
>            Reporter: Steve Streeting
>            Priority: Blocker
>
> I've been using Derby on Windows without any problems. I can use the embedded database
on OS X 10.4, and fire up the server ok, but when I tried to add a client JDBC connection
in Eclipse 3.3 on Mac OS X, referencing derbyclient.jar I got an exception:
> java.lang.reflect.InvocationTargetException
> 	at org.eclipse.datatools.connectivity.ui.DriverClassBrowsePropertyDescriptor$1.run(DriverClassBrowsePropertyDescriptor.java:138)
> 	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
> Caused by: java.lang.Exception: java.lang.Exception: java.lang.UnsupportedClassVersionError:
Bad version number in .class file
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> 	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:579)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at org.eclipse.datatools.connectivity.internal.DriverUtil.getDriverClassesFromJar2(DriverUtil.java:121)
> 	at org.eclipse.datatools.connectivity.internal.DriverUtil.getDriverClassesFromJar(DriverUtil.java:84)
> 	at org.eclipse.datatools.connectivity.ui.DriverClassBrowsePropertyDescriptor$1.run(DriverClassBrowsePropertyDescriptor.java:135)
> 	... 1 more
> I used the 'BCVer' tool to dump the versions of the class files in derbyclient.jar, and
I found that several have a bytecode version of '50.0', which is Java 6. Therefore it would
appear that the class files in this archive were built against the Java 6 SDK and not Java
1.4 as is claimed. Here are the class files affected as dumped by bcver:
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/ClientPooledConnection40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/ClientXAConnection40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/CallableStatement40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/ColumnMetaData40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/FailedProperties40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/LogicalConnection40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/ParameterMetaData40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/PreparedStatement40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/SQLExceptionFactory40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/am/Statement40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/net/NetConnection40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/net/NetDatabaseMetaData40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/client/net/NetResultSet40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/jdbc/ClientConnectionPoolDataSource40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/jdbc/ClientDataSource40.class]
> 50.0  /Users/steve/devlibs/java/db-derby-10.3.2.1-bin/lib/derbyclient.jar[org/apache/derby/jdbc/ClientXADataSource40.class]
> I got the exception in Eclipse by creating a Generic JDBC connection referencing derbyclient.jar,
and clicking on the button next to 'Driver Class'.
> Please can you advise. For the moment I'm having to switch to using HSQL on Mac OS X.

-- 
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