Skip to Content
0
Former Member
Jan 07, 2008 at 07:35 AM

2-step-mapping of three JPA-entities: ClassCastException during deploy

24 Views

Hi experts,

I have three entities VERDECK, UZSB and SCHRAUBVORGANG and 1:n relations between them:

- 1 VERDECK consists of n UZSBs

- 1 USZB has several SCHRAUBVORGANGs

When I implement both relations I get a warning during deployment of the WebService (see stack trace below). It's "only" a warning, but in fact deployment is not successful. When I implement only the first relation (between VERDECK and UZSB), everything works fine.

Here's my code. What's wrong? Thanks for each hint,

Christoph

public class Verdeck implements Serializable {

@EmbeddedId

private VerdeckPK pk;

@Column(name="ID_VERDECK")

private String idVerdeck;

@OneToMany(mappedBy="verdeck")

private Set<Uzsb> uzsbCollection;

. . .

}

public class Uzsb implements Serializable {

@EmbeddedId

private UzsbPK pk;

@Column(name="TYP_UZSB")

private BigDecimal typUzsb;

@ManyToOne

@JoinColumns({

@JoinColumn(name="ID_PROJECT", referencedColumnName="ID_PROJECT"),

@JoinColumn(name="ID_INTERN", referencedColumnName="ID_INTERN")

})

private Verdeck verdeck;

@OneToMany(mappedBy="uzsb")

private Set<Schraubvorgang> schraubvorgangCollection;

. . .

}

public class Schraubvorgang implements Serializable {

@EmbeddedId

private SchraubvorgangPK pk;

@Column(name="ZEITPUNKT_START")

private Date zeitpunktStart;

@Column(name="ZEITPUNKT_ENDE")

private Date zeitpunktEnde;

@ManyToOne

@JoinColumns({

@JoinColumn(name="ID_UZSB", referencedColumnName="ID_UZSB"),

@JoinColumn(name="ID_PROJECT", referencedColumnName="ID_PROJECT")

})

private Uzsb uzsb;

. . .

}

Stack trace:

Description:

1. Exception has been returned while the 'sap.com/R57SchraubEAR' 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 3208550:com.sap.engine.services.deploy.container.DeploymentException:

at com.sap.engine.services.webservices.server.deploy.WebServicesDeployManager.makeStartInitially(WebServicesDeployManager.java:692)

at com.sap.engine.services.deploy.server.application.StartInitiallyTransaction.makeStartInitially(StartInitiallyTransaction.java:182)

at com.sap.engine.services.deploy.server.application.StartInitiallyTransaction.prepare(StartInitiallyTransaction.java:143)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:419)

at com.sap.engine.services.deploy.server.application.StartTransaction.doStartInitiallyGlobal(StartTransaction.java:449)

at com.sap.engine.services.deploy.server.application.StartTransaction.doStartInitially(StartTransaction.java:437)

at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:178)

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: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Exception occured during web services deployment. Unable to generate serialization framework for web service R57SchraubService, application sap.com/R57SchraubEAR.

at com.sap.engine.services.webservices.server.deploy.ws.WSInitialStartProcess.generateJAXWSFramework(WSInitialStartProcess.java:360)

at com.sap.engine.services.webservices.server.deploy.ws.WSInitialStartProcess.generateJAXWSFramework(WSInitialStartProcess.java:220)

at com.sap.engine.services.webservices.server.deploy.ws.WSInitialStartProcess.execute(WSInitialStartProcess.java:140)

at com.sap.engine.services.webservices.server.deploy.WSBaseAbstractDProcess.makeProcess(WSBaseAbstractDProcess.java:316)

at com.sap.engine.services.webservices.server.deploy.WebServicesDeployManager.makeStartInitially(WebServicesDeployManager.java:687)

... 37 more

Caused by: java.lang.ClassCastException: class com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$5:library:jaxb20@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@18a8bfa@alive

incompatible with class com.sun.xml.bind.v2.model.impl.ClassInfoImpl:library:jaxb20@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@18a8bfa@alive

at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getBaseClass(ClassInfoImpl.java:170)

at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:58)

at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getBaseClass(RuntimeClassInfoImpl.java:38)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:142)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)

at java.util.AbstractList$Itr.next(AbstractList.java:422)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)

at java.util.AbstractList$Itr.next(AbstractList.java:422)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)

at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)

at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)

at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)

at java.util.AbstractList$Itr.next(AbstractList.java:422)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:48)

at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:40)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)

at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:204)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:356)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:217)

at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)

at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)

at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)

at com.sap.engine.services.webservices.jaxws.j2w.JaxWsSchemaGenerator.genJaxbMappings(JaxWsSchemaGenerator.java:274)

at com.sap.engine.services.webservices.jaxws.j2w.JaxWsIMappingGenerator.generateWSDL(JaxWsIMappingGenerator.java:103)

at com.sap.engine.services.webservices.server.deploy.ws.WSInitialStartProcess.generateJAXWSFramework(WSInitialStartProcess.java:286)

... 41 more

Result

Status:Warning