简体   繁体   中英

Datanucleus error with the Google Web Toolkit

Im trying to use the GWT plugin with eclipse. I have fresh installs of both done, but yet I get the following error:

DataNucleus Enhancer (version 3.1.1) : Enhancement of classes Encountered a problem: Unexpected exception

On examining the log files I found this:

java.lang.RuntimeException: Unexpected exception
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:76)
at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java:71)
at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:51)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:74)
... 2 more
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName(ASMClassEnhancer.java:272)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:727)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:525)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1258)
... 7 more

I tried installing a new version of Datanucleus from the site, but the issue persists.

Earlier I had a version of Eclipse running on my C:/ and it worked perfectly. I un-instlled that one and moved it to another drive, the problem stated after that.

I am very new to both Java and Eclipse and I don't exactly understand the problem. Any help would be appreciated.

Details about my system:

Windows 7 
C:\Users\Shaunak>java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

PATH:

 C:\Ruby193\bin;C:\Ruby200-x64\bin;C:\Program Files (x86)\Google\google_appengine\;C:\ant\apache-ant-1.9.4\bin;F:\Program Files\AndroidStudio\sdk\tools;F:\Program Files\AndroidStudio\sdk\platform-tools

ANDROID_HOME

F:\\Program Files\\AndroidStudio\\sdk

ANT_HOME

C:\\ant\\apache-ant-1.9.4

PATH (System Variable)

  C:\ProgramData\Oracle\Java\javapath;C:\Python34\;C:\Python34\Scripts;Z:\.sys\miniperl\bin;Z:\.sys\php;C:\Tcl\bin;c:\program files (x86)\imagemagick-6.5.1-q8;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\NEST4C-1.1;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ASF_Tools\MapReady 3.1;C:\Program Files (x86)\ASF_Tools\MapReady 3.1\lib;C:\Program Files\MATLAB\R2012a\runtime\win64;C:\Program Files\MATLAB\R2012a\bin;%systemroot%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;F:\Program Files (x86)\Git\cmd;C:\WT-NMP\bin

You may need to check you project classpath. Are you still referencing older versions of the DataNucleus library? If you just moved files without touching code, I would blame libraries versions.

My bet is that depending on how you moved you Eclipse files or on what you did when downloading/installing a newer version of Eclipse you could have newer GWT-GAE libraries that are not compatible with the ones your project was using. Even if you are trying to run your code with newer ones (as you said you tried installing a new version of Datanucleus), or even if there's a certain set of libraries that is Eclipse's default or only GAE SDK, your project might want to be run with an older version.

Which versions of GWT and GAE where you using before moving Eclipse? Which versions of Google-related plugins or libraries are you using after relocating Eclipse?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM