The Artima Developer Community
Sponsored Link

Java Answers Forum
Re: error: Invalid class file format , major-minor version is too recent

2 replies on 1 page. Most recent reply: Sep 18, 2003 7:55 AM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
David Chalissary

Posts: 1
Nickname: cad4567
Registered: Sep, 2003

Re: error: Invalid class file format , major-minor version is too recent Posted: Sep 18, 2003 6:11 AM
Reply to this message Reply
Advertisement
Hi all,

I am using ant 1.3 and with ant 1.5.4, I am getting the following
error. Would applreciate if any have encountered this error and have
resolved the same.
I have the latest version of JDK - 1.4.2.

Apache Ant version 1.5.4 compiled on August 12 2003
Buildfile: BTSUtilityBuild.xml
Detected Java version: 1.4 in: C:\j2sdk1.4.2\jre
Detected OS: Windows 2000
parsing buildfile BTSUtilityBuild.xml with URI =
file:C:/javaproj/utility/BTSUtilityBuild.xml
Project base dir set to: C:\javaproj\utility
Build sequence for target `deploy' is [init, prepare, common-compile,
junit-test, general-manifest-inf, common-jar, client-meta-inf, normal-
jar, j2ee-meta-inf, ejb-jar, release-meta-inf, ear-ear, deploy]
Complete build sequence is [init, prepare, common-compile, junit-
test, general-manifest-inf, common-jar, client-meta-inf, normal-jar,
j2ee-meta-inf, ejb-jar, release-meta-inf, ear-ear, deploy]

init:
[property] Loading C:\javaproj\utility\BTSUtilityBuild.properties

prepare:
[mkdir] Created dir: C:\javaproj\utility\build\classes
[mkdir] Created dir: C:\javaproj\utility\dist
[mkdir] Created dir: C:\javaproj\utility\dist\classes
[mkdir] Created dir: C:\javaproj\utility\dist\release
[mkdir] Created dir: C:\javaproj\utility\dist\classes\ejb
[mkdir] Created dir: C:\javaproj\utility\dist\classes\client
[mkdir] Created dir: C:\javaproj\utility\dist\classes\common
[mkdir] Created dir: C:\javaproj\utility\dist\release\META-INF
[mkdir] Created dir: C:\javaproj\utility\dist\classes\ejb\META-INF
[mkdir] Created dir: C:\javaproj\utility\dist\classes\common\META-
INF
[mkdir] Created dir: C:\javaproj\utility\dist\classes\client\META-
INF
[mkdir] Created dir: C:\javaproj\utility\dist\deployear
[mkdir] Created dir: C:\javaproj\utility\dist\manifest
[mkdir] Created dir:
C:\javaproj\utility\dist\manifest\release\META-INF
[mkdir] Created dir:
C:\javaproj\utility\dist\manifest\client\META-INF
[mkdir] Created dir:
C:\javaproj\utility\dist\manifest\common\META-INF
[mkdir] Created dir: C:\javaproj\utility\dist\manifest\ejb\META-
INF


after this is the compilation.....


[javac] Using modern compiler
[javac] Compilation arguments:
[javac] '-d'
[javac] 'C:\javaproj\utility\build\classes'
[javac] '-classpath'

[javac] 'C:\javaproj\utility\build\classes;C:\javaproj\lib\ant.jar;C:\
javaproj\lib\opt ional.jar;C:\javaproj\lib\log4j-
1.2.8.jar;C:\javaproj\lib\junit.jar;C:\javaproj \lib\struts.jar;C:\java
proj\lib\jakarta-regexp-1.2.jar;C:\javaproj\lib\jakarta- oro-
2.0.jar;C:\javaproj\lib\jaxp.jar;C:\javaproj\lib\parser.jar;C:\javapro
j\li b\ejb.jar;C:\javaproj\lib\jndi.jar;C:\javaproj\lib\orion.jar;C:\ja
vaproj\lib\or acle12.zip;C:\javaproj\lib\jta.jar;C:\javaproj\utility;C:
\j2sdk1.4.2\lib\tools. jar;C:\apache-ant-1.5.4\lib\xml-
apis.jar;C:\apache-ant-1.5.4\lib\xercesImpl.jar ;C:\apache-ant-1.5.4
\lib\optional.jar;C:\apache-ant-1.5.4\lib\ant.jar;C:\junit3 .8.1
\junit.jar'
[javac] '-sourcepath'
[javac] 'C:\javaproj\utility\src\java\com\siemens\bts\common'
[javac] '-g:none'
[javac]
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.


and finally during deployment I get the following error

 Executing 'C:\j2sdk1.4.2\jre\bin\java.exe' with arguments:
[java] '-verbose'
[java] '-showversion'
[java] '-server'
[java] '-classpath'
[java] 'C:\oc4j_1.0.2.2.1\orion.jar;C:\oc4j_1.0.2.2.1
\ejb.jar;C:\oc4j_1.0.2.2.1\jndi.jar'
[java] 'com.evermind.client.orion.OrionConsoleAdmin'
[java] 'ormi://localhost:27180'
[java] 'admin'
[java] 'admin'
[java] '-deploy'
[java] '-file'
[java] 'dist/deployear/utility.ear'
[java] '-deploymentName'
[java] 'utility'
[java] 
[java] The ' characters around the executable and arguments are
[java] not part of the command.
 
[java] java version "1.4.2"
[java] Java(TM) 2 Runtime Environment, Standard Edition (build 
1.4.2-b28)
[java] Java HotSpot(TM) Server VM (build 1.4.2-b28, mixed mode)
 
[java] Auto-unpacking C:\oc4j_1.0.2.2.1\applications\utility.ear... 
done.
[java] Auto-deploying utility (New server version detected)...
[java] error: Invalid class file format in C:\Program 
Files\Java\j2re1.4.2\lib\rt.jar
(java/rmi/NoSuchObjectException.class). The major.minor 
version '48.0' is too recent for this tool to understand.
[java] ErrorRemote_StatelessSessionBeanWrapper0.java:2: Class 
java.rmi.NoSuchObjectException not found in import.
 
[java] import java.rmi.NoSuchObjectException;
[java] ^
[java] error: Invalid class file format in C:\Program 
Files\Java\j2re1.4.2\lib\rt.jar(java/lang/Object.class). The 
major.minor version '48.0' is too recent for this tool to understand.
[java] ErrorRemote_StatelessSessionBeanWrapper0.java:0: Class 
java.lang.Object not found in class com.evermind.util.Link.
[java] import javax.ejb.*;
[java] ^
[java] 4 errors
[java] com.evermind.compiler.CompilationException: Syntax error 
in source
[java] at com.evermind.compiler.FileLinkedCompilation.run
(FileLinkedCompilation.java:90)
[java] at java.security.AccessController.doPrivileged(Native 
Method)
[java] at com.evermind.compiler.FileLinkedCompiler.compile
(FileLinkedCompiler.java:19)
[java] at com.evermind.compiler.Javac.compile(Javac.java:37)
[java] at 
com.evermind.server.ejb.compilation.Compilation.compileClasses
(Compilation.java:330)
[java] at 
com.evermind.server.ejb.compilation.Compilation.compile
(Compilation.java:251)
[java] at 
com.evermind.server.administration.ServerApplicationInstallation.finis
h(ServerApplicationInstallation.java:409)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at com.evermind.server.rmi.RMICallHandler.run
(RMICallHandler.java:66)
[java] at com.evermind.util.ThreadPoolThread.run
(ThreadPoolThread.java:62)
 
[java] [Loaded java.lang.Shutdown from C:\j2sdk1.4.2
\jre\lib\rt.jar]
[java] [Loaded java.lang.Shutdown$Lock from C:\j2sdk1.4.2
\jre\lib\rt.jar]


Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: error: Invalid class file format , major-minor version is too recent Posted: Sep 18, 2003 7:34 AM
Reply to this message Reply
Another David :-)

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: error: Invalid class file format , major-minor version is too recent Posted: Sep 18, 2003 7:55 AM
Reply to this message Reply
major minor exception is seen when the JDK version is not matched.(??? open to inputs from viewers...)


I was using webstart and in my JNLP file when i was using

<j2se version="1.3"> i was gettin major minor exception.

I was having jdk1.4.2 at that time.

SO i chnaged this version from 1.3 to 1.3+ and it worked.

If u are using any such file where u are using jdk version make sure it points to the current version.

May be I was getting problem in other context but thought it may be helpful to u........

Flat View: This topic has 2 replies on 1 page
Topic: window.location.href= Question Previous Topic   Next Topic Topic: Passing array of objects into methods

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use