Getting JAXBException: <class> is not known to this context.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Getting JAXBException: <class> is not known to this context.


I am trying to deploy a very simple JAXWS service using Axis2.war on tomcat server. The service is packaged in a jar, and placed under webapps\axis2\WEB-INF\servicejars\.

I keep getting the JAXBException : IntContainer is not known to this context.
However, the same service jar works just fine when used with AXIS2 binary distribution (using axis2server.bat).

Any help would be appreciated!

Following is the brief outline of the classes in the service jar:
public interface EchoInteger {
        public int echo(@WebParam(...) IntContainer element);

public class EchoIntegerImpl implements EchoInteger {
        public int echo(IntContainer element) {
                return element.x;

public class IntContainer {
        public int x;

P.S.: I do not encounter the issue when using primitive types as method arguments (e.g. using 'int element' instead of 'IntContainer element' in the above code, works...!)