cancel
Showing results for 
Search instead for 
Did you mean: 

UnsupportedClassVersionError when using Session Beans

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Also, this help link gives a good idea of CE SAP JVM version and architecture. Please make sure your VMs are compatible.

http://help.sap.com/saphelp_nwce10/helpdata/en/47/dc90b4ef17452289f9128b8c2bbd77/frameset.htm

Former Member
0 Kudos

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.