Could not find the handler configuration file (JBoss EAP 6.1.1)

Latest response

I didn't have this error when I was using JBoss EAP 5.1. However, when I migrated to JBoss 6.1.1 I getting error that I stated below. I've looked at other thread in the JBoss forum for similar exception. Some suggested that I should start my file url with "/" (handler-chain.xml to /handler-chain.xml) but still getting same error. Also, all other exception that I looked had JBAS error code but error that I getting do not have JBAS error code. Please help.

12:07:48,173 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."main.ear"."webService.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."main.ear"."webService.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "webService.war" of deployment "main.ear"
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: javax.xml.ws.WebServiceException: javax.xml.ws.WebServiceException: Could not find the handler configuration file /../handler-chain.xml specified by @HandlerChain annotation
                at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:368)
                at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:66)
                at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250)
                at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536)
                at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)
                at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
                at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
                at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
                ... 5 more
Caused by: javax.xml.ws.WebServiceException: Could not find the handler configuration file /../handler-chain.xml specified by @HandlerChain annotation
                at org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:89)
                at org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:285)
                at org.apache.cxf.jaxws.JaxWsServerFactoryBean.buildHandlerChain(JaxWsServerFactoryBean.java:249)
                at org.apache.cxf.jaxws.JaxWsServerFactoryBean.initializeResourcesAndHandlerChain(JaxWsServerFactoryBean.java:227)
                at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:212)
                at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:453)
                at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:333)
                ... 13 more

Responses

It seems like relative path does not work with @HandlerChain. I move the handler-chain.xml to ResourceRoot, which is WEB-INF/classes and change the path to /handler-chain.xml it worked. Would this be a redhat or JBoss bug?

Hi Theodore

Sorry about the late response. This isn't a bug.

CXF looks up the handler XML based on the resource location of the class used to create the JAX-WS service, regardless of whether the annotation is on that class or on one of its superclasses. You need to make sure that the handler.xml is located with the correct class if these are not located in the same directory.

In other words, WEB-INF/classes is precisely the right place where you should be putting it as it's on the classpath.

I should also add that you should be able to use the full path to the handler.xml as well if it's not in the classpath

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.