Skip to Content
author's profile photo Former Member
Former Member

UnsupportedClassVersionError when using Session Beans

Hi, I'm using:

SAP NetWeaver Developer Studio

SAP NetWeaver 7.1 Composition Environment SP03 PAT0000

Build id: 200710302120

What I do is the following:

- I create a software component:

- In there, I create a development component (EJB)

- Also, I create another development component (enterprise application), and relate the first DC to it.

- I build and deploy, works fine.

- I create a session bean in the EJB DC.

- I build and deploy. I recieve the following warning.

		  S U M M A R Y
~~~~~~~~~~~~~~~~~~~

Successfully deployed:	      0

Deployed with warnings:	      1

Failed deployments:		      0

~~~~~~~~~~~~~~~~~~~

1. File:C:\Documents and Settings\vici\Mijn documenten\My NetWeaver Projects.jdi\LocalDevelopment\ViSkill\vici-nl.com\ear\_comp\gen\default\deploy\vici-nl.com~ear.ear
	Name:ear
	Vendor:vici-nl.com
	Location:localDevelopment
	Version:20080328113023
	Deploy status:Warning
	Version:SAME

	Description:
		1. Exception has been returned while the 'vici-nl.com/ear' was starting. Warning/Exception :
[ERROR CODE DPL.DS.6193] Error while ; nested exception is: 
	com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5030] Clusterwide exception: server ID 8338250:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5082] Exception while preparing start of application vici-nl.com/ear.
	at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:229)
	at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)
	at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:419)
	at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:444)
	at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:334)
	at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:550)
	at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:248)
	at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:389)
	at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3387)
	at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3373)
	at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3276)
	at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3249)
	at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:99)
	at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:62)
	at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
	at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
	at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:80)
	at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:56)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:741)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:732)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:576)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:270)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:192)
	at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:875)
	at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
	at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
	at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
	at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
	at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
	at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
	at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
	at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
	at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:654)
	at com.sap.engine.boot.loader.ResourceMultiParentClassLoader.loadClassLocal(ResourceMultiParentClassLoader.java:198)
	at com.sap.engine.boot.loader.MultiParentClassLoader.findClassInLoaderGraph(MultiParentClassLoader.java:306)
	at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:256)
	at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:228)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitialization.loadApplicationClass(Actions_BeanClassesInitialization.java:54)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitialization.loadApplicationClasses(Actions_BeanClassesInitialization.java:41)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_ComponentInterfacesProviderClassesInitialization.loadApplicationClasses(Actions_ComponentInterfacesProviderClassesInitialization.java:20)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_SessionBeanClassesInitialization.loadApplicationClasses(Actions_SessionBeanClassesInitialization.java:20)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_StatelessBeanClassesInitialization.loadApplicationClasses(Actions_StatelessBeanClassesInitialization.java:18)
	at com.sap.engine.services.ejb3.runtime.impl.Actions_BeanClassesInitialization.perform(Actions_BeanClassesInitialization.java:27)
	at com.sap.engine.services.ejb3.container.CompositeAction.perform(CompositeAction.java:81)
	at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(ApplicationStarter.java:59)
	at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:887)
	at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:425)
	at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:219)
	... 32 more

Result
Status:Warning

Why is this happening and what can I do about it?

Some extra information:

- The java compiler of all projects are set to 5.0.

- The installed jre of NWDS is set to C:\Program Files\Java\jdk1.5.0_15\

- JAVA_HOME is set to C:\Program Files\Java\jdk1.5.0_15\

- I reinstalled NWDS and set the requested java path to C:\Program Files\Java\jdk1.5.0_15\ during installation.

Help is much appreciated!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 28, 2008 at 11:05 AM

    Vincent,

    I have suffered alot because of this error. The first thing make sure that the jdk you are using is 5.0.

    make sure that you donot have the new jdk version installed on your machine jdk 6.0 if you do please remove it, i dont know why but the compiler keeps using this jdk even if all the parameters are set correctly.

    if you do have it then uninstall it and copy the contents of the jdk 5.0 version to the jdk folder of the newer release it should be under c:\Sun\etc.. however you should unistall it first.

    Regards,

    Ahmed salah

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 28, 2008 at 11:05 AM

    Looks like you have some mismatch between the Java that you for compilation and execution. If your CE is locally installed on your machine, I would recommend that you point your NWDS to use the same JVM that CE WAS uses. If not, atleast make sure they are the same version.

    Rao

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you

      Apparently my CE was using 1.5.0_10, while i was using 1.5.0_15. So I installed the 1.5.0_10 from sun and now i can run as supposed to.

      I couldnt find a way to change the CE JVM so I just used two JVMs of the same version.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.