Hi
I'm having trouble just getting a basic PoC of Google App Engine to run on IntelliJ 13.1.3
No matter which persistance technology I choose (JDO 2, JDO 3, JPA 1, JPA 2) the enhancement step fails when running locally.
The steps to reproduce:
1) Create a new project
2) Choose Web Application and Google App Engine (nothing else is checked to minimize any confusion) - The current SDK is 1.9.7 but I had the same issue with 1.9.6.
3) Choose a Persistance technology of your choice for GAE (doesn't matter which one, they all fail with similar error messages)
4) Name the project and click finish
At this point, you can compile and run in dev mode no problem. One can even modify the JSP file and add some text to see that the server is running. Fantastic.
5) Add a file, any file. I just have a simple Pojo with 1 field in it...
6) Compilation now fails at the enhancement step.
The interesting part of build.log is:
2014-07-18 00:01:53,073 [ 1402] DEBUG - ncement.EnhancerProcessHandler - "C:/Program Files/Java/jdk1.8.0_05/bin/java" -Xmx256m -classpath "/C:/Program Files (x86)/JetBrains/IntelliJ IDEA 13.1.3/lib/idea_rt.jar" com.intellij.rt.execution.CommandLineWrapper C:\Users\mno\.IntelliJIdea13\system\compile-server\_temp_\classpath8921724849732147239.tmp com.intellij.appengine.rt.EnhancerRunner C:\Users\mno\.IntelliJIdea13\system\compile-server\_temp_\appEngineEnhanceFiles6085612102246883770.txt com.google.appengine.tools.enhancer.Enhance -api JDO -enhancerVersion v2 -v
2014-07-18 00:01:53,382 [ 1711] DEBUG - ncement.EnhancerProcessHandler - Encountered a problem: Unexpected exception
2014-07-18 00:01:53,382 [ 1711] DEBUG - ncement.EnhancerProcessHandler - Please see the logs [C:\Users\mno\AppData\Local\Temp\enhance7008192238185978340.log] for further information.
20
The refenced log file: enhance7008192238185978340.log is:
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.appengine.rt.EnhancerRunner.main(EnhancerRunner.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:74)
... 12 more
Caused by: java.lang.NoSuchFieldError: NUCLEUS_CONTEXT_LOADER
at org.datanucleus.NucleusContext.<clinit>(NucleusContext.java:75)
at org.datanucleus.enhancer.DataNucleusEnhancer.<init>(DataNucleusEnhancer.java:160)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1133)
... 17 more
Perhaps I'm missing something absolutely obvious, but I've spent quite a few odd hours over the past few nights trying out different combinations just to get a simple PoC running on GAE with IntelliJ and no matter what I can't get it to work and can't find anyone else online that has a solution.
I've atteched the full build log (it's actually two builds, first one I forgot to set the loglevel to debug).
Hoping someone can come with a silver bullet.
/Mikael