2 Replies Latest reply on Apr 10, 2006 7:38 PM by Thomas Diesler

    JBoss 4.0.4.CR2 Deployment Bug using Annotations (ArrayOutOf

    Martin Crawford Newbie

      I found a bug that I am not sure if it's already been reported/fixed since 4.0.4 CR2. I'm also not sure which version of JBossWS shippped with CR2, meta-inf seems to indicate 1.0.0 CR6? I'll happily submit the JIRA if not already reported/fixed.

      Essentially, if you do not supply an annotation (@WebParam) for at least one parameter of a web method the deployment fails with an ArrayOutOfBoundsException (sample stack below).

      For example...

      This fails...

      @WebMethod
      @WebResult(name = "echoResult")
      public String echo(String param) {
      System.out.println(param);
      return param;
      }

      This does not fail...

      @WebMethod
      @WebResult(name = "echoResult")
      public String echo(@WebParam(name = "param") String param) {
      System.out.println(param);
      return param;
      }

      This also does not fail...

      @WebMethod
      @WebResult(name = "echoResult")
      public String echo(@WebParam(name = "param") String param, int num) {
      System.out.println(param);
      return param;
      }



      java.lang.ArrayIndexOutOfBoundsException: 0
      at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.getWebParamAnnotatio
      n(AnnotationsMetaDataBuilder.java:310)
      at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.processWebMethod(Ann
      otationsMetaDataBuilder.java:388)
      at org.jboss.ws.metadata.AnnotationsMetaDataBuilder.setupEndpointFromAnn
      otations(AnnotationsMetaDataBuilder.java:153)
      at org.jboss.ws.metadata.AnnotationsMetaDataBuilderJSE.buildMetaData(Ann
      otationsMetaDataBuilderJSE.java:82)
      at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(W
      ebServiceDeployerJSE.java:194)
      at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
      :103)
      at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJS
      E.java:65)