users@glassfish.java.net

Unable to create JAXBContext due to security restriction

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Sep 2008 20:22:55 PDT

I'm trying to convert my stateless session bean into a web service. I annotated the local interface with @WebService and the implementation with @WebService and deployed my ear, to which I was greeted with this absolutely useless error message:

[#|2008-09-29T19:35:07.626-0700|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=47;_ThreadName=Thread-56;_RequestID=936d64ec-a841-4509-93e5-562a7794e8eb;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Unable to create JAXBContext due to the security restriction
        at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:83)
        at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:260)
        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:1843)
        at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2240)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
        at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:294)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
        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)
|#]

After a bit of googling someone suggested that glassfish was swallowing the "real" error, and that by running schemagen I could see that error, but running schemagen didn't generate any errors (once I got the classpath set up, anyway). So, I tried running wsgen but even with a correct classpath it refused to find certain of my classes, which I don't know how to debug.

Does anyone know how to find out what "security restriction" I am dealing with?

I'm pretty sure I'm using glassfish 2 ur2, but I couldn't find any version information inside the distribution folder so I don't know how to confirm what build this is.
[Message sent by forum member 'dobes' (dobes)]

http://forums.java.net/jive/thread.jspa?messageID=302472