• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

WSDL2Java problem


I'm trying to run  WSDL2Java using a WSDL ( in order to consume a web service)  from within the Websphere Application Development (5.1.1)environment and I get the following error.

Can someone please point me to the missing jars or problem?

java.lang.NoClassDefFoundError: org/eclipse/emf/ecore/resource/Resource$Factory
at com.ibm.ws.webservices.wsdl.mapping.MappingMetaData.<init>(MappingMetaData.java:133)
at com.ibm.ws.webservices.wsdl.toJava.Emitter.<init>(Emitter.java:164)
at com.ibm.ws.webservices.tools.WSDL2Java.createParser(WSDL2Java.java:239)
at com.ibm.ws.webservices.wsdl.WSDL2.<init>(WSDL2.java:129)
at com.ibm.ws.webservices.tools.WSDL2Java.<init>(WSDL2Java.java:228)
at com.ibm.ws.webservices.tools.WSDL2Java.main(WSDL2Java.java:355)
Exception in thread "main"

  • 3
1 Solution
Unfortunatelly the Java application you try to run was written using proprietary classes (the Eclipse) and now it fails. You will need either to change the source code, get rid of the class in question, recompile and run it, or get the Eclipse jar file in your classpath and run the applicaiton again.
azsatAuthor Commented:
As you are aware  WSDL2Java is a (elipse?) plug-in to generate client-side bindings to a Web service.  

ie creating Java classes from a WSDL file to consumme the web service. WSDL2Java, I am told can be run from with the Websphere IDE.  

I simply followed the instrunctions given at


I would have thought that the suggested webservices.jar file (included in classpath) contains the desired class, but obviously it does not.

I need to find out what class it can't find and which jar this class sits in.  Help!  Thanks.

I am not sure in which file the class in question resides. You will have to find out yourself, perhaps looking at the classpath you used to compile the class. If you need to find out if the class is in the webservices.jar file simply do:

jar -tvf webservices.jar | grep 'Factory'

and see if it will come up with the Factory class.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now