dev@glassfish.java.net

Re: UnsupportedClassVersionError

From: Pierre Delisle <Pierre.Delisle_at_Sun.COM>
Date: Mon, 11 Jul 2005 14:25:13 -0700

Jeanfrancois Arcand wrote:
> Salut Pierre,
>
> this usualy means you JAVA_HOME is not pointing to the wrong JDK, most
> probably 1.4.x. Make sure 1.5 is used.
>
> -- Jeanfrancois

Thanks for the quick reply Jean-Francois. However, I do use JSE 5.

See the output below where I output the value of JAVA_HOME and PATH,
as well as 'java -version'.

Anything else I could try to figure out what is going on?

Thanks,

     -- Pierre

D:\glassfish_tunnel\glassfish\bootstrap>echo %JAVA_HOME%
d:\jdk1.5.0_01

D:\glassfish_tunnel\glassfish\bootstrap>echo %PATH%
d:\jdk1.5.0_01\bin;D:\PROGRA~1\DZBATC~1/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\W
NDOWS\System32\Wbem;d:\bin;d:\cvs-1-12-9;d:\apache-ant-1.6.2\bin;D:\Program Fil
s\SecureCRT\;d:\Program Files\dzbatcher\bin;d:\maven-1.0.2\bin;D:\Program Files
dzbatcher

D:\glassfish_tunnel\glassfish\bootstrap>java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode)

D:\glassfish_tunnel\glassfish\bootstrap>maven configure-runtime
 __ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2

Attempting to download glassfish-image-SNAPSHOT.jar.
build:start:

configure-runtime:
    [exec] java.lang.UnsupportedClassVersionError: com/sun/enterprise/cli/frame
ork/CLIMain (Unsupported major.minor version 49.0)
    [exec] at java.lang.ClassLoader.defineClass0(Native Method)
    [exec] at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    [exec] at java.security.SecureClassLoader.defineClass(SecureClassLoade
.java:123)
    [exec] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    [exec] at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    [exec] at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    [exec] at java.security.AccessController.doPrivileged(Native Method)
    [exec] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [exec] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274

    [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [exec] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302

    [exec] Exception in thread "main"
BUILD SUCCESSFUL
Total time: 1 minutes 10 seconds
Finished at: Mon Jul 11 14:12:26 PDT 2005

D:\glassfish_tunnel\glassfish\bootstrap>


>
> Pierre Delisle wrote:
>
>> I just started a glassfish workspace from scratch.
>>
>> "maven bootstrap" worked fine.
>> However, when I run "maven configure-runtime", I get the following error:
>>
>> java.lang.UnsupportedClassVersionError: com/sun/enterprise/cli/framew
>> ork/CLIMain (Unsupported major.minor version 49.0)
>>
>> I remember having that error in the past, and I believe it was caused
>> by not using JSE 5.0. However, I do use JSE 5.0 in this case.
>> Details below.
>> Thanks,
>>
>> -- Pierre
>>
>> --------------------------------------------
>>
>>
>> D:\glassfish_tunnel\glassfish\bootstrap>maven configure-runtime
>> __ __
>> | \/ |__ _Apache__ ___
>> | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
>> |_| |_\__,_|\_/\___|_||_| v. 1.0.2
>>
>> Attempting to download glassfish-image-SNAPSHOT.jar.
>> build:start:
>>
>> configure-runtime:
>> [exec] java.lang.UnsupportedClassVersionError:
>> com/sun/enterprise/cli/framew
>> ork/CLIMain (Unsupported major.minor version 49.0)
>> [exec] at java.lang.ClassLoader.defineClass0(Native Method)
>> [exec] at
>> java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>> [exec] at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader
>> .java:123)
>> [exec] at
>> java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>> [exec] at
>> java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>> [exec] at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>> [exec] at java.security.AccessController.doPrivileged(Native
>> Method)
>> [exec] at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>> [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>> [exec] at
>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>>
>> [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>> [exec] at
>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>
>> [exec] Exception in thread "main"
>> BUILD SUCCESSFUL
>> Total time: 1 minutes 14 seconds
>> Finished at: Mon Jul 11 13:26:20 PDT 2005
>>
>> D:\glassfish_tunnel\glassfish\bootstrap>java -version
>> java version "1.5.0_01"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
>> Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode)
>>
>> D:\glassfish_tunnel\glassfish\bootstrap>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>