openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject Re: Missing ProductDerivation resource error
Date Sun, 07 Jan 2007 16:39:04 GMT
Hi Rahul,

It looks like the plugin is only adding the openjpa-kernel and openjpa-lib
jars to the classpath. Can you configure the plugin to use openjpa-all? The
the product derivations are aggregated in the openjpa-all jar file which
should resolve the missing resource problem.

On 1/6/07, Rahul Thakur <rahul.thakur.xdev@gmail.com> wrote:
>
> Hi,
>
> I am trying to create an OpenJPA Maven2 plugin that runs to the
> PCEnchancer to start with, but when I attempt to run it I get an error
> complaining about missing resource ProductDerivation (attached below).
> The message indicates that it should have been installed as a part of
> the openjpa distribution which I installed into my local m2 repo from
> instructions in docs on openjpa site.
>
> Do I need to explicitly specify one or am I missing something here?
>
> TIA,
>
> Rahul
>
>
> [snip]
> [DEBUG] Configuring mojo
> 'org.codehaus.mojo:openjpa-maven-plugin:0.0.1-SNAPSHOT:enhance' -->
> [DEBUG]   (f) classes =
> E:\continuum-key-based-refactor\continuum-model\target\classes
> [DEBUG]   (f) classpathElements =
> [E:\continuum-key-based-refactor\continuum-model\target\classes,
> e:\repository\classworlds\classworlds\1.1\classworlds-1.1.jar,
>
> e:\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-10\plexus-
> container-default-1.0-alpha-10.jar
> ,e:\repository\net\java\dev\stax-utils\stax-utils\20060502\stax-
> utils-20060502.jar,e:\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar
> ,e:\repository\org\codehaus\plexus\plexus-utils\1.2\plexus-utils-1.2.jar][DEBUG]
> (f) pluginArtifacts =[net.sourceforge.serp:serp:jar:1.11.0:runtime
> ,commons-collections:commons-collections:jar:3.2:runtime,
> org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:runtime,
> org.apache.openjpa:openjpa-lib:jar:0.9.7-incubating-SNAPSHOT:runtime
> ,commons-logging:commons-logging:jar:1.0.4:runtime, ant:ant:jar:
> 1.6.5:runtime,
> org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0.1:runtime
> ,commons-lang:commons-lang:jar:2.1:runtime,
> org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.0.1:runtime
> ,org.apache.openjpa:openjpa-kernel:jar:0.9.7-incubating-SNAPSHOT:runtime
> ,commons-pool:commons-pool:jar:1.3:runtime, log4j:log4j:jar:1.2
> .13:runtime,
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-15:runtime,
> org.apache.maven:maven-artifact:jar:2.0.4:runtime,
> org.apache.maven:maven-plugin-api:jar:2.0:runtime,
> org.codehaus.plexus:plexus-utils:jar:1.3:runtime][DEBUG]   (f)
> toolProperties =
> {addDefaultConstructor=false,enforcePropertyRestrictions=true}[DEBUG] -- end
> configuration --[INFO] [openjpa:enhance][INFO] running OpenJPA Enhancer
> Mojo...[DEBUG] Classes Dir is
> :E:\continuum-key-based-refactor\continuum-model\target\classes[DEBUG]
> Executing command line:[DEBUG] java
> -cpE:\continuum-key-based-refactor\continuum-model\target\classes;e:\repository\classworlds\classworlds\1.1\classworlds-
> 1.1.jar
> ;e:\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-10\plexus-
> container-default-1.0-alpha-10.jar
> ;e:\repository\net\java\dev\stax-utils\stax-utils\20060502\stax-
> utils-20060502.jar;e:\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar
> ;e:\repository\org\codehaus\plexus\plexus-utils\1.2\plexus-utils
> -1.2.jar;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.jar
> ;E:\repository\commons-collections\commons-collections\3.2\commons-
> collections-3.2.jar
> ;E:\repository\org\apache\geronimo\specs\geronimo-jta_1.0.1B_spec\1.0.1\geronimo-jta_1.0.1B_spec-
> 1.0.1.jar
> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
> lib-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\commons-logging\commons-logging\1.0.4\commons-
> logging-1.0.4.jar;E:\repository\ant\ant\1.6.5\ant-1.6.5.jar
> ;E:\repository\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.0.1\geronimo-jms_1.1_spec-
> 1.0.1.jar;E:\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar
> ;E:\repository\org\apache\geronimo\specs\geronimo-j2ee-connector_1.5_spec\1.0.1\geronimo-j2ee-connector_1.5_spec-
> 1.0.1.jar
> ;E:\repository\org\apache\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
> kernel-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\commons-pool\commons-pool\1.3\commons-pool-1.3.jar
> ;E:\repository\log4j\l
> og4j\1.2.13\log4j-1.2.13.jar;D:\rnd\apps\maven-
> 2.0.4\core\plexus-container-default-1.0-alpha-9.jar;D:\rnd\apps\maven-
> 2.0.4\lib\maven-artifact-2.0.4.jar;D:\rnd\apps\maven-
> 2.0.4\lib\maven-plugin-api-2.0.4.jar;D:\rnd\apps\maven-
> 2.0.4\core\plexus-utils-1.1.jarorg.apache.openjpa.enhance.PCEnhancer-addDefaultConstructorfalse
-enforcePropertyRestrictions
> trueE:\continuum-key-based-refactor\continuum-model\target\classes\META-INF\package.jdo[DEBUG]
> Exit code: 1[DEBUG] --------------------[DEBUG]  Standard output from the
> Open JPA Enhancer tool:[DEBUG] --------------------[INFO][DEBUG]
> --------------------[ERROR] --------------------[ERROR]  Standard error from
> the OpenJPA Enhancer tool:[ERROR] --------------------[ERROR] Exception in
> thread "main" java.lang.ExceptionInInitializerError
> atorg.apache.openjpa.conf.BrokerFactoryValue.<clinit>(
> BrokerFactoryValue.java:47)
> atorg.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(
> OpenJPAConfigurationImpl.java:178)        ator
> g.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(
> OpenJPAConfigurationImpl.java:154)
> atorg.apache.openjpa.conf.OpenJPAConfigurationImpl.<init>(
> OpenJPAConfigurationImpl.java:145)
> atorg.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3605)Caused
> by: java.util.MissingResourceException: Your system is missingproduct
> derivations.  Product derivations provide configuration optionsfor supported
> datastores and specifications.  You must have
> aMETA-INF/services/org.apache.openjpa.lib.conf.ProductDerivation file inyour
> classpath listing the available derivation classes, and some listedclass
> must be instantiable.  Typically this file is bundled as part ofthe
> distribution.  Have you unbundled it, or unbundled its listedclasses? If you
> are using ant, a common solution to this problem is toplace the jar
> libraries of the OpenJPA distribution in the${user.home}/.ant/lib
> directory. Another common cause of this problem isan overly-restrictive
> security manager.{1}
>    atorg.apache.openjpa.lib.conf.ProductDerivations.<clinit>(
> ProductDerivations.java:64)        ... 5 more[ERROR]
> --------------------[INFO]
> ------------------------------------------------------------------------[ERROR]
> BUILD ERROR[INFO]
> ------------------------------------------------------------------------[INFO]
> The OpenJPA Enhancer tool exited with a non-null exit code.[INFO]
> ------------------------------------------------------------------------[DEBUG]
> Traceorg.apache.maven.lifecycle.LifecycleExecutionException: The
> OpenJPAEnhancer tool exited with a non-null exit code.
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:559)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal
> (DefaultLifecycleExecutor.java:488)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:458)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> lAndHandleFailures(DefaultLifecycleExecutor.java:306)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:273)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:140)
> atorg.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)        at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)        at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:256)        at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> atsun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> atsun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)        at
> java.lang.reflect.Method.invoke(Method.java:585)
> atorg.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)        at
> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> atorg.codehaus.classworlds.Launcher.mainWit
> hExitCode(Launcher.java:430)        at
> org.codehaus.classworlds.Launcher.main(Launcher.java:375)Caused by:
> org.apache.maven.plugin.MojoExecutionException: The OpenJPAEnhancer tool
> exited with a non-null exit code.
> atorg.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
> OpenJpaEnhancerMojo.java:194)
> atorg.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
> OpenJpaEnhancerMojo.java:88)
> atorg.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:412)
> atorg.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:534)        ... 16 more[INFO]
> ------------------------------------------------------------------------[/snip]
>



-- 
-Michael Dick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message