geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu T George (JIRA)" <>
Subject [jira] Commented: (GERONIMO-3793) "Not Known To This Context" JAXBException when attempting to return complex data type from a @WebMethod
Date Thu, 31 Jul 2008 21:26:31 GMT


Manu T George commented on GERONIMO-3793:

In case of this issue. I added a package-info.class in each of the packages and still axis
was unable to even find the package-info class. Another observation here is that the algorithm
to find the packages to search for jaxb classes doesn't find the generated classes or even
the Customer class in this case both of which are in different packages. I was unable to figure
out how to the option to make wsgen generate an ObjectFactory  for each 
package.I also see that the generated classes are in a different package than the one their
namespace specifi

> "Not Known To This Context" JAXBException when attempting to return complex data type
from a @WebMethod
> -------------------------------------------------------------------------------------------------------
>                 Key: GERONIMO-3793
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.x, 2.1
>         Environment: Windows XP x86-32, IBM J9 1.5.0 SR5, Geronimo w/ Tomcat+OpenEJB+Axis2
>            Reporter: Cedric Hurst
>            Assignee: Jarek Gawor
>            Priority: Critical
>         Attachments: ComplexDataTypeWSExampleEAR.ear, geronimo.log
>   Original Estimate: 0h
>  Remaining Estimate: 0h
> I'm attempting to return a @XmlRootElement annotated object called "Customer" from a
@WebMethod.  When calling the service, I get the following error in the server log:
> javax.xml.bind.JAXBException: [;
is not known to this context
> 	at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(
> 	at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(
> 	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(
> 	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(
> 	at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(
> 	... 48 more
> From what I understand, the return type should be added to the JaxB context automatically.
> Just to make sure I wasn't doing something wrong in my Customer class, I added another
method to my bean that returned a java.util.List of Strings.  When calling this method, I
also got the same sort of error:
> [javax.xml.bind.JAXBException: java.util.List is not known to this context]
> javax.xml.bind.MarshalException
>  - with linked exception:
> [javax.xml.bind.JAXBException: java.util.List is not known to this context]
> 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(
> 	at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl$
> 	at
> 	at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl.marshalByType(
> 	at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(
> 	at
> 	at
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> 	at org.apache.axis2.engine.AxisEngine.send(
> 	at org.apache.geronimo.axis2.ejb.EJBInterceptor.intercept(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke(
> 	at org.apache.openejb.core.stateless.StatelessContainer.invokeWebService(
> 	at org.apache.openejb.core.stateless.StatelessContainer._invoke(
> 	at org.apache.openejb.core.stateless.StatelessContainer.invoke(
> 	at org.apache.geronimo.axis2.ejb.EJBMessageReceiver.receive(
> 	at org.apache.axis2.engine.AxisEngine.receive(
> 	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> 	at org.apache.geronimo.axis2.Axis2WebServiceContainer.processPOSTRequest(
> 	at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(
> 	at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(
> 	at org.apache.geronimo.axis2.Axis2WebServiceContainer.invoke(
> 	at org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.invoke(
> 	at org.apache.catalina.core.StandardHostValve.invoke(
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(
> 	at org.apache.catalina.core.StandardEngineValve.invoke(
> 	at org.apache.catalina.valves.AccessLogValve.invoke(
> 	at org.apache.catalina.connector.CoyoteAdapter.service(
> 	at org.apache.coyote.http11.Http11Processor.process(
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> 	at$
> 	at
> According to a thread in the OpenEJB mailing list:
> doesn't seem that these errors should be happening.
> I attempted to test this under CXF, but ran into another issue which is outlined in another
> EAR file and geronimo.log attached.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message