File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes java.lang.NoSuchFieldError: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.lang.NoSuchFieldError:" Watch "java.lang.NoSuchFieldError:" New topic


Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
java.lang.NoSuchFieldError: eINSTANCE
at<init>( Main method

at com.cmware.easydeploy.EARReader.doWork(

Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Sorry the question is why is this error occuring I am trying to run an application inside eclipse. Any idea guys?>>
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

The error means that some class file, somewhere, is an older version than some other class is expecting. I can't tell just from the stack trace what the out-of-date class is; but try to assure that any prerequisites for "com.cmware.easydeploy" are all up to date.

[Jess in Action][AskingGoodQuestions]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
It's an interesting puzzle. Say class A is referencing B.field. The field was there when you compiled A or the compiler would have shown an error. But it's not there at runtime. Maybe you didn't copy the new B class that has the field into the classpath, or you got an old B class that didn't have the field from somewhere. Happens on my project now & then because we copy classes around as part of the build ... at least when everything works we do.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Hello Friends
I was trying to make a application run slowly by solving each requirement of NoClassDefFoundError
So after few additions

<classpathentry kind="src" path="source"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/admin.jar"/>
<classpathentry kind="lib" path="lib/jaxb-api.jar"/>
<classpathentry kind="lib" path="lib/jaxb-impl.jar"/>
<classpathentry kind="lib" path="lib/jaxb-libs.jar"/>
<classpathentry kind="lib" path="lib/jaxb-xjc.jar"/>
<classpathentry kind="lib" path="lib/jaxp-api.jar"/>
<classpathentry kind="lib" path="lib/jax-qname.jar"/>
<classpathentry kind="lib" path="lib/jmxc.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.11.jar"/>
<classpathentry kind="lib" path="lib/namespace.jar"/>
<classpathentry kind="lib" path="lib/relaxngDatatype.jar"/>
<classpathentry kind="lib" path="lib/resolver.jar"/>
<classpathentry kind="lib" path="lib/sas.jar"/>
<classpathentry kind="lib" path="lib/security.jar"/>
<classpathentry kind="lib" path="lib/wjmxapp.jar"/>
<classpathentry kind="lib" path="lib/wsexception.jar"/>
<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="lib/xercesSamples.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="lib" path="lib/xmlParserAPIs.jar"/>
<classpathentry kind="lib" path="lib/xsdlib.jar"/>
<classpathentry kind="lib" path="lib/commonArchive.jar"/>
<classpathentry kind="lib" path="lib/j2ee.jar"/>
<classpathentry kind="lib" path="lib/ras.jar"/>
<classpathentry kind="lib" path="lib/mofj2ee.jar"/>
<classpathentry kind="lib" path="lib/runtimefw.jar"/>
<classpathentry kind="lib" path="lib/mof.jar"/>
<classpathentry kind="lib" path="ibm"/>
<classpathentry kind="lib" path="lib/ws-j2eex.jar"/>
<classpathentry kind="lib" path="lib/mofjava.jar"/>
<classpathentry kind="lib" path="lib/wftutils.jar"/>
<classpathentry kind="lib" path="lib/deployutils.jar"/>
<classpathentry kind="lib" path="lib/workspace.jar"/>
<classpathentry kind="lib" path="lib/ecore.jar"/>
<classpathentry kind="lib" path="lib/common.jar"/>
<classpathentry kind="lib" path="lib/common.resources.jar"/>
<classpathentry kind="lib" path="lib/ws-config-appdeploy.jar"/>
<classpathentry kind="output" path="bin"/>
I provided jar based on NoClassDefFound error on EObject so I added ecore.jar and then it complained about common.jar some class and the last one I added lib/ws-config-appdeploy.jar gave rise to this <classpathentry kind="lib" path="lib/ws-config-appdeploy.jar"/>

How can I solve this problem now??? Thanks for all your comments
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
Finally the addition of <classpathentry kind="lib" path="lib/ws-config-appdeploy.jar"/> gave rise to the below error please help

java.lang.NoSuchFieldError: eINSTANCE
at<init>( Main method
Henry Wong

Joined: Sep 28, 2004
Posts: 20534

There is no easy way to fix this. Either the libraries works, or they don't. If you have another jar file with a later version of the dependent library, then try it.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
java.lang.NoSuchFieldError: field eINSTANCE not found

Please can any one tell me what is this eINSTANCE field and , I understand it is something to do with EMF models.

Please help any comments appreciated , 2 days really struck on it..
I agree. Here's the link:
subject: java.lang.NoSuchFieldError:
It's not a secret anymore!