On Monday, June 18, 2012 03:19:49 PM Ron Wheeler wrote: > We build CXF web services in Eclipse with me2 (actually Eclipse STS) and > it works. > > Caused by: java.lang.NoSuchMethodException: is usually a version > problem with a library. > > Where is this class supposed to come from and what version are you > supposed to be using? > javax.xml.bind.annotation.XmlElementRef.required() > It appears that you have the class OK but an older version.
This is exactly what it is. The way eclipse is calling CXF is not honoring the endorsed dirs and such. Thus, it's picking up the JAXB 2.2 XJC, but only the 2.1API's that are built into the JDK. Couple solutions: 1) Use Java7 instead of Java 6. 2) Remove the jaxb stuff from the CXF distribution and replace them with the 2.1.13 versions of the jar. That should allow CXF to complete base itself on the 2.1 version built into the JDK. Dan > > > Ron > > On 18/06/2012 2:58 PM, Glen Mazza wrote: > > Oh, building artifacts via IDE sounds painful. Perhaps someone else > > can answer your question, but I'd highly recommend building your > > project with Maven, and just leaving Eclipse for coding, instead of > > artifact generation: > > http://www.jroller.com/gmazza/entry/web_service_tutorial. > > > > Glen > > > > On 06/18/2012 11:16 AM, mrtshezi wrote: > >> Hi All > >> > >> Please help > >> I have installed Apache CXF in my eclipse. When i create a web > >> services from > >> WSDL the IDE return the following error > >> > >> > >> Loading FrontEnd jaxws ... > >> Loading DataBinding jaxb ... > >> wsdl2java -d C:\eclipse\Workspace\new\.cxftmp/src -classdir > >> C:\eclipse\Workspace\new\build\classes -p > >> http://LoanBrokerProcess.process=process.loanbrokerprocess. -impl > >> -validate > >> -exsh false -dns true -dex true -wsdlLocation > >> http://localhost:9080/new/services/LoanBrokerProcessSOAP11port_http?wsd > >> l > >> -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 > >> file:/C:/eclipse/Workspace/new/WebContent/wsdl/loanBoker.wsdl > >> wsdl2java - Apache CXF 2.6.1 > >> > >> > >> WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException > >> > >> org.apache.cxf.tools.common.ToolException: > >> java.lang.reflect.UndeclaredThrowableException > >> > >> at -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
