1 Reply Latest reply on Jan 22, 2006 3:37 PM by Thomas Diesler

    exception while deploying web service

    Stephen Wang Newbie

      hi,

      I got following exception while deploying my web service;

      java.lang.NullPointerException
       at org.jboss.ws.tools.schema.SchemaTypeCreator.handleArrayInUnwrapMode(SchemaTypeCreator.java:605)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:483)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:385)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:348)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:158)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:122)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.introspectJavaProperties(SchemaTypeCreator.java:487)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.generateNewType(SchemaTypeCreator.java:385)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.getType(SchemaTypeCreator.java:348)
       at org.jboss.ws.tools.schema.SchemaTypeCreator.generateType(SchemaTypeCreator.java:158)
       at org.jboss.ws.tools.JavaToXSD.generateForSingleType(JavaToXSD.java:118)
       at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateType(JavaToWSDLHelper.java:391)
       at org.jboss.ws.tools.helpers.JavaToWSDLHelper.generateTypesForXSD(JavaToWSDLHelper.java:122)
       at org.jboss.ws.tools.JavaToWSDL11.handleJavaToWSDLGeneration(JavaToWSDL11.java:229)
       at org.jboss.ws.tools.JavaToWSDL11.generate(JavaToWSDL11.java:164)
       at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:279)....


      What my WS does is,

      @WebMethod
       public XXXXXArray getXXXXXArray() {
       if (logger.isLoggable(Level.INFO)) {
       logger.info("begin");
       }
       com.xxxxxx.application.presentation.enterprise.XXXXXArray xxxxxxArray= xxxxxxSession
       .getXXXXXArray();
       if (logger.isLoggable(Level.INFO)) {
       logger.info("end");
       }
       return xxxxxxArray;
       }
      


      And my XXXXXArray looks like;

      public class XXXXXArray {
       protected com.xxxxx.application.presentation.common.Status status;
       .......
      
       public Status getStatus() {
       return this.status;
       }
      
       public void setStatus(Status status) {
       this.status = status;
       }
      }
      


      And my status looks like;

      public class Status
      {
       protected int status;
       protected int severity;
       protected String message;
       protected StackTraceItem [] stackTraceItems;
      
       public Status()
       {
       this.status = ....
       this.severity = ....
       }
      
       public Status(int status, int severity)
       {
       this.status = status;
       this.severity = severity;
       }
      
       public Status(Exception e)
       {
       this.message = e.getLocalizedMessage();
      
       this.status = ......
      
       StackTraceElement[] stackTraceElements = e.getStackTrace();
       .......
       }
      
       public String getMessage()
       {
       return message;
       }
      
       public void setMessage(String message)
       {
       this.message = message;
       }
      
       public StackTraceItem[] getStackTraceElements()
       {
       return stackTraceItems;
       }
      
       public void setStackTraceElements(StackTraceItem[] stackTraceElements)
       {
       this.stackTraceItems = stackTraceElements;
       }
      
       public int getStatus()
       {
       return status;
       }
      
       public void setStatus(int status)
       {
       this.status = status;
       }
      }


      And my StackTraceItem has 3 string properties, one int and one boolean.

      I got above error while deploying the service.
      When I commented out getter/setter of stack trace items, it goes smoothly.

      Any idea?

      --
      Regards;
      Stephen