thofer [
https://community.jboss.org/people/thofer] created the discussion
"HandlerChain Annotation leading to ClassNotFoundException"
To view the discussion, visit:
https://community.jboss.org/message/728232#728232
--------------------------------------------------------------
Before digging deeper, or throwing this approach to the trashcan, I'm asking you for
some advice.
I'm deploying an EAR with a WAR and some JARs.
EAR
- WAR
| - classes
| - lib
| - configfiles ...
- JARs
In the classes of the WAR is an JAX-WS annotated EJB (Stateless). The @HandlerChain
annotation gets resolved but the class mentioned in the handler-chain.xml couldn't be
loaded ...? No matter if I put the jar into WAR/lib, or extract the contents and put it
into WAR/classes. I tried the JBoss lib folder too. The only thing I get is
{code}
org.jboss.deployers.spi.DeploymentException: Error during deploy:
vfs:///opt/..../jboss-6.0.0.Final/server/default/deploy/picketlink/SwgCoreEar-1.0.ear/SwgPdp-1.0.war/
at
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)
[:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
[:2.2.0.GA]
at
org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
[:6.0.0.Final]
at
org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)
[:0.2.2]
at
org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240)
[:0.2.2]
at
org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192)
[:0.2.2]
at
org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57)
[:0.2.2]
at
org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74)
[:0.2.2]
at
org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95)
[:0.2.2]
at
org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135)
[:0.2.2]
at
org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at
org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[:1.6.0_22]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
[:1.6.0_22]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
[:1.6.0_22]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[:1.6.0_22]
at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]
Caused by: javax.xml.ws.WebServiceException: javax.xml.ws.WebServiceException: Failed to
instantiate handler
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:335) [:2.3.1]
at
org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:62)
[:3.4.1.GA]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:238) [:2.3.1]
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:481) [:2.3.1]
at
org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:112)
[:3.4.1.GA]
at
org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:110)
[:3.4.1.GA]
at
org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:123)
[:6.0.0.Final]
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
[:2.2.0.GA]
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
[:2.2.0.GA]
... 37 more
Caused by: javax.xml.ws.WebServiceException: Failed to instantiate handler
at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:131)
[:2.3.1]
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.processHandlerElement(AnnotationHandlerChainBuilder.java:267)
[:2.3.1]
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.processHandlerChainElement(AnnotationHandlerChainBuilder.java:167)
[:2.3.1]
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:120)
[:2.3.1]
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:284)
[:2.3.1]
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.buildHandlerChain(JaxWsServerFactoryBean.java:215)
[:2.3.1]
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.init(JaxWsServerFactoryBean.java:194)
[:2.3.1]
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:184)
[:2.3.1]
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:407) [:2.3.1]
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:314) [:2.3.1]
... 45 more
Caused by: java.lang.ClassNotFoundException:
at.ac.tuwien.auto.smartwebgrid.security.soaphandler.SignatureHandler from
BaseClassLoader@4715959e{vfs:///opt/.../jboss-6.0.0.Final/server/default/deploy/picketlink/SwgCoreEar-1.0.ear/SwgPdp-1.0.war/}
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480)
[jboss-classloader.jar:2.2.0.GA]
at java.lang.ClassLoader.loadClass(ClassLoader.java:266) [:1.6.0_22]
at java.lang.Class.forName0(Native Method) [:1.6.0_22]
at java.lang.Class.forName(Class.java:264) [:1.6.0_22]
at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:121)
[:2.3.1]
... 54 more
{code}
handler-chain.xml:
{code:xml}
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<javaee:handler-chains xmlns:javaee="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema
http://www.w3.org/2001/XMLSchema">
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-class>at.ac.tuwien.auto.smartwebgrid.security.soaphandler.SignatureHandler</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</javaee:handler-chains>
{code}
I'm using the excat configuration in another project with jetty ... works great!
Environment:
OpenJDK 6, JBoss 6 Final
Before adding that HandlerChain config file thing everything worked fine ...
I guess that something goes wrong with the BaseClassLoader.
Thank you in advance.
regards
tom
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/728232#728232]
Start a new discussion in JBoss Web Services at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]