0

I am getting the below error while trying to publish the application EAR in the server.

Deployment from com.ibm.etools.ejbdeploy.EJBDeployer had errors:  

    RMIC Command returns RC = MyApplicationEJB. The problems which stopped RMIC are displayed, and have also been recorded in the .log file in error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    java.lang.ClassFormatError: JVMCFRE074 no Code attribute specified; class=javax/ejb/RemoveException, method=<init>()V, pc=0
        at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:212)
        at com.ibm.tools.rmic.iiop.DirectoryLoader.loadClass(DirectoryLoader.java:149)
        at com.ibm.tools.rmic.iiop.CompoundType.loadClass(CompoundType.java:354)
        at com.ibm.tools.rmic.iiop.Type.initClass(Type.java:1008)
        at com.ibm.tools.rmic.iiop.Type.setRepositoryID(Type.java:1025)
        at com.ibm.tools.rmic.iiop.CompoundType.initialize(CompoundType.java:762)
        at com.ibm.tools.rmic.iiop.ValueType.initialize(ValueType.java:323)
        at com.ibm.tools.rmic.iiop.ValueType.forValue(ValueType.java:131)
        at com.ibm.tools.rmic.iiop.CompoundType.getMethodExceptions(CompoundType.java:1678)
        at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java:2457)
        at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1308)
        at com.ibm.tools.rmic.iiop.RemoteType.isConformingRemoteInterface(RemoteType.java:222)
        at com.ibm.tools.rmic.iiop.RemoteType.initialize(RemoteType.java:171)
        at com.ibm.tools.rmic.iiop.RemoteType.forRemote(RemoteType.java:90)
        at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java:852)
        at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java:2408)
        at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1308)
        at com.ibm.tools.rmic.iiop.RemoteType.isConformingRemoteInterface(RemoteType.java:222)
        at com.ibm.tools.rmic.iiop.RemoteType.initialize(RemoteType.java:171)
        at com.ibm.tools.rmic.iiop.RemoteType.forRemote(RemoteType.java:90)
        at com.ibm.tools.rmic.iiop.CompoundType.addRemoteInterfaces(CompoundType.java:1455)
        at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:166)
        at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:92)
        at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java:892)
        at com.ibm.tools.rmic.iiop.ClassType.initParents(ClassType.java:197)
        at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:156)
        at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:92)
        at com.ibm.tools.rmic.iiop.StubGenerator.getTopType(StubGenerator.java:151)
        at com.ibm.tools.rmic.iiop.Generator.generate(Generator.java:285)
        at sun.rmi.rmic.Main.doCompile(Main.java:547)
        at sun.rmi.rmic.Main.compile(Main.java:148)
        at sun.rmi.rmic.Main.main(Main.java:786)
    1 error

Can anybody please help me out in this.

I am using - Websphere 9.1 and jdk 1.6. Interesting thing is my colleagues who have a lower version of Websphere - 8.0, do not get this error.

UPDATE: My Websphere's Runtime Environment is - WebSphere Application Server v7.0

tarares
  • 392
  • 4
  • 10
  • 27

1 Answers1

0

In general a ClassFormatError means that the class with the error was compiled at a java level that is greater than the java level being used at runtime.

In the case of WebSphere v9.0 (which only support Java 8+), the javax/ejb/RemoveException class is compiled at the Java 7 level, so running WAS on Java 6 with a class compiled at the Java 7 or higher level will result in a ClassFormatError.


Update:
You have mentioned in the comments that you are using WAS v7.0 and not WAS v9. The overall explanation is the same regardless of what version of WAS you are using, namely, you can't run on a lower java level than what the classes were compiled with.

I recommend checking what java version the javax/ejb/RemoveException class in your WAS install was compiled at, and compare it to the java level you are running on.

Community
  • 1
  • 1
Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
  • Hi - I forgot to mention that my Websphere's Runtime Environment is - WebSphere Application Server v7.0. I have updated the question – tarares May 02 '17 at 18:55
  • your question still states "I am using WebSphere 9.1". What exactly do you mean by this? – Andy Guibert May 03 '17 at 01:04