[jbossws-users] [JBossWS] - Error on java.lang.IllegalStateException: Cannot build JAXB

smathankumar do-not-reply at jboss.com
Thu Jan 31 05:34:42 EST 2008


Hi,

I created a Java WebService implementation java file named as DeviceServiceEventBroker.java with JAX-WS annotations. My Java WebService implementation file is implements with an interface named as DeviceOmi.java of my Web Service class. And My Interface class is extends with the java.io.Serializable.

I am not able to generate the wsdl from java. I got the below error. Any idea? Is there any option to use my Implemtation class with out the extends classes.


D:\MCP-2008\classes>"C:\Program Files\Java\jdk1.6.0_02\bin\java"  -Djava.endorsed.dirs="D:\jboss-4.2.2.GA\bin\\..\lib\endorsed" -Dlog4j.configuration=
wstools-log4j.xml -classpath ";D:\jboss-4.2.2.GA\bin\\../client/jboss-xml-binding.jar;D:\jboss-4.2.2.GA\bin\\../client/activation.jar;D:\jboss-4.2.2.G
A\bin\\../client/javassist.jar;D:\jboss-4.2.2.GA\bin\\../client/getopt.jar;D:\jboss-4.2.2.GA\bin\\../client/jaxb-api.jar;D:\jboss-4.2.2.GA\bin\\../cli
ent/jaxb-impl.jar;D:\jboss-4.2.2.GA\bin\\../client/jbossall-client.jar;D:\jboss-4.2.2.GA\bin\\../client/jbossws-client.jar;D:\jboss-4.2.2.GA\bin\\../c
lient/jboss-jaxws.jar;D:\jboss-4.2.2.GA\bin\\../client/jboss-jaxrpc.jar;D:\jboss-4.2.2.GA\bin\\../client/jboss-saaj.jar;D:\jboss-4.2.2.GA\bin\\../clie
nt/log4j.jar;D:\jboss-4.2.2.GA\bin\\../client/mail.jar;D:\jboss-4.2.2.GA\bin\\../client/jbossws-spi.jar" org.jboss.wsf.spi.tools.cmd.WSProvide --show-
traces -o D:\MCP-2008\wsdl -w com.nortelnetworks.mcp.ne.sm.svc.device.impl.DeviceServiceEventBroker
Output directory: D:\MCP-2008\wsdl
Source directory: D:\MCP-2008\wsdl
Generating WSDL:
log4j:WARN No appenders could be found for logger (org.jboss.wsf.framework.DefaultSPIProvider).
log4j:WARN Please initialize the log4j system properly.
Error: Could not generate. (use --show-traces to see full traces)
java.lang.IllegalStateException: Cannot build JAXB context
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:944)        at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:146)
        at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:108)
        at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:124)
        at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:184)
        at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
Caused by: org.jboss.ws.WSException: Failed to create JAXBContext
        at org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory.createContext(CustomizableJAXBContextFactory.java:111)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:935)
        ... 5 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.io.Serializable is an interface, and JAXB can't handle interfaces.
        this problem is related to the following location:
                at java.io.Serializable
                at public java.io.Serializable com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject.getPropertyValue()
                at com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject
                at public com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject[] com.nortelnetworks.mcp.ne.share.svc.filter.data.F
ilterDataObject.getPropertyFilters()
                at com.nortelnetworks.mcp.ne.share.svc.filter.data.FilterDataObject
                at com.nortelnetworks.mcp.ne.share.svc.device.data.DeviceMtcDataFilter
                at private com.nortelnetworks.mcp.ne.share.svc.device.data.DeviceMtcDataFilter com.nortelnetworks.mcp.ne.sm.svc.device.impl.jaxws.GetF
ilteredDeviceListFromIPCM.arg1
                at com.nortelnetworks.mcp.ne.sm.svc.device.impl.jaxws.GetFilteredDeviceListFromIPCM
java.io.Serializable does not have a no-arg default constructor.
        this problem is related to the following location:
                at java.io.Serializable
                at public java.io.Serializable com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject.getPropertyValue()
                at com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject
                at public com.nortelnetworks.mcp.ne.share.svc.filter.data.PropertyFilterDataObject[] com.nortelnetworks.mcp.ne.share.svc.filter.data.F
ilterDataObject.getPropertyFilters()
                at com.nortelnetworks.mcp.ne.share.svc.filter.data.FilterDataObject
                at com.nortelnetworks.mcp.ne.share.svc.device.data.DeviceMtcDataFilter
                at private com.nortelnetworks.mcp.ne.share.svc.device.data.DeviceMtcDataFilter com.nortelnetworks.mcp.ne.sm.svc.device.impl.jaxws.GetF
ilteredDeviceListFromIPCM.arg1
                at com.nortelnetworks.mcp.ne.sm.svc.device.impl.jaxws.GetFilteredDeviceListFromIPCM

        at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:286)
        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:102)
        ... 6 more


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125071#4125071

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125071



More information about the jbossws-users mailing list