This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.lang.NoSuchFieldError:" Watch "java.lang.NoSuchFieldError:" New topic
Author

java.lang.NoSuchFieldError:

Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 249
java.lang.NoSuchFieldError: eINSTANCE
at com.ibm.ws.management.application.client.AppDeploymentProfile.files2Hash(AppDeploymentProfile.java:368)
at com.ibm.websphere.management.application.client.ArchiveDeploymentInfo.readDeployment(ArchiveDeploymentInfo.java:125)
at com.ibm.websphere.management.application.client.ArchiveDeploymentInfo.<init>(ArchiveDeploymentInfo.java:103)Inside Main method

at com.ibm.websphere.management.application.client.ArchiveDeploymentInfo.<init>(ArchiveDeploymentInfo.java:70)
at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:121)
at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:106)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:80)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:57)
at com.cmware.easydeploy.EARReader.doWork(EARReader.java:101)


SCJP, SCWCD, SCBCD, SCEA 5
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
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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

<classpath>
<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"/>
</classpath>
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 com.ibm.ws.management.application.client.AppDeploymentProfile.files2Hash(AppDeploymentProfile.java:368)
at com.ibm.websphere.management.application.client.ArchiveDeploymentInfo.readDeployment(ArchiveDeploymentInfo.java:125)
at com.ibm.websphere.management.application.client.ArchiveDeploymentInfo.<init>(ArchiveDeploymentInfo.java:103)Inside Main method
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18545
    
  40

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.

Henry


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: com.ibm.websphere.models.config.appdeployment.AppdeploymentPackage: 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..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.lang.NoSuchFieldError:
 
Similar Threads
Archive is not a valid WAR File because the deployment descriptor not found
Deployment error NoClassDefFoundError: org.hibernate.cfg.Configuration on Oracle 11g App Server
App deployment Exception
java.lang.NoSuchFieldError
org.hibernate.Criteria: field ROOT_ENTITY not found