• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

org.eclipse.core.runtime.Platform java.lang.NoClassDefFoundError

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am making an AppEngine project. The web app retrieves XML data from a URL and uses the load() function of EMF Resource (org.eclipse.emf.ecore.resource.Resource) to load data from the InputStream. The project works successfully on the local machine with all the MAVEN dependencies present. But as soon as I deploy it to GAE, I get the following error:
org.eclipse.core.runtime.Platform java.lang.NoClassDefFoundError

What could possibly be the reason? I can see every required dependency being packaged in the war/WEB-INF/lib folder (see attachment). Are their any hidden dependencies that I need to cater?

Here are the dependencies I have in my POM and following are their version numbers:



What am I missing? Looking forward to your help.
Capture.PNG
[Thumbnail for Capture.PNG]
Dependencies included
 
author & internet detective
Posts: 40549
825
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you check that the class really is in that jar? (Unzip it to be sure.)

Also, is that the full error message? Sometimes a class can't load because it has a static initializer for another class and the error points to them both.
 
Ammar Rizvi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

I tried to look further where the problem might lie, but in vain. The class is indeed in the JAR file. Also unzipped and confirmed. Surprisingly, I am getting two errors in the GAE logs:

1. java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.core.runtime.Platform
at org.eclipse.ocl.common.OCLCommon.getPreference(OCLCommon.java:74)
at org.eclipse.ocl.lpg.AbstractBasicEnvironment.getValue(AbstractBasicEnvironment.java:440)
at org.eclipse.ocl.options.ParsingOptions.getValue(ParsingOptions.java:330)
at org.eclipse.ocl.AbstractEnvironment.createTypeChecker(AbstractEnvironment.java:1214)
at org.eclipse.ocl.AbstractEnvironment.getTypeChecker(AbstractEnvironment.java:1196)
at org.eclipse.ocl.AbstractEnvironment.getAdapter(AbstractEnvironment.java:1236)
at org.eclipse.ocl.util.OCLUtil.getAdapter(OCLUtil.java:102)
at org.eclipse.ocl.util.TypeUtil.getTypeCheckerAdapter(TypeUtil.java:800)
at org.eclipse.ocl.util.TypeUtil.findAttribute(TypeUtil.java:171)
at org.eclipse.ocl.AbstractEnvironment.doLookupProperty(AbstractEnvironment.java:657)
at org.eclipse.ocl.AbstractEnvironment.lookupProperty(AbstractEnvironment.java:638)
at org.eclipse.ocl.AbstractTypeResolver.findTupleType(AbstractTypeResolver.java:430)
at org.eclipse.ocl.AbstractTypeResolver.resolveTupleType(AbstractTypeResolver.java:382)
at org.eclipse.ocl.AbstractTypeResolver$ResolveSwitch.caseTupleType(AbstractTypeResolver.java:1008)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:267)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:117)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:105)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.ocl.AbstractTypeResolver.resolve(AbstractTypeResolver.java:127)
at org.eclipse.ocl.AbstractTypeResolver$ResolveSwitch.caseCollectionType(AbstractTypeResolver.java:1003)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:168)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:117)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:105)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.ocl.AbstractTypeResolver.resolve(AbstractTypeResolver.java:127)
at org.eclipse.ocl.util.TypeUtil.resolveType(TypeUtil.java:617)
at org.eclipse.ocl.util.OCLStandardLibraryUtil.getSetType(OCLStandardLibraryUtil.java:2216)
at org.eclipse.ocl.util.OCLStandardLibraryUtil.createCollectionOperations(OCLStandardLibraryUtil.java:1754)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.build(OCLStandardLibraryImpl.java:375)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.init(OCLStandardLibraryImpl.java:205)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.<clinit>(OCLStandardLibraryImpl.java:97)
at org.eclipse.ocl.ecore.EcoreEnvironment.getOCLStandardLibrary(EcoreEnvironment.java:271)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.booleanLiteralExpCS(AbstractOCLAnalyzer.java:3041)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.primitiveLiteralExpCS(AbstractOCLAnalyzer.java:2922)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.literalExpCS(AbstractOCLAnalyzer.java:3107)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.oclExpressionCS(AbstractOCLAnalyzer.java:1983)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.invCS(AbstractOCLAnalyzer.java:1440)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.invOrDefCS(AbstractOCLAnalyzer.java:1420)
at org.eclipse.ocl.parser.OCLAnalyzer.parseInvOrDefCS(OCLAnalyzer.java:266)
at org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:164)
at org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
at org.eclipse.emf.query.ocl.conditions.AbstractOCLCondition.<init>(AbstractOCLCondition.java:211)
at org.eclipse.emf.query.ocl.conditions.BooleanOCLCondition.<init>(BooleanOCLCondition.java:149)
at org.eclipse.emf.query.ocl.conditions.BooleanOCLCondition.<init>(BooleanOCLCondition.java:107)

2. java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl
at org.eclipse.ocl.ecore.EcoreEnvironment.getOCLStandardLibrary(EcoreEnvironment.java:271)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.booleanLiteralExpCS(AbstractOCLAnalyzer.java:3041)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.primitiveLiteralExpCS(AbstractOCLAnalyzer.java:2922)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.literalExpCS(AbstractOCLAnalyzer.java:3107)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.oclExpressionCS(AbstractOCLAnalyzer.java:1983)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.invCS(AbstractOCLAnalyzer.java:1440)
at org.eclipse.ocl.parser.AbstractOCLAnalyzer.invOrDefCS(AbstractOCLAnalyzer.java:1420)
at org.eclipse.ocl.parser.OCLAnalyzer.parseInvOrDefCS(OCLAnalyzer.java:266)
at org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:164)
at org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
at org.eclipse.emf.query.ocl.conditions.AbstractOCLCondition.<init>(AbstractOCLCondition.java:211)
at org.eclipse.emf.query.ocl.conditions.BooleanOCLCondition.<init>(BooleanOCLCondition.java:149)
at org.eclipse.emf.query.ocl.conditions.BooleanOCLCondition.<init>(BooleanOCLCondition.java:107)


Both classes in question are present in their respective JARs. Please let me know if you need any further information. Much appreciated!


 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic