db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5542) Remove checks for Java version being greater than or equal to 1.4
Date Fri, 16 Dec 2011 09:08:30 GMT

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

Knut Anders Hatlen commented on DERBY-5542:
-------------------------------------------

Since we compile every class in Derby with target level 1.4 or higher, none of the classes
will even load on a pre-jdk14 jvm. This is what I see with Java 1.3 and Derby 10.8.2.2:

java.lang.UnsupportedClassVersionError: org/apache/derby/tools/sysinfo (Unsupported major.minor
version 48.0)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)

Even though most of the engine classes must still be compiled with target level 1.4 for CDC/FP
support, we'll probably want to change the target level to 1.5 for the JDBC 3.0 specific classes
(like EmbeddedDriver and EmbeddedDataSource), so that a similar error will be seen when trying
to load Derby 10.9 on Java 1.4.
                
> Remove checks for Java version being greater than or equal to 1.4
> -----------------------------------------------------------------
>
>                 Key: DERBY-5542
>                 URL: https://issues.apache.org/jira/browse/DERBY-5542
>             Project: Derby
>          Issue Type: Improvement
>          Components: Miscellaneous
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>         Attachments: d5542.diff
>
>
> The code contains some checks for JVMInfo.JDK_ID >= JVMInfo.J2SE_14. That condition
evaluates to true on all currently supported platforms (including on CDC/FP), so the checks
can be removed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message