Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JavaTOWS Fail to load class error
JavaTOWS Fail to load class error [message #989806] Fri, 07 December 2012 22:30 Go to next message
Dave Pitts is currently offline Dave PittsFriend
Messages: 2
Registered: December 2012
Junior Member
Hi Everyone,

I'm trying to run a tutorial (http://wiki.eclipse.org/JAXWS/SmokeTestScenarios/) creating a small web service (bottom up) using Apache CXF (version 2.7 is installed) in Eclipse Indigo on Fedora 17..

I have created a dynamic web project with Tomcat 7.0 and Apache CXF 2.x configured. I have verified that the Apache CXF runtime has been found and have gone through the CXF preferences (particularly java2ws).

When I select the Java source and start the web service wizards, I tell the wizard to assemble the server (in order to retain the error I show below) and do nothing for the client. I step through the the subsequent steps, taking the defaults each time, except that I do create a service . When the wizard begins to generate the web server I have the error shown at the bottom of the email, which suggests that the java2ws tool can't find the class (wtp.Converter) from which I'm trying to generate the service.

I'm assuming that I have not set things up properly, but I have so far failed to determine my problem.

I will appreciate any guidance on this. Thanks Dave

-----------------From Eclipse Console-----------------------
java2ws -cp /home/dvpitts/workspace2/ConverterPro2/build/classes -s /home/dvpitts/workspace2/ConverterPro2/.cxftmp/src -d /home/dvpitts/workspace2/ConverterPro2/.cxftmp/wsdl -classdir /home/dvpitts/workspace2/ConverterPro2/build/classes -o converter.wsdl -createxsdimports -verbose -frontend jaxws -databinding jaxb -wsdl -wrapperbean wtp.Converter
java2ws - Apache CXF 2.7.0

JavaToWS Error: org.apache.cxf.tools.common.ToolException: Fail to load class : wtp.Converter

org.apache.cxf.tools.common.ToolException: Fail to load class : wtp.Converter
at org.apache.cxf.tools.util.AnnotationUtil.loadClass(AnnotationUtil.java:87)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.getServiceClass(JavaToWSDLProcessor.java:284)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.getServiceBuilder(JavaToWSDLProcessor.java:181)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(JavaToWSDLProcessor.java:100)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSContainer.java:110)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:75)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:77)
at org.apache.cxf.tools.java2ws.JavaToWS.main(JavaToWS.java:45)
Caused by: java.lang.ClassNotFoundException: wtp.Converter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.apache.cxf.tools.util.AnnotationUtil.loadClass(AnnotationUtil.java:84)
... 10 more
Re: JavaTOWS Fail to load class error [message #990253 is a reply to message #989806] Tue, 11 December 2012 15:41 Go to previous messageGo to next message
Shane Clarke is currently offline Shane ClarkeFriend
Messages: 67
Registered: July 2009
Member
Hi Dave,

It looks like your project hasn't been built. That 'Build Automatically' is turned off in your workspace?

If you clean the project or enable 'Build Automatically' followed by an edit and save in the wtp.Converter.java file and then re-run through the steps it should be fine.
Re: JavaTOWS Fail to load class error [message #990256 is a reply to message #990253] Tue, 11 December 2012 15:48 Go to previous message
Dave Pitts is currently offline Dave PittsFriend
Messages: 2
Registered: December 2012
Junior Member
Hi Shane,

Thanks for the reply. I may have done that in the ultimate resolution of my problem. My original installation of eclipse was through the yum repository. I uninstalled and reinstalled with a download of indigo from eclipse.org. Things pretty much worked off the bat from there. But now I see that the build automatically for the project is checked.

Could that the indigo I got from the repository had some "quirks".

Thanks again for your reply.

Dave
Previous Topic:JSDT: Dynamic Code Completion
Next Topic:[Solved] JSDT Debug Tools
Goto Forum:
  


Current Time: Sun Dec 21 05:34:08 GMT 2014

Powered by FUDForum. Page generated in 0.09529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software