Reputation: 5850
I'm working DataNucleus+Maven. Below are the commands with their results :
mvn compile
: BUILD SUCCESSFUL
mvn clean install
: BUILD SUCCESSFUL
mvn -e datanucleus:enhance
: BUILD SUCCESSFUL
However, on mvn -e datanucleus:schema-create
:
SEVERE: Error creating NucleusContext
There is no available StoreManager of type "". Make sure that you have put the relevant DataNucleus store plugin in your CLASSPATH and if defining a connection via JNDI or DataSource you also need to provide persistence property "datanucleus.storeManagerType"
org.datanucleus.exceptions.NucleusUserException: There is no available StoreManager of type "". Make sure that you have put the relevant DataNucleus store plugin in your CLASSPATH and if defining a connection via JNDI or DataSource you also need to provide persistence property "datanucleus.storeManagerType"
at org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:1157)
at org.datanucleus.NucleusContext.initialise(NucleusContext.java:359)
at org.datanucleus.store.schema.SchemaTool.getNucleusContextForMode(SchemaTool.java:659)
at org.datanucleus.store.schema.SchemaTool.main(SchemaTool.java:271)
[ERROR] --------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The DataNucleus tool org.datanucleus.store.schema.SchemaTool exited with a non-null exit code.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The DataNucleus tool org.datanucleus.store.schema.SchemaTool exited with a non-null exit code.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: The DataNucleus tool org.datanucleus.store.schema.SchemaTool exited with a non-null exit code.
at org.datanucleus.maven.AbstractDataNucleusMojo.executeCommandLine(AbstractDataNucleusMojo.java:282)
at org.datanucleus.maven.AbstractSchemaToolMojo.executeSchemaTool(AbstractSchemaToolMojo.java:267)
at org.datanucleus.maven.AbstractSchemaToolMojo.executeDataNucleusTool(AbstractSchemaToolMojo.java:130)
at org.datanucleus.maven.AbstractDataNucleusMojo.execute(AbstractDataNucleusMojo.java:126)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
I'm trying to implement DataNucleus with JPA using Maven project. Mysql is the backend.
Upvotes: 1
Views: 1349
Reputation: 2906
Check the scope-property for
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
and switch to compile
(default) instead of runtime
.
Upvotes: 1