7 Replies Latest reply on Jul 23, 2008 8:33 AM by robert.raksi

    Deployment failure

    l.gh

      Hi guys,

      I'm now deploying my POJO style EJB3 as a webservice. And it can be done successfully on Jboss4.0.5 but seriously it failed on Jboss4.2.1. I'm going to find a solution by Google but seems no similar way to solve it. Could anybody of you experts give me an opinion please?

      Here I attached logs pushed into Jboss console.

      12:21:09,330 ERROR [MainDeployer] Could not create deployment: file:/C:/devenv/jboss-4.2.0.GA/server/janes-dev/deploy/jm-lmi-place-ejb.jar
      org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nested throwable: (java.lang.IllegalStateException: Cannot build JAXB context)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:83)
       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 $Proxy34.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       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 $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       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.lang.IllegalStateException: Cannot build JAXB context
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:879)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:128)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:49)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:77)
       at org.jboss.ws.core.server.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:92)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.createServiceEndpoint(DeployerInterceptor.java:127)
       at org.jboss.ws.integration.jboss42.DeployerInterceptorEJB.createServiceEndpoint(DeployerInterceptorEJB.java:43)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:78)
       ... 28 more
      Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
      java.util.List is an interface, and JAXB can't handle interfaces.
       this problem is related to the following location:
       at java.util.List
      
       at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:66)
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:361)
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:217)
       at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:76)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:875)
       ... 35 more
      


      Source code looks like:
      @Remote
      @WebService
      @SOAPBinding(style=Style.RPC)
      public interface PlaceOperator {
       public List getList(HashMap map);
      }
      


      @Stateless
      @WebService(endpointInterface = "com.janes.discoveryxml.ejb.PlaceOperator")
      public class PlaceOperatorBean implements PlaceOperator{
      
       public List getList(HashMap map) {
       xxx
       return null;
       }
      
      }
      


        • 1. Re: Deployment failure
          ropalka

           

          "l.gh" wrote:

          Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
          java.util.List is an interface, and JAXB can't handle interfaces.
          this problem is related to the following location:
          at java.util.List


          Try to focus on this. It seems there's a java.util.List somewhere in your source code which is annotated with JAXB annotations.

          Richard

          • 2. Re: Deployment failure
            l.gh

            Thanks Richard of your reply!

            But it is really happy with Jboss4.0.5

            • 3. Re: Deployment failure
              kk1107

              Please let me know how did you solve this problem. I am facing similar problem. thanks

              ~Samy

              • 4. Re: Deployment failure
                whitesox12

                 

                "kk1107" wrote:
                Please let me know how did you solve this problem. I am facing similar problem. thanks

                ~Samy



                I too am getting the same error can someone please tell how to solve this issue it's very important any help is appreciated.

                Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
                IllegalAnnotationExceptions
                java.util.List is an interface, and JAXB can't handle interfaces.
                 this problem is related to the following location:
                 at java.util.List
                java.util.List does not have a no-arg default constructor.
                 this problem is related to the following location:
                 at java.util.List
                
                 at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
                (IllegalAnnotationsException.java:102)


                • 5. Re: Deployment failure
                  peterj

                  whitexos12, the error you are getting:

                  java.util.List is an interface, and JAXB can't handle interfaces.

                  means that your web service is either taking a List as a parameter or returning a List. That is not allowed because List is not a class, it is an interface. You have to change the parameter (or return type) to a class that implements List, such as ArrayList.

                  • 6. Re: Deployment failure
                    whitesox12

                     

                    "kk1107" wrote:
                    Please let me know how did you solve this problem. I am facing similar problem. thanks

                    ~Samy



                    I too am getting the same error can someone please tell how to solve this issue it's very important any help is appreciated.

                    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
                    IllegalAnnotationExceptions
                    java.util.List is an interface, and JAXB can't handle interfaces.
                     this problem is related to the following location:
                     at java.util.List
                    java.util.List does not have a no-arg default constructor.
                     this problem is related to the following location:
                     at java.util.List
                    
                     at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
                    (IllegalAnnotationsException.java:102)


                    • 7. Re: Deployment failure
                      robert.raksi

                      Hi!

                      I get the same error. If I change the List to ArrayList the error is gone but the types generated in the wsdl are empty.

                      One has to write an adaptor and marshall/unmarshall the array list somehow? Shouldn't this be done automaticaly for Lists?

                      I hope someone can clarify things for me in this matter, thanks in advance.