title: Google App Engine DataNucleus 3.1.1 Unexpected Exception Error
body: <p>Trying to find a way to get rid of this error on eclipse.</p>
  
  <pre><code>DataNucleus Enhancer (version 3.1.1) : Enhancement of classes
  Encountered a problem: Unexpected exception
  </code></pre>
  
  <p>Here is the log</p>
  
  <pre><code>java.lang.RuntimeException: Unexpected exception
      at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:76)
      at com.google.appengine.tools.enhancer.Enhance.&lt;init&gt;(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.&lt;init&gt;(Unknown Source)
      at org.objectweb.asm.ClassReader.&lt;init&gt;(Unknown Source)
      at org.objectweb.asm.ClassReader.&lt;init&gt;(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
  </code></pre>
  
  <p>I have two versions of java, one is 1.8.0_25, the other is 1.7.0_46</p>
  
  <p>this is my path</p>
  
  <pre><code> C:\Program Files (x86)\Java\jre7\bin;;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\ProgramData\Oracle\Java\javapath;
  </code></pre>
  
  <p>and as a default I use the jre7 on eclipse, dont know what else to mention here. I found no solutions clearly explained here or on the other websites rather than trying to change the java version, tried all java instances on my computer, uninstalled and installed again. I am guessing it may be about java and datanucleus compability issue, but currently using the java7 and the plugins i am using were downloaded automatically from eclipse so no clue. If you need any clarifications, ask me out please.</p>
  
  <p><img src="https://i.stack.imgur.com/9ECke.jpg" alt="jar files"></p>