[jboss-user] [JBoss Web Services Development] - Error while using wsprovide command

Pavan Kulkarni do-not-reply at jboss.com
Thu Aug 12 06:06:08 EDT 2010


Pavan Kulkarni [http://community.jboss.org/people/pavankulkarni] created the discussion

"Error while using wsprovide command"

To view the discussion, visit: http://community.jboss.org/message/557060#557060

--------------------------------------------------------------
Hi All,

I am trying to use wsprovide task to generate a wsdl file and deploy this as a web service, my service end point is a Stateless session bean.

But when I run wsprovide through command prompt I get the following error.



java.lang.IllegalStateException: Cannot build JAXB context
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBCo
ntext(JAXWSMetaDataBuilder.java:984)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.bu
ildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:154)
        at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProv
iderImpl.java:108)
        at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProv
iderImpl.java:124)
        at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:183)
        at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:76)
Caused by: org.jboss.ws.WSException: Failed to create JAXBContext
        at org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory.createContext(
CustomizableJAXBContextFactory.java:114)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBCo
ntext(JAXWSMetaDataBuilder.java:980)
        ... 5 more
*Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 6 counts of
IllegalAnnotationExceptions
javax.ejb.EJBHome is an interface, and JAXB can't handle interfaces.*
        this problem is related to the following location:
                at javax.ejb.EJBHome
                at private javax.ejb.EJBHome javax.ejb.jaxws.GetEJBHomeResponse.
_return
                at javax.ejb.jaxws.GetEJBHomeResponse
javax.ejb.EJBHome does not have a no-arg default constructor.
        this problem is related to the following location:
                at javax.ejb.EJBHome
                at private javax.ejb.EJBHome javax.ejb.jaxws.GetEJBHomeResponse.
_return
                at javax.ejb.jaxws.GetEJBHomeResponse
javax.ejb.Handle is an interface, and JAXB can't handle interfaces.
        this problem is related to the following location:
                at javax.ejb.Handle
                at private javax.ejb.Handle javax.ejb.jaxws.GetHandleResponse._r
eturn
                at javax.ejb.jaxws.GetHandleResponse
javax.ejb.Handle does not have a no-arg default constructor.
        this problem is related to the following location:
                at javax.ejb.Handle
                at private javax.ejb.Handle javax.ejb.jaxws.GetHandleResponse._r
eturn
                at javax.ejb.jaxws.GetHandleResponse
javax.ejb.EJBObject is an interface, and JAXB can't handle interfaces.
        this problem is related to the following location:
                at javax.ejb.EJBObject
                at private javax.ejb.EJBObject javax.ejb.jaxws.IsIdentical.arg0
                at javax.ejb.jaxws.IsIdentical
javax.ejb.EJBObject does not have a no-arg default constructor.
        this problem is related to the following location:
                at javax.ejb.EJBObject
                at private javax.ejb.EJBObject javax.ejb.jaxws.IsIdentical.arg0
                at javax.ejb.jaxws.IsIdentical

        at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
(IllegalAnnotationsException.java:102)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContex
tImpl.java:448)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:297)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
139)
        at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105
)
        at org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory.createContext(
CustomizableJAXBContextFactory.java:108)
        ... 6 more


Not sure why this error appears, is it that we cannot expose a EJB remote interface as a web service?

Can someone help me out with the problem..

Thanks
Pavan

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/557060#557060]

Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100812/6f9889bc/attachment-0001.html 


More information about the jboss-user mailing list