Kristian,
Thanks for the speedy reply. I've provided the relevant code below. As you can see, this WebService is contrived to see how user defined classes are handled.
First, there's the Web Service class:
package com.mw.ws;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService()
public class WebService2
{
@WebMethod(operationName = "operation1")
public ComplexClass1 operation1(@WebParam(name = "pComplex2")ComplexClass2 pComplex2)
{
ComplexClass1 lReturn = new ComplexClass1();
lReturn.setCompexField(pComplex2);
return lReturn;
}
}
Here's the code for ComplexClass1 and ComplexClass2:
public class ComplexClass1
{
private String cStrField;
private ComplexClass2 cComplexField;
public ComplexClass1()
{
cComplexField = new ComplexClass2();
}
public String getStrField()
{
return cStrField;
}
public void setStrField(String pStrField)
{
cStrField = pStrField;
}
public ComplexClass2 getComplexField()
{
return cComplexField;
}
public void setCompexField(ComplexClass2 pComplex)
{
cComplexField = pComplex;
}
}
package com.mw.ws;
import java.util.Date;
public class ComplexClass2
{
private int cIntField1;
private String cStrField1;
private Date cDateField1;
public ComplexClass2()
{
cDateField1 = new Date();
}
public Date getDateField1()
{
return cDateField1;
}
public void setDateField1(Date pDateField1)
{
this.cDateField1 = pDateField1;
}
public int getIntField1()
{
return cIntField1;
}
public void setIntField1(int pIntField1)
{
this.cIntField1 = pIntField1;
}
public String getStrField1()
{
return cStrField1;
}
public void setStrField1(String pStrField1)
{
this.cStrField1 = pStrField1;
}
}
Here's the output from the run-deploy ant script:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at /Users/mike/Documents/NetBeansProjects/WebAppWS/build/web
Start registering the project's server resources
Finished registering server resources
moduleID=WebAppWS
deployment started : 0%
Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext
/Users/mike/Documents/NetBeansProjects/WebAppWS/nbproject/build-impl.xml:581: The module has not been deployed.
BUILD FAILED (total time: 27 seconds)
And here's the stack trace that's produced in the Glassfish v2 output:
wsgen successful
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262)
at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:218)
at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:61)
at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:107)
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1845)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2249)
at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:424)
at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:157)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:179)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at java.lang.Exception
at java.sql.SQLException
at private java.sql.SQLException com.samepage.ws.jaxws.SQLExceptionBean.nextException
at com.samepage.ws.jaxws.SQLExceptionBean
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:148)
... 18 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at java.lang.Exception
at java.sql.SQLException
at private java.sql.SQLException com.samepage.ws.jaxws.SQLExceptionBean.nextException
at com.samepage.ws.jaxws.SQLExceptionBean
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:153)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:149)
... 20 more
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1848)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2249)
at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:424)
at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:157)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:179)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Thanks in advance for any insight you can provide,
Mike
[Message sent by forum member 'foobycho' (foobycho)]
http://forums.java.net/jive/thread.jspa?messageID=332223