[GLASSFISH-19355] Deployment failed - javax.xml.ws .WebServiceException: Unable to create JAXBContext Created: 18/Nov/12  Updated: 07/Jan/13  Resolved: 19/Nov/12

Status: Resolved
Project: glassfish
Component/s: web_services
Affects Version/s: v2.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: test_java Assignee: Martin Grebac
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris SPARC on 64-Bit



 Description   

I am attempting to upgrade our existing GlassFish that is currently running:
Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)

to recently released patch set 128647-33 - Sun GlassFish Enterprise Server 2.1.1 Patch19 (v2.1 Patch25) (9.1_02 Patch31)

After installing GlassFish patch, when deploying our web applications, seeing the following error:

[#|2012-11-06T15:14:02.710+0100|INFO|sun-appserver2.1.1|javax.enterprise.system.container.ejb|_ThreadID=81;_ThreadName=Thread-2078;|wsgen successful|#]

[#|2012-11-06T15:14:03.632+0100|WARNING|sun-appserver2.1.1|javax.enterprise.system.stream.err|_ThreadID=81;_ThreadName=Thread-2078;_RequestID=7df157a6-cbeb-44a8-91f6-8251d07076a6;|javax.xml.ws
.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:255)
at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:240)
at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:123)
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:1846)
at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2253)
at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:427)
at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:160)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:182)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.util.Map
at private java.util.Map com.sel.services.SELReport.jaxws.ReadTReportResponse._return
at com.sel.services.SELReport.jaxws.ReadTReportResponse
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at private java.util.Map com.sel.services.SELReport.jaxws.ReadTReportResponse._return
at com.sel.services.SELReport.jaxws.ReadTReportResponse
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at private java.util.Map com.sel.services.SELReport.jaxws.ReadTReportResponse._return
at sel.services.SELReport.jaxws.ReadTReportResponse

at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
... 18 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.util.Map
at private java.util.Map com.sel.services.SELReport.jaxws.ReadTReportResponse._return
at com.sel.services.SELReport.jaxws.ReadTReportResponse
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at private java.util.Map com.sel.services.SELReport.jaxws.ReadTReportResponse._return
at com.sel.services.SELReport.jaxws.ReadTReportResponse

at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:106)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:109)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:152)
... 20 more

#]

-----------

Please can you let me know what could be the issue

Thanks



 Comments   
Comment by Hong Zhang [ 19/Nov/12 ]

The stack trace is from webservices code, assign to webservices team for evaluation.

Comment by Martin Grebac [ 19/Nov/12 ]

I'm not familiar with what changes went into 2.1.1 / p19, but this looks like there are 2 possible causes:

  • there may be change in how web service methods are recognized - you may need to set 'com.sun.xml.ws.model.RuntimeModeler.legacyWebMethod=true' property
  • mismatch of api/impl - you're somehow mixing jaxb api and implementation versions, or started running on a different jdk, ...

So please verify the above, and if you still face the issue feel free to reopen the issue with simple reproducible app so that we can test. Thanks.

Comment by test_java [ 07/Jan/13 ]

Happy New Year!
Sorry for the delay in updating this thread.

Thank you for the response and we corrected by ensuring all the methods other than the webmethod (@WebMethod) should be private.

One more question, does GlassFish ESB v2.2 (2.1.1) does it work/supports Java 7

Thank you

Comment by Martin Grebac [ 07/Jan/13 ]

Hi, I don't think it has been tested, but that would be a question to ESB.

I'm not sure I understand your response though - does it mean the issue is gone after you updated the code to only expose @WebMethod methods, or does it mean you see the issue still - despite the correctio?

Generated at Tue Jan 17 02:46:04 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.