2 Replies Latest reply on Jul 7, 2006 12:30 PM by Domenico Loiacono

    HandlerChain support

    Domenico Loiacono Newbie

      Does JBossWS 1.0.1GA support @HandlerChain annotation ?

      I had written a WS EJB3 endpoint with @HandlerChain(file="handlers.xml", name="")

      ...
      @Stateless
      @WebService(targetNamespace = "http://net.fimed.workproject.client.ws/")
      @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,use=SOAPBinding.Use.LITERAL) //WS-I BP 1.0
      @HandlerChain(file="handlers.xml", name="")
      public class Service1Action implements Service1 {
      
       @Logger
       private Log log;
      
       @WebMethod(operationName="Greetings") //WS-I Naming convention .NET
       public String getGreetings(String name) {
       log.debug("Service1 called");
       return "Good morning " + name;
       }
      
      }
      


      handlers.xml in /WEB-INF/classes

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!--
       The contents of this file are subject to the terms
       of the Common Development and Distribution License
       (the "License"). You may not use this file except
       in compliance with the License.
      
       You can obtain a copy of the license at
       https://jwsdp.dev.java.net/CDDLv1.0.html
       See the License for the specific language governing
       permissions and limitations under the License.
      
       When distributing Covered Code, include this CDDL
       HEADER in each file and include the License file at
       https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
       add the following below this CDDL HEADER, with the
       fields enclosed by brackets "[]" replaced with your
       own identifying information: Portions Copyright [yyyy]
       [name of copyright owner]
      -->
      
      <jws:handler-config xmlns:jws="http://java.sun.com/xml/ns/javaee">
       <jws:handler-chains>
       <jws:handler-chain>
       <jws:handler>
       <jws:handler-class>net.fimed.workproject.ejb3.session.LoggingHandler</jws:handler-class>
       </jws:handler>
       </jws:handler-chain>
       </jws:handler-chains>
      </jws:handler-config>
      



      but when I deploy it an exception is throwed:

      org.jboss.ws.WSException: Cannot process handler chain: handlers.xml
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processHandlerChain(AnnotationsMetaDataBuilder.java:560)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.setupEndpointFromAnnotations(AnnotationsMetaDataBuilder.java:164)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilderEJB3.buildMetaData(AnnotationsMetaDataBuilderEJB3.java:93)
       at org.jboss.ws.server.WebServiceDeployerEJB3.createWebServicesMetaData(WebServiceDeployerEJB3.java:91)
       at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy35.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.net.MalformedURLException: no protocol: handlers.xml
       at java.net.URL.<init>(URL.java:567)
       at java.net.URL.<init>(URL.java:464)
       at java.net.URL.<init>(URL.java:413)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processHandlerChain(AnnotationsMetaDataBuilder.java:529)
       ... 33 more
      2006-07-07 14:22:42,075 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2006-07-07 14:22:42,075 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      2006-07-07 14:22:42,075 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2006-07-07 14:22:42,075 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@d6d73e72{ url=file:/C:/java/jboss/jboss-4.0.4.GA/server/default/deploy/jboss-seam-fimed.ear, deployedLastModified=1152260938269 }
      org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/java/jboss/jboss-4.0.4.GA/server/default/tmp/deploy/tmp47216jboss-seam-fimed.ear-contents/jboss-seam-fimed.jar; - nested throwable: (org.jboss.ws.WSException: Cannot process handler chain: handlers.xml)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:975)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: org.jboss.ws.WSException: Cannot process handler chain: handlers.xml
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processHandlerChain(AnnotationsMetaDataBuilder.java:560)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.setupEndpointFromAnnotations(AnnotationsMetaDataBuilder.java:164)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilderEJB3.buildMetaData(AnnotationsMetaDataBuilderEJB3.java:93)
       at org.jboss.ws.server.WebServiceDeployerEJB3.createWebServicesMetaData(WebServiceDeployerEJB3.java:91)
       at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy35.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       ... 21 more
      Caused by: java.net.MalformedURLException: no protocol: handlers.xml
       at java.net.URL.<init>(URL.java:567)
       at java.net.URL.<init>(URL.java:464)
       at java.net.URL.<init>(URL.java:413)
       at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processHandlerChain(AnnotationsMetaDataBuilder.java:529)
       ... 33 more
      


      Any suggestion ?