I'm trying to set a project with use of 'appengine' plugin. I've multiple errors, probably because I don't know how to tie it all together.
For instance, when gradle appengineRun
is executed, everything works fine till the moment I open the site in the browser. Then I receive:
org.datanucleus.exceptions.NucleusUserException:
Found Meta-Data for class com.sample.Message but this class is not enhanced!!
Please enhance the class before running DataNucleus.
Quick look at a task list shows that there is appropriate task: appengineEnhance
. Unfortunately when the task is run it fails with an enigmatic exception Java returned: 1. But in the log I found much more descriptive message:
java.lang.RuntimeException: Unexpected exception
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:76)
at com.google.appengine.tools.enhancer.Enhance.(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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:74)
... 2 more
Caused by: java.lang.NoSuchMethodError: org.datanucleus.plugin.PluginManager.(Lorg/datanucleus/PersistenceConfiguration;Lorg/datanucleus/ClassLoaderResolver;)V
at org.datanucleus.OMFContext.(OMFContext.java:159)
at org.datanucleus.enhancer.DataNucleusEnhancer.(DataNucleusEnhancer.java:172)
at org.datanucleus.enhancer.DataNucleusEnhancer.(DataNucleusEnhancer.java:150)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1157)
... 7 more
As far as I understand there's some incompatibility between jars. Any idea how to fix that?
My build.gradle
file is as following:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.8.7'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
providedCompile 'com.google.code.gson:gson:2.2.2'
providedCompile 'com.google.guava:guava:14.0.1'
providedCompile 'org.apache.commons:commons-lang3:3.1'
providedCompile 'commons-io:commons-io:2.4'
def jacksonVer = '2.2.0'
providedCompile "com.fasterxml.jackson.core:jackson-core:$jacksonVer"
providedCompile "com.fasterxml.jackson.core:jackson-databind:$jacksonVer"
providedCompile 'javax:javaee-api:6.0'
providedCompile 'com.google.appengine:appengine-api-1.0-sdk:1.8.7'
providedCompile 'org.reflections:reflections:0.9.9-RC1'
providedCompile 'org.datanucleus:datanucleus-core:3.1.3'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}
appengine {
httpPort = 6380
}