Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NoSuchFieldError:

 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21514
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mohamed Farouk
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic