[mule-user] CXF: JAXBException... doesnt contain ObjectFactory.class or jaxb.index

37 views
Skip to first unread message

Nick Cotter

unread,
May 3, 2009, 8:08:25 AM5/3/09
to us...@mule.codehaus.org

Hi,

I've come across a problem trying to use wsdl-cxf in mule when
DynamicClientFactory tries to generate the client:

Root Exception stack trace:
javax.xml.bind.JAXBException: "some.package.service" doesnt contain
ObjectFactory.class or jaxb.index
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:183)
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:585)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:128)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:277)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:256)

Now I've hunted around this forum and others for clues as to what could be
causing this, but I don't seem to be getting anywhere.

I've made sure javac is on the PATH, but this seems to make no difference.

Can anyone help me with this please? I'm not sure where to start - can
anyone tell me what this is a symptom of?

Kind regards

Nick Cotter
--
View this message in context: http://www.nabble.com/CXF%3A-JAXBException...-doesnt-contain-ObjectFactory.class-or-jaxb.index-tp23355169p23355169.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Muthuvelan Swaminathan

unread,
May 3, 2009, 8:15:04 PM5/3/09
to us...@mule.codehaus.org
Could you post the wsdl for which you are creating the dynamic client.
 
since the error shows "some.package.service" I assume your wsdl does not contain target name space attribute. jaxb needs the package name to find the corresponding objectfactory to create an instance of the relevant java content classes.
 
- Muthu 

Nick Cotter

unread,
May 4, 2009, 10:12:35 AM5/4/09
to us...@mule.codehaus.org

No worries I've sorted it out.

I thought I'd fixed the path to contain javac but in fact I hadn't. This is
all being run inside Eclipse via the Mule IDE. Specifically adding a path
element to the Environment for the Mule IDE runtime configuration fixed this
problem.

--
View this message in context: http://www.nabble.com/CXF%3A-JAXBException...-doesnt-contain-ObjectFactory.class-or-jaxb.index-tp23355169p23368579.html

arjun kumar

unread,
Feb 8, 2011, 9:15:35 PM2/8/11
to us...@mule.codehaus.org
Hi,

iam also facing the same problem could u plz help me how to set the path in eclipse....

i have set the path in environmental variable but donno how to put it in eclipse plz help me out!!!!

Reply all
Reply to author
Forward
0 new messages