You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Rahul Thakur <ra...@gmail.com> on 2007/01/07 02:06:28 UTC

Missing ProductDerivation resource error

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]

Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
Hi,

Yes that was the intent - to gather more possible use cases for the 
maven plugin.

I haven't tried that yet, but I can take it for a spin later tonight 
after I finish work.

Cheers,
Rahul



Marc Prud'hommeaux wrote:
> Rahul-
>
> I don't completely understand the question ... are you looking for 
> more possible use cases for the plugin?
>
> I also agree with Patrick that it would be interesting to see if it 
> works with our own test cases. Have you tried replacing the enhancing 
> logic in openjpa-persistence-jdbc/pom.xml with the enhancer plugin and 
> seeing if "mvn test" passes for the openjpa project?
>
>
>
> On Jan 18, 2007, at 8:48 AM, Rahul Thakur wrote:
>
>> Just pinging on this one...
>>
>> I think this might be a good chance to collect more use cases for the 
>> plugin - wdyt?
>>
>> Rahul
>>
>>
>> ----- Original Message ----- From: "Patrick Linskey" <pl...@bea.com>
>> To: <op...@incubator.apache.org>
>> Sent: Wednesday, January 10, 2007 9:56 AM
>> Subject: RE: Missing ProductDerivation resource error
>>
>>
>> Definitely! I know nothing about Maven plugins; what's involved in
>> getting the plugin available for Maven users? Also, it'd be neat if we
>> could move our own integration test suite (in openjpa-persistence-jdbc)
>> to use it.
>>
>> -Patrick
>>
>> --Patrick Linskey
>> BEA Systems, Inc.
>>
>> _______________________________________________________________________
>> Notice:  This email message, together with any attachments, may contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted  and/or
>> legally privileged, and is intended solely for the use of the individual
>> or entity named in this message. If you are not the intended recipient,
>> and have received this message in error, please immediately return this
>> by email and then delete it.
>>
>>> -----Original Message-----
>>> From: Rahul Thakur [mailto:rahul.thakur.xdev@gmail.com]
>>> Sent: Tuesday, January 09, 2007 11:04 AM
>>> To: open-jpa-dev@incubator.apache.org
>>> Subject: Re: Missing ProductDerivation resource error
>>>
>>> duh! silly me :p
>>>
>>> Thanks for spotting that, Marc! BTW, looks like the enhancer
>>> mojo worked
>>> on that class .....yay! now's time to clean it up a bit!
>>>
>>> Would you guys be OK if I start a new module for OpenJPA maven plugin
>>> under Mojo sandbox?
>>>
>>> Thanks again for the help!
>>>
>>> Cheers,
>>> Rahul
>>>
>>>
>>> ----- Original Message ----- From: "Marc Prud'hommeaux" 
>>> <mp...@apache.org>
>>> To: <op...@incubator.apache.org>
>>> Sent: Tuesday, January 09, 2007 9:58 PM
>>> Subject: Re: Missing ProductDerivation resource error
>>>
>>>
>>> > Rahul-
>>> >
>>> > Did you misspell "apache" in
>>> > "org.apacha.maven.continuum.model.project.Schedule"?
>>> >
>>> >
>>> >
>>> >
>>> > On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:
>>> >
>>> >> okies, my work is progressing in trickles as I am squeezing some
>>> >> time outside work :-)
>>> >>
>>> >> Here's the latest issue while trying to process a bunch of .class
>>> >> files with Enhancer. It seems my orm.xml is missing something that
>>> >> is causing the PersistenceMetaDataFactory parse operation to fail,
>>> >> but not sure what. I have setup only one very basic persistent
>>> >> entity to get started with. Any ideas? I tried googling for some
>>> >> orm.xml samples but not many examples.
>>> >>
>>> >> TIA,
>>> >> Rahul
>>> >>
>>> >> [snip]
>>> >> [ERROR]  Standard error from the OpenJPA Enhancer tool:
>>> >> [ERROR] --------------------
>>> >> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool -
>>> Enhancer running
>>> >> on type "class org.apache.maven.continuum.model.project.Schedule".
>>> >> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT>
>>> >> org.apache.openjpa.util.GeneralException:
>>> org.xml.sax.SAXException:
>>> >> file:/E:/continuum-key-based-r
>>> >> efactor/continuum-model/target/classes/META-INF/orm.xml [Location:
>>> >> Line: 7, C: 94]: Type
>>> >> "org.apacha.maven.continuum.model.project.Schedule" could not be
>>> >> instant
>>> >> iated.
>>> >>        at
>>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
>>> >> (PersistenceMetaDataFactory.java:231)
>>> >>        at
>>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load
>>> >> (PersistenceMetaDataFactory.java:180)
>>> >>        at
>>> >> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal
>>> >> (MetaDataRepository.java:414)
>>> >>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData
>>> >> (MetaDataRepository.java:272)
>>> >>        at org.apache.openjpa.enhance.PCEnhancer.<init>
>>> >> (PCEnhancer.java:186)
>>> >>        at
>>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
>>> >> 3680)
>>> >>        at
>>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
>>> >> 3635)
>>> >>        at org.apache.openjpa.enhance.PCEnhancer.main
>>> >> (PCEnhancer.java:3607)
>>> >> Caused by: java.io.IOException: org.xml.sax.SAXException:
>>> file:/E:/
>>> >> continuum-key-based-refactor/continuum-model/target/classes/META-
>>> >> INF/orm.xml [Location: Line:
>>> >> 7, C: 94]: Type
>>> "org.apacha.maven.continuum.model.project.Schedule"
>>> >> could not be instantiated.
>>> >>        at
>>> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
>>> >> (XMLMetaDataParser.java:373)
>>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>>> >> (XMLMetaDataParser.java:312)
>>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>>> >> (XMLMetaDataParser.java:289)
>>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>>> >> (XMLMetaDataParser.java:263)
>>> >>        at
>>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
>>> >> (PersistenceMetaDataFactory.java:229)
>>> >>        ... 7 more
>>> >> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based-
>>> >> refactor/continuum-model/target/classes/META-INF/orm.xml
>>> [Location:
>>> >> Line: 7, C: 94]: Type "org.
>>> >> apacha.maven.continuum.model.project.Schedule" could not be
>>> >> instantiated.
>>> >>        at
>>> org.apache.openjpa.lib.meta.XMLMetaDataParser.getException
>>> >> (XMLMetaDataParser.java:649)
>>> >>        at
>>> org.apache.openjpa.lib.meta.CFMetaDataParser.classForName
>>> >> (CFMetaDataParser.java:281)
>>> >>        at
>>> >>
>>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.cl
>>> assForNa
>>> >> me(XMLPersistenceMetaDataParser.java:1642)
>>> >>        at
>>> >>
>>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.st
>>> artClass
>>> >> (XMLPersistenceMetaDataParser.java:713)
>>> >>        at
>>> org.apache.openjpa.lib.meta.CFMetaDataParser.startElement
>>> >> (CFMetaDataParser.java:102)
>>> >>        at
>>> org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement
>>> >> (XMLMetaDataParser.java:426)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s
>>> tartElem
>>> >> ent(AbstractSAXParser.java:533)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.
>>> startEle
>>> >> ment(XMLSchemaValidator.java:708)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerIm
>>> pl.scanS
>>> >> tartElement(XMLNSDocumentScannerImpl.java:330)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
>>> nnerImpl
>>> >> $FragmentContentDispatcher.dispatch
>>> >> (XMLDocumentFragmentScannerImpl.java:1693)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
>>> nnerImpl
>>> >> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
>>> >> (XML11Configuration.java:834)
>>> >>        at
>>> >>
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
>>> >> (XML11Configuration.java:764)
>>> >>        at
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
>>> >> (XMLParser.java:148)
>>> >>        at
>>> >> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
>>> >> (AbstractSAXParser.java:1242)
>>> >>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>>> >>        at
>>> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
>>> >> (XMLMetaDataParser.java:370)
>>> >>        ... 11 more
>>> >>
>>> >> [ERROR] --------------------
>>> >>
>>> >> INFO]
>>> ----------------------------------------------------------------------
>>> >> --
>>> >> [ERROR] BUILD ERROR
>>> >>
>>> >> INFO]
>>> ----------------------------------------------------------------------
>>> >> --
>>> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
>>> >>
>>> >> INFO]
>>> ----------------------------------------------------------------------
>>> >> --
>>> >> [DEBUG] Trace
>>> >> org.apache.maven.lifecycle.LifecycleExecutionException:
>>> The OpenJPA
>>> >> Enhancer tool exited with a non-null exit code.
>>> >>        at
>>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>>> >> (DefaultLifecycleExecutor.java:559)
>>> >>        at
>>> >>
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeSta
>>> ndaloneG
>>> >> oal(DefaultLifecycleExecutor.java:488)
>>> >>        at
>>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>>> >> (DefaultLifecycleExecutor.java:458)
>>> >>        at
>>> >>
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
>>> lAndHand
>>> >> leFailures(DefaultLifecycleExecutor.java:306)
>>> >>        at
>>> >>
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
>>> kSegment
>>> >> s(DefaultLifecycleExecutor.java:273)
>>> >>        at
>>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
>>> >> (DefaultLifecycleExecutor.java:140)
>>> >>        at
>>> org.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)
>>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke
>>> >> (NativeMethodAccessorImpl.java:39)
>>> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke
>>> >> (DelegatingMethodAccessorImpl.java:25)
>>> >>        at java.lang.reflect.Method.invoke(Method.java:585)
>>> >>        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
>>> >> OpenJPA Enhancer tool exited with a non-null exit code.
>>> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance
>>> >> (OpenJpaEnhancerMojo.java:254)
>>> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute
>>> >> (OpenJpaEnhancerMojo.java:130)
>>> >>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
>>> >> (DefaultPluginManager.java:412)
>>> >>        at
>>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>>> >> (DefaultLifecycleExecutor.java:534)
>>> >>        ... 16 more
>>> >>
>>> >> INFO]
>>> ----------------------------------------------------------------------
>>> >> --
>>> >> [INFO] Total time: 11 seconds
>>> >> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
>>> >> [INFO] Final Memory: 11M/20M
>>> >>
>>> >> INFO]
>>> ----------------------------------------------------------------------
>>> >> --
>>> >> [/snip]
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ----- Original Message ----- From: "Rahul Thakur"
>>> >> <ra...@gmail.com>
>>> >> To: <op...@incubator.apache.org>
>>> >> Sent: Tuesday, January 09, 2007 8:16 AM
>>> >> Subject: Re: Missing ProductDerivation resource error
>>> >>
>>> >>
>>> >>> Thanks Michael, Kevin,
>>> >>>
>>> >>> I think I am making some progress on the Maven plugin.
>>> >>>
>>> >>> If possible, having one of you guys around on IRC would be a big
>>> >>> help for quick questions (I promise to keep them limited) ;-)
>>> >>>
>>> >>> Thanks again,
>>> >>> Rahul
>>> >>>
>>> >>> ----- Original Message ----- From: "Kevin Sutter"
>>> >>> <kw...@gmail.com>
>>> >>> To: <op...@incubator.apache.org>
>>> >>> Sent: Tuesday, January 09, 2007 7:50 AM
>>> >>> Subject: Re: Missing ProductDerivation resource error
>>> >>>
>>> >>>
>>> >>>> Rahul,
>>> >>>> You are referencing old documentation.  Please use the following
>>> >>>> links for
>>> >>>> the current OpenJPA documentation.  Thank you.
>>> >>>>
>>> >>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA
>>> >>>> +Documentation
>>> >>>>
>>> >>>> Mike has answered the specific question about "jdo" support in
>>> >>>> OpenJPA in
>>> >>>> the previous reply.
>>> >>>>
>>> >>>> Kevin
>>> >>>>
>>> >>
>>> >
>>>
>>
>
>

Re: Missing ProductDerivation resource error

Posted by Marc Prud'hommeaux <mp...@apache.org>.
Rahul-

I don't completely understand the question ... are you looking for  
more possible use cases for the plugin?

I also agree with Patrick that it would be interesting to see if it  
works with our own test cases. Have you tried replacing the enhancing  
logic in openjpa-persistence-jdbc/pom.xml with the enhancer plugin  
and seeing if "mvn test" passes for the openjpa project?



On Jan 18, 2007, at 8:48 AM, Rahul Thakur wrote:

> Just pinging on this one...
>
> I think this might be a good chance to collect more use cases for  
> the plugin - wdyt?
>
> Rahul
>
>
> ----- Original Message ----- From: "Patrick Linskey"  
> <pl...@bea.com>
> To: <op...@incubator.apache.org>
> Sent: Wednesday, January 10, 2007 9:56 AM
> Subject: RE: Missing ProductDerivation resource error
>
>
> Definitely! I know nothing about Maven plugins; what's involved in
> getting the plugin available for Maven users? Also, it'd be neat if we
> could move our own integration test suite (in openjpa-persistence- 
> jdbc)
> to use it.
>
> -Patrick
>
> -- 
> Patrick Linskey
> BEA Systems, Inc.
>
> ______________________________________________________________________ 
> _
> Notice:  This email message, together with any attachments, may  
> contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> affiliated
> entities,  that may be confidential,  proprietary,  copyrighted   
> and/or
> legally privileged, and is intended solely for the use of the  
> individual
> or entity named in this message. If you are not the intended  
> recipient,
> and have received this message in error, please immediately return  
> this
> by email and then delete it.
>
>> -----Original Message-----
>> From: Rahul Thakur [mailto:rahul.thakur.xdev@gmail.com]
>> Sent: Tuesday, January 09, 2007 11:04 AM
>> To: open-jpa-dev@incubator.apache.org
>> Subject: Re: Missing ProductDerivation resource error
>>
>> duh! silly me :p
>>
>> Thanks for spotting that, Marc! BTW, looks like the enhancer
>> mojo worked
>> on that class .....yay! now's time to clean it up a bit!
>>
>> Would you guys be OK if I start a new module for OpenJPA maven plugin
>> under Mojo sandbox?
>>
>> Thanks again for the help!
>>
>> Cheers,
>> Rahul
>>
>>
>> ----- Original Message ----- From: "Marc Prud'hommeaux"  
>> <mp...@apache.org>
>> To: <op...@incubator.apache.org>
>> Sent: Tuesday, January 09, 2007 9:58 PM
>> Subject: Re: Missing ProductDerivation resource error
>>
>>
>> > Rahul-
>> >
>> > Did you misspell "apache" in
>> > "org.apacha.maven.continuum.model.project.Schedule"?
>> >
>> >
>> >
>> >
>> > On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:
>> >
>> >> okies, my work is progressing in trickles as I am squeezing some
>> >> time outside work :-)
>> >>
>> >> Here's the latest issue while trying to process a bunch of .class
>> >> files with Enhancer. It seems my orm.xml is missing something that
>> >> is causing the PersistenceMetaDataFactory parse operation to fail,
>> >> but not sure what. I have setup only one very basic persistent
>> >> entity to get started with. Any ideas? I tried googling for some
>> >> orm.xml samples but not many examples.
>> >>
>> >> TIA,
>> >> Rahul
>> >>
>> >> [snip]
>> >> [ERROR]  Standard error from the OpenJPA Enhancer tool:
>> >> [ERROR] --------------------
>> >> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool -
>> Enhancer running
>> >> on type "class org.apache.maven.continuum.model.project.Schedule".
>> >> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT>
>> >> org.apache.openjpa.util.GeneralException:
>> org.xml.sax.SAXException:
>> >> file:/E:/continuum-key-based-r
>> >> efactor/continuum-model/target/classes/META-INF/orm.xml [Location:
>> >> Line: 7, C: 94]: Type
>> >> "org.apacha.maven.continuum.model.project.Schedule" could not be
>> >> instant
>> >> iated.
>> >>        at
>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
>> >> (PersistenceMetaDataFactory.java:231)
>> >>        at
>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load
>> >> (PersistenceMetaDataFactory.java:180)
>> >>        at
>> >> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal
>> >> (MetaDataRepository.java:414)
>> >>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData
>> >> (MetaDataRepository.java:272)
>> >>        at org.apache.openjpa.enhance.PCEnhancer.<init>
>> >> (PCEnhancer.java:186)
>> >>        at
>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
>> >> 3680)
>> >>        at
>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
>> >> 3635)
>> >>        at org.apache.openjpa.enhance.PCEnhancer.main
>> >> (PCEnhancer.java:3607)
>> >> Caused by: java.io.IOException: org.xml.sax.SAXException:
>> file:/E:/
>> >> continuum-key-based-refactor/continuum-model/target/classes/META-
>> >> INF/orm.xml [Location: Line:
>> >> 7, C: 94]: Type
>> "org.apacha.maven.continuum.model.project.Schedule"
>> >> could not be instantiated.
>> >>        at
>> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
>> >> (XMLMetaDataParser.java:373)
>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>> >> (XMLMetaDataParser.java:312)
>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>> >> (XMLMetaDataParser.java:289)
>> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
>> >> (XMLMetaDataParser.java:263)
>> >>        at
>> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
>> >> (PersistenceMetaDataFactory.java:229)
>> >>        ... 7 more
>> >> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based-
>> >> refactor/continuum-model/target/classes/META-INF/orm.xml
>> [Location:
>> >> Line: 7, C: 94]: Type "org.
>> >> apacha.maven.continuum.model.project.Schedule" could not be
>> >> instantiated.
>> >>        at
>> org.apache.openjpa.lib.meta.XMLMetaDataParser.getException
>> >> (XMLMetaDataParser.java:649)
>> >>        at
>> org.apache.openjpa.lib.meta.CFMetaDataParser.classForName
>> >> (CFMetaDataParser.java:281)
>> >>        at
>> >>
>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.cl
>> assForNa
>> >> me(XMLPersistenceMetaDataParser.java:1642)
>> >>        at
>> >>
>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.st
>> artClass
>> >> (XMLPersistenceMetaDataParser.java:713)
>> >>        at
>> org.apache.openjpa.lib.meta.CFMetaDataParser.startElement
>> >> (CFMetaDataParser.java:102)
>> >>        at
>> org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement
>> >> (XMLMetaDataParser.java:426)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s
>> tartElem
>> >> ent(AbstractSAXParser.java:533)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.
>> startEle
>> >> ment(XMLSchemaValidator.java:708)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerIm
>> pl.scanS
>> >> tartElement(XMLNSDocumentScannerImpl.java:330)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
>> nnerImpl
>> >> $FragmentContentDispatcher.dispatch
>> >> (XMLDocumentFragmentScannerImpl.java:1693)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
>> nnerImpl
>> >> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
>> >> (XML11Configuration.java:834)
>> >>        at
>> >>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
>> >> (XML11Configuration.java:764)
>> >>        at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
>> >> (XMLParser.java:148)
>> >>        at
>> >> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
>> >> (AbstractSAXParser.java:1242)
>> >>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>> >>        at
>> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
>> >> (XMLMetaDataParser.java:370)
>> >>        ... 11 more
>> >>
>> >> [ERROR] --------------------
>> >>
>> >> INFO]
>> --------------------------------------------------------------------- 
>> -
>> >> --
>> >> [ERROR] BUILD ERROR
>> >>
>> >> INFO]
>> --------------------------------------------------------------------- 
>> -
>> >> --
>> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
>> >>
>> >> INFO]
>> --------------------------------------------------------------------- 
>> -
>> >> --
>> >> [DEBUG] Trace
>> >> org.apache.maven.lifecycle.LifecycleExecutionException:
>> The OpenJPA
>> >> Enhancer tool exited with a non-null exit code.
>> >>        at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>> >> (DefaultLifecycleExecutor.java:559)
>> >>        at
>> >>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeSta
>> ndaloneG
>> >> oal(DefaultLifecycleExecutor.java:488)
>> >>        at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>> >> (DefaultLifecycleExecutor.java:458)
>> >>        at
>> >>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
>> lAndHand
>> >> leFailures(DefaultLifecycleExecutor.java:306)
>> >>        at
>> >>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
>> kSegment
>> >> s(DefaultLifecycleExecutor.java:273)
>> >>        at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
>> >> (DefaultLifecycleExecutor.java:140)
>> >>        at
>> org.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)
>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke
>> >> (NativeMethodAccessorImpl.java:39)
>> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke
>> >> (DelegatingMethodAccessorImpl.java:25)
>> >>        at java.lang.reflect.Method.invoke(Method.java:585)
>> >>        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
>> >> OpenJPA Enhancer tool exited with a non-null exit code.
>> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance
>> >> (OpenJpaEnhancerMojo.java:254)
>> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute
>> >> (OpenJpaEnhancerMojo.java:130)
>> >>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
>> >> (DefaultPluginManager.java:412)
>> >>        at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
>> >> (DefaultLifecycleExecutor.java:534)
>> >>        ... 16 more
>> >>
>> >> INFO]
>> --------------------------------------------------------------------- 
>> -
>> >> --
>> >> [INFO] Total time: 11 seconds
>> >> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
>> >> [INFO] Final Memory: 11M/20M
>> >>
>> >> INFO]
>> --------------------------------------------------------------------- 
>> -
>> >> --
>> >> [/snip]
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> ----- Original Message ----- From: "Rahul Thakur"
>> >> <ra...@gmail.com>
>> >> To: <op...@incubator.apache.org>
>> >> Sent: Tuesday, January 09, 2007 8:16 AM
>> >> Subject: Re: Missing ProductDerivation resource error
>> >>
>> >>
>> >>> Thanks Michael, Kevin,
>> >>>
>> >>> I think I am making some progress on the Maven plugin.
>> >>>
>> >>> If possible, having one of you guys around on IRC would be a big
>> >>> help for quick questions (I promise to keep them limited) ;-)
>> >>>
>> >>> Thanks again,
>> >>> Rahul
>> >>>
>> >>> ----- Original Message ----- From: "Kevin Sutter"
>> >>> <kw...@gmail.com>
>> >>> To: <op...@incubator.apache.org>
>> >>> Sent: Tuesday, January 09, 2007 7:50 AM
>> >>> Subject: Re: Missing ProductDerivation resource error
>> >>>
>> >>>
>> >>>> Rahul,
>> >>>> You are referencing old documentation.  Please use the following
>> >>>> links for
>> >>>> the current OpenJPA documentation.  Thank you.
>> >>>>
>> >>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA
>> >>>> +Documentation
>> >>>>
>> >>>> Mike has answered the specific question about "jdo" support in
>> >>>> OpenJPA in
>> >>>> the previous reply.
>> >>>>
>> >>>> Kevin
>> >>>>
>> >>
>> >
>>
>


Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
Just pinging on this one...

I think this might be a good chance to collect more use cases for the 
plugin - wdyt?

Rahul


----- Original Message ----- 
From: "Patrick Linskey" <pl...@bea.com>
To: <op...@incubator.apache.org>
Sent: Wednesday, January 10, 2007 9:56 AM
Subject: RE: Missing ProductDerivation resource error


Definitely! I know nothing about Maven plugins; what's involved in
getting the plugin available for Maven users? Also, it'd be neat if we
could move our own integration test suite (in openjpa-persistence-jdbc)
to use it.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

> -----Original Message-----
> From: Rahul Thakur [mailto:rahul.thakur.xdev@gmail.com]
> Sent: Tuesday, January 09, 2007 11:04 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Missing ProductDerivation resource error
>
> duh! silly me :p
>
> Thanks for spotting that, Marc! BTW, looks like the enhancer
> mojo worked
> on that class .....yay! now's time to clean it up a bit!
>
> Would you guys be OK if I start a new module for OpenJPA maven plugin
> under Mojo sandbox?
>
> Thanks again for the help!
>
> Cheers,
> Rahul
>
>
> ----- Original Message ----- 
> From: "Marc Prud'hommeaux" <mp...@apache.org>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 9:58 PM
> Subject: Re: Missing ProductDerivation resource error
>
>
> > Rahul-
> >
> > Did you misspell "apache" in
> > "org.apacha.maven.continuum.model.project.Schedule"?
> >
> >
> >
> >
> > On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:
> >
> >> okies, my work is progressing in trickles as I am squeezing some
> >> time outside work :-)
> >>
> >> Here's the latest issue while trying to process a bunch of .class
> >> files with Enhancer. It seems my orm.xml is missing something that
> >> is causing the PersistenceMetaDataFactory parse operation to fail,
> >> but not sure what. I have setup only one very basic persistent
> >> entity to get started with. Any ideas? I tried googling for some
> >> orm.xml samples but not many examples.
> >>
> >> TIA,
> >> Rahul
> >>
> >> [snip]
> >> [ERROR]  Standard error from the OpenJPA Enhancer tool:
> >> [ERROR] --------------------
> >> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool -
> Enhancer running
> >> on type "class org.apache.maven.continuum.model.project.Schedule".
> >> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT>
> >> org.apache.openjpa.util.GeneralException:
> org.xml.sax.SAXException:
> >> file:/E:/continuum-key-based-r
> >> efactor/continuum-model/target/classes/META-INF/orm.xml [Location:
> >> Line: 7, C: 94]: Type
> >> "org.apacha.maven.continuum.model.project.Schedule" could not be
> >> instant
> >> iated.
> >>        at
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
> >> (PersistenceMetaDataFactory.java:231)
> >>        at
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load
> >> (PersistenceMetaDataFactory.java:180)
> >>        at
> >> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal
> >> (MetaDataRepository.java:414)
> >>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData
> >> (MetaDataRepository.java:272)
> >>        at org.apache.openjpa.enhance.PCEnhancer.<init>
> >> (PCEnhancer.java:186)
> >>        at
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
> >> 3680)
> >>        at
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:
> >> 3635)
> >>        at org.apache.openjpa.enhance.PCEnhancer.main
> >> (PCEnhancer.java:3607)
> >> Caused by: java.io.IOException: org.xml.sax.SAXException:
> file:/E:/
> >> continuum-key-based-refactor/continuum-model/target/classes/META-
> >> INF/orm.xml [Location: Line:
> >> 7, C: 94]: Type
> "org.apacha.maven.continuum.model.project.Schedule"
> >> could not be instantiated.
> >>        at
> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
> >> (XMLMetaDataParser.java:373)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
> >> (XMLMetaDataParser.java:312)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
> >> (XMLMetaDataParser.java:289)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse
> >> (XMLMetaDataParser.java:263)
> >>        at
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML
> >> (PersistenceMetaDataFactory.java:229)
> >>        ... 7 more
> >> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based-
> >> refactor/continuum-model/target/classes/META-INF/orm.xml
> [Location:
> >> Line: 7, C: 94]: Type "org.
> >> apacha.maven.continuum.model.project.Schedule" could not be
> >> instantiated.
> >>        at
> org.apache.openjpa.lib.meta.XMLMetaDataParser.getException
> >> (XMLMetaDataParser.java:649)
> >>        at
> org.apache.openjpa.lib.meta.CFMetaDataParser.classForName
> >> (CFMetaDataParser.java:281)
> >>        at
> >>
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.cl
> assForNa
> >> me(XMLPersistenceMetaDataParser.java:1642)
> >>        at
> >>
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.st
> artClass
> >> (XMLPersistenceMetaDataParser.java:713)
> >>        at
> org.apache.openjpa.lib.meta.CFMetaDataParser.startElement
> >> (CFMetaDataParser.java:102)
> >>        at
> org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement
> >> (XMLMetaDataParser.java:426)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s
> tartElem
> >> ent(AbstractSAXParser.java:533)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.
> startEle
> >> ment(XMLSchemaValidator.java:708)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerIm
> pl.scanS
> >> tartElement(XMLNSDocumentScannerImpl.java:330)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl
> >> $FragmentContentDispatcher.dispatch
> >> (XMLDocumentFragmentScannerImpl.java:1693)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl
> >> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> >> (XML11Configuration.java:834)
> >>        at
> >>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
> >> (XML11Configuration.java:764)
> >>        at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse
> >> (XMLParser.java:148)
> >>        at
> >> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
> >> (AbstractSAXParser.java:1242)
> >>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
> >>        at
> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
> >> (XMLMetaDataParser.java:370)
> >>        ... 11 more
> >>
> >> [ERROR] --------------------
> >>
> >> INFO]
> ----------------------------------------------------------------------
> >> --
> >> [ERROR] BUILD ERROR
> >>
> >> INFO]
> ----------------------------------------------------------------------
> >> --
> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> >>
> >> INFO]
> ----------------------------------------------------------------------
> >> --
> >> [DEBUG] Trace
> >> org.apache.maven.lifecycle.LifecycleExecutionException:
> The OpenJPA
> >> Enhancer tool exited with a non-null exit code.
> >>        at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> >> (DefaultLifecycleExecutor.java:559)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeSta
> ndaloneG
> >> oal(DefaultLifecycleExecutor.java:488)
> >>        at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> >> (DefaultLifecycleExecutor.java:458)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> lAndHand
> >> leFailures(DefaultLifecycleExecutor.java:306)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
> kSegment
> >> s(DefaultLifecycleExecutor.java:273)
> >>        at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> >> (DefaultLifecycleExecutor.java:140)
> >>        at
> org.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)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke
> >> (NativeMethodAccessorImpl.java:39)
> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke
> >> (DelegatingMethodAccessorImpl.java:25)
> >>        at java.lang.reflect.Method.invoke(Method.java:585)
> >>        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
> >> OpenJPA Enhancer tool exited with a non-null exit code.
> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance
> >> (OpenJpaEnhancerMojo.java:254)
> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute
> >> (OpenJpaEnhancerMojo.java:130)
> >>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> >> (DefaultPluginManager.java:412)
> >>        at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> >> (DefaultLifecycleExecutor.java:534)
> >>        ... 16 more
> >>
> >> INFO]
> ----------------------------------------------------------------------
> >> --
> >> [INFO] Total time: 11 seconds
> >> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
> >> [INFO] Final Memory: 11M/20M
> >>
> >> INFO]
> ----------------------------------------------------------------------
> >> --
> >> [/snip]
> >>
> >>
> >>
> >>
> >>
> >> ----- Original Message ----- From: "Rahul Thakur"
> >> <ra...@gmail.com>
> >> To: <op...@incubator.apache.org>
> >> Sent: Tuesday, January 09, 2007 8:16 AM
> >> Subject: Re: Missing ProductDerivation resource error
> >>
> >>
> >>> Thanks Michael, Kevin,
> >>>
> >>> I think I am making some progress on the Maven plugin.
> >>>
> >>> If possible, having one of you guys around on IRC would be a big
> >>> help for quick questions (I promise to keep them limited) ;-)
> >>>
> >>> Thanks again,
> >>> Rahul
> >>>
> >>> ----- Original Message ----- From: "Kevin Sutter"
> >>> <kw...@gmail.com>
> >>> To: <op...@incubator.apache.org>
> >>> Sent: Tuesday, January 09, 2007 7:50 AM
> >>> Subject: Re: Missing ProductDerivation resource error
> >>>
> >>>
> >>>> Rahul,
> >>>> You are referencing old documentation.  Please use the following
> >>>> links for
> >>>> the current OpenJPA documentation.  Thank you.
> >>>>
> >>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA
> >>>> +Documentation
> >>>>
> >>>> Mike has answered the specific question about "jdo" support in
> >>>> OpenJPA in
> >>>> the previous reply.
> >>>>
> >>>> Kevin
> >>>>
> >>
> >
>
> 


Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
The plugin needs to be built and published just like other OpenJPA 
modules on to a Maven repository and the users can then choose to 
reference it in pom.xml for respective projects.

Rahul

Patrick Linskey wrote:
> Definitely! I know nothing about Maven plugins; what's involved in
> getting the plugin available for Maven users? Also, it'd be neat if we
> could move our own integration test suite (in openjpa-persistence-jdbc)
> to use it.
>
> -Patrick
>
>   

RE: Missing ProductDerivation resource error

Posted by Patrick Linskey <pl...@bea.com>.
Definitely! I know nothing about Maven plugins; what's involved in
getting the plugin available for Maven users? Also, it'd be neat if we
could move our own integration test suite (in openjpa-persistence-jdbc)
to use it.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Rahul Thakur [mailto:rahul.thakur.xdev@gmail.com] 
> Sent: Tuesday, January 09, 2007 11:04 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Missing ProductDerivation resource error
> 
> duh! silly me :p
> 
> Thanks for spotting that, Marc! BTW, looks like the enhancer 
> mojo worked 
> on that class .....yay! now's time to clean it up a bit!
> 
> Would you guys be OK if I start a new module for OpenJPA maven plugin 
> under Mojo sandbox?
> 
> Thanks again for the help!
> 
> Cheers,
> Rahul
> 
> 
> ----- Original Message ----- 
> From: "Marc Prud'hommeaux" <mp...@apache.org>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 9:58 PM
> Subject: Re: Missing ProductDerivation resource error
> 
> 
> > Rahul-
> >
> > Did you misspell "apache" in 
> > "org.apacha.maven.continuum.model.project.Schedule"?
> >
> >
> >
> >
> > On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:
> >
> >> okies, my work is progressing in trickles as I am squeezing some 
> >> time outside work :-)
> >>
> >> Here's the latest issue while trying to process a bunch of .class 
> >> files with Enhancer. It seems my orm.xml is missing something that 
> >> is causing the PersistenceMetaDataFactory parse operation to fail, 
> >> but not sure what. I have setup only one very basic persistent 
> >> entity to get started with. Any ideas? I tried googling for some 
> >> orm.xml samples but not many examples.
> >>
> >> TIA,
> >> Rahul
> >>
> >> [snip]
> >> [ERROR]  Standard error from the OpenJPA Enhancer tool:
> >> [ERROR] --------------------
> >> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool - 
> Enhancer running 
> >> on type "class org.apache.maven.continuum.model.project.Schedule".
> >> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT> 
> >> org.apache.openjpa.util.GeneralException: 
> org.xml.sax.SAXException: 
> >> file:/E:/continuum-key-based-r
> >> efactor/continuum-model/target/classes/META-INF/orm.xml [Location: 
> >> Line: 7, C: 94]: Type 
> >> "org.apacha.maven.continuum.model.project.Schedule" could not be 
> >> instant
> >> iated.
> >>        at 
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
> >> (PersistenceMetaDataFactory.java:231)
> >>        at 
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load 
> >> (PersistenceMetaDataFactory.java:180)
> >>        at 
> >> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal 
> >> (MetaDataRepository.java:414)
> >>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData 
> >> (MetaDataRepository.java:272)
> >>        at org.apache.openjpa.enhance.PCEnhancer.<init> 
> >> (PCEnhancer.java:186)
> >>        at 
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
> >> 3680)
> >>        at 
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
> >> 3635)
> >>        at org.apache.openjpa.enhance.PCEnhancer.main 
> >> (PCEnhancer.java:3607)
> >> Caused by: java.io.IOException: org.xml.sax.SAXException: 
> file:/E:/ 
> >> continuum-key-based-refactor/continuum-model/target/classes/META- 
> >> INF/orm.xml [Location: Line:
> >> 7, C: 94]: Type 
> "org.apacha.maven.continuum.model.project.Schedule" 
> >> could not be instantiated.
> >>        at 
> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
> >> (XMLMetaDataParser.java:373)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> >> (XMLMetaDataParser.java:312)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> >> (XMLMetaDataParser.java:289)
> >>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> >> (XMLMetaDataParser.java:263)
> >>        at 
> >> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
> >> (PersistenceMetaDataFactory.java:229)
> >>        ... 7 more
> >> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based- 
> >> refactor/continuum-model/target/classes/META-INF/orm.xml 
> [Location: 
> >> Line: 7, C: 94]: Type "org.
> >> apacha.maven.continuum.model.project.Schedule" could not be 
> >> instantiated.
> >>        at 
> org.apache.openjpa.lib.meta.XMLMetaDataParser.getException 
> >> (XMLMetaDataParser.java:649)
> >>        at 
> org.apache.openjpa.lib.meta.CFMetaDataParser.classForName 
> >> (CFMetaDataParser.java:281)
> >>        at 
> >> 
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.cl
> assForNa 
> >> me(XMLPersistenceMetaDataParser.java:1642)
> >>        at 
> >> 
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.st
> artClass 
> >> (XMLPersistenceMetaDataParser.java:713)
> >>        at 
> org.apache.openjpa.lib.meta.CFMetaDataParser.startElement 
> >> (CFMetaDataParser.java:102)
> >>        at 
> org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement 
> >> (XMLMetaDataParser.java:426)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s
> tartElem 
> >> ent(AbstractSAXParser.java:533)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.
> startEle 
> >> ment(XMLSchemaValidator.java:708)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerIm
> pl.scanS 
> >> tartElement(XMLNSDocumentScannerImpl.java:330)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl 
> >> $FragmentContentDispatcher.dispatch 
> >> (XMLDocumentFragmentScannerImpl.java:1693)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl 
> >> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> >> (XML11Configuration.java:834)
> >>        at 
> >> 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> >> (XML11Configuration.java:764)
> >>        at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
> >> (XMLParser.java:148)
> >>        at 
> >> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
> >> (AbstractSAXParser.java:1242)
> >>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
> >>        at 
> >> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
> >> (XMLMetaDataParser.java:370)
> >>        ... 11 more
> >>
> >> [ERROR] --------------------
> >> 
> >> INFO]  
> ----------------------------------------------------------------------
> >> --
> >> [ERROR] BUILD ERROR
> >> 
> >> INFO]  
> ----------------------------------------------------------------------
> >> --
> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> >> 
> >> INFO]  
> ----------------------------------------------------------------------
> >> --
> >> [DEBUG] Trace
> >> org.apache.maven.lifecycle.LifecycleExecutionException: 
> The OpenJPA 
> >> Enhancer tool exited with a non-null exit code.
> >>        at 
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
> >> (DefaultLifecycleExecutor.java:559)
> >>        at 
> >> 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeSta
> ndaloneG 
> >> oal(DefaultLifecycleExecutor.java:488)
> >>        at 
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal 
> >> (DefaultLifecycleExecutor.java:458)
> >>        at 
> >> 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> lAndHand 
> >> leFailures(DefaultLifecycleExecutor.java:306)
> >>        at 
> >> 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
> kSegment 
> >> s(DefaultLifecycleExecutor.java:273)
> >>        at 
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute 
> >> (DefaultLifecycleExecutor.java:140)
> >>        at 
> org.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)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke 
> >> (NativeMethodAccessorImpl.java:39)
> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> >> (DelegatingMethodAccessorImpl.java:25)
> >>        at java.lang.reflect.Method.invoke(Method.java:585)
> >>        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 
> >> OpenJPA Enhancer tool exited with a non-null exit code.
> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance 
> >> (OpenJpaEnhancerMojo.java:254)
> >>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute 
> >> (OpenJpaEnhancerMojo.java:130)
> >>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo 
> >> (DefaultPluginManager.java:412)
> >>        at 
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
> >> (DefaultLifecycleExecutor.java:534)
> >>        ... 16 more
> >> 
> >> INFO]  
> ----------------------------------------------------------------------
> >> --
> >> [INFO] Total time: 11 seconds
> >> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
> >> [INFO] Final Memory: 11M/20M
> >> 
> >> INFO]  
> ----------------------------------------------------------------------
> >> --
> >> [/snip]
> >>
> >>
> >>
> >>
> >>
> >> ----- Original Message ----- From: "Rahul Thakur" 
> >> <ra...@gmail.com>
> >> To: <op...@incubator.apache.org>
> >> Sent: Tuesday, January 09, 2007 8:16 AM
> >> Subject: Re: Missing ProductDerivation resource error
> >>
> >>
> >>> Thanks Michael, Kevin,
> >>>
> >>> I think I am making some progress on the Maven plugin.
> >>>
> >>> If possible, having one of you guys around on IRC would be a big 
> >>> help for quick questions (I promise to keep them limited) ;-)
> >>>
> >>> Thanks again,
> >>> Rahul
> >>>
> >>> ----- Original Message ----- From: "Kevin Sutter" 
> >>> <kw...@gmail.com>
> >>> To: <op...@incubator.apache.org>
> >>> Sent: Tuesday, January 09, 2007 7:50 AM
> >>> Subject: Re: Missing ProductDerivation resource error
> >>>
> >>>
> >>>> Rahul,
> >>>> You are referencing old documentation.  Please use the following 
> >>>> links for
> >>>> the current OpenJPA documentation.  Thank you.
> >>>>
> >>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA 
> >>>> +Documentation
> >>>>
> >>>> Mike has answered the specific question about "jdo" support in 
> >>>> OpenJPA in
> >>>> the previous reply.
> >>>>
> >>>> Kevin
> >>>>
> >>
> > 
> 
> 

Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
duh! silly me :p

Thanks for spotting that, Marc! BTW, looks like the enhancer mojo worked 
on that class .....yay! now's time to clean it up a bit!

Would you guys be OK if I start a new module for OpenJPA maven plugin 
under Mojo sandbox?

Thanks again for the help!

Cheers,
Rahul


----- Original Message ----- 
From: "Marc Prud'hommeaux" <mp...@apache.org>
To: <op...@incubator.apache.org>
Sent: Tuesday, January 09, 2007 9:58 PM
Subject: Re: Missing ProductDerivation resource error


> Rahul-
>
> Did you misspell "apache" in 
> "org.apacha.maven.continuum.model.project.Schedule"?
>
>
>
>
> On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:
>
>> okies, my work is progressing in trickles as I am squeezing some 
>> time outside work :-)
>>
>> Here's the latest issue while trying to process a bunch of .class 
>> files with Enhancer. It seems my orm.xml is missing something that 
>> is causing the PersistenceMetaDataFactory parse operation to fail, 
>> but not sure what. I have setup only one very basic persistent 
>> entity to get started with. Any ideas? I tried googling for some 
>> orm.xml samples but not many examples.
>>
>> TIA,
>> Rahul
>>
>> [snip]
>> [ERROR]  Standard error from the OpenJPA Enhancer tool:
>> [ERROR] --------------------
>> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool - Enhancer running 
>> on type "class org.apache.maven.continuum.model.project.Schedule".
>> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT> 
>> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: 
>> file:/E:/continuum-key-based-r
>> efactor/continuum-model/target/classes/META-INF/orm.xml [Location: 
>> Line: 7, C: 94]: Type 
>> "org.apacha.maven.continuum.model.project.Schedule" could not be 
>> instant
>> iated.
>>        at 
>> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
>> (PersistenceMetaDataFactory.java:231)
>>        at 
>> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load 
>> (PersistenceMetaDataFactory.java:180)
>>        at 
>> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal 
>> (MetaDataRepository.java:414)
>>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData 
>> (MetaDataRepository.java:272)
>>        at org.apache.openjpa.enhance.PCEnhancer.<init> 
>> (PCEnhancer.java:186)
>>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
>> 3680)
>>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
>> 3635)
>>        at org.apache.openjpa.enhance.PCEnhancer.main 
>> (PCEnhancer.java:3607)
>> Caused by: java.io.IOException: org.xml.sax.SAXException: file:/E:/ 
>> continuum-key-based-refactor/continuum-model/target/classes/META- 
>> INF/orm.xml [Location: Line:
>> 7, C: 94]: Type "org.apacha.maven.continuum.model.project.Schedule" 
>> could not be instantiated.
>>        at 
>> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
>> (XMLMetaDataParser.java:373)
>>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
>> (XMLMetaDataParser.java:312)
>>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
>> (XMLMetaDataParser.java:289)
>>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
>> (XMLMetaDataParser.java:263)
>>        at 
>> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
>> (PersistenceMetaDataFactory.java:229)
>>        ... 7 more
>> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based- 
>> refactor/continuum-model/target/classes/META-INF/orm.xml [Location: 
>> Line: 7, C: 94]: Type "org.
>> apacha.maven.continuum.model.project.Schedule" could not be 
>> instantiated.
>>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException 
>> (XMLMetaDataParser.java:649)
>>        at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName 
>> (CFMetaDataParser.java:281)
>>        at 
>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForNa 
>> me(XMLPersistenceMetaDataParser.java:1642)
>>        at 
>> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass 
>> (XMLPersistenceMetaDataParser.java:713)
>>        at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement 
>> (CFMetaDataParser.java:102)
>>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement 
>> (XMLMetaDataParser.java:426)
>>        at 
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElem 
>> ent(AbstractSAXParser.java:533)
>>        at 
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEle 
>> ment(XMLSchemaValidator.java:708)
>>        at 
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanS 
>> tartElement(XMLNSDocumentScannerImpl.java:330)
>>        at 
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
>> $FragmentContentDispatcher.dispatch 
>> (XMLDocumentFragmentScannerImpl.java:1693)
>>        at 
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
>> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>>        at 
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
>> (XML11Configuration.java:834)
>>        at 
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
>> (XML11Configuration.java:764)
>>        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
>> (XMLParser.java:148)
>>        at 
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
>> (AbstractSAXParser.java:1242)
>>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>>        at 
>> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
>> (XMLMetaDataParser.java:370)
>>        ... 11 more
>>
>> [ERROR] --------------------
>> 
>> INFO]  ----------------------------------------------------------------------
>> --
>> [ERROR] BUILD ERROR
>> 
>> INFO]  ----------------------------------------------------------------------
>> --
>> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
>> 
>> INFO]  ----------------------------------------------------------------------
>> --
>> [DEBUG] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA 
>> Enhancer tool exited with a non-null exit code.
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
>> (DefaultLifecycleExecutor.java:559)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneG 
>> oal(DefaultLifecycleExecutor.java:488)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal 
>> (DefaultLifecycleExecutor.java:458)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand 
>> leFailures(DefaultLifecycleExecutor.java:306)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment 
>> s(DefaultLifecycleExecutor.java:273)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute 
>> (DefaultLifecycleExecutor.java:140)
>>        at org.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)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke 
>> (NativeMethodAccessorImpl.java:39)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>> (DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        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 
>> OpenJPA Enhancer tool exited with a non-null exit code.
>>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance 
>> (OpenJpaEnhancerMojo.java:254)
>>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute 
>> (OpenJpaEnhancerMojo.java:130)
>>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo 
>> (DefaultPluginManager.java:412)
>>        at 
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
>> (DefaultLifecycleExecutor.java:534)
>>        ... 16 more
>> 
>> INFO]  ----------------------------------------------------------------------
>> --
>> [INFO] Total time: 11 seconds
>> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
>> [INFO] Final Memory: 11M/20M
>> 
>> INFO]  ----------------------------------------------------------------------
>> --
>> [/snip]
>>
>>
>>
>>
>>
>> ----- Original Message ----- From: "Rahul Thakur" 
>> <ra...@gmail.com>
>> To: <op...@incubator.apache.org>
>> Sent: Tuesday, January 09, 2007 8:16 AM
>> Subject: Re: Missing ProductDerivation resource error
>>
>>
>>> Thanks Michael, Kevin,
>>>
>>> I think I am making some progress on the Maven plugin.
>>>
>>> If possible, having one of you guys around on IRC would be a big 
>>> help for quick questions (I promise to keep them limited) ;-)
>>>
>>> Thanks again,
>>> Rahul
>>>
>>> ----- Original Message ----- From: "Kevin Sutter" 
>>> <kw...@gmail.com>
>>> To: <op...@incubator.apache.org>
>>> Sent: Tuesday, January 09, 2007 7:50 AM
>>> Subject: Re: Missing ProductDerivation resource error
>>>
>>>
>>>> Rahul,
>>>> You are referencing old documentation.  Please use the following 
>>>> links for
>>>> the current OpenJPA documentation.  Thank you.
>>>>
>>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA 
>>>> +Documentation
>>>>
>>>> Mike has answered the specific question about "jdo" support in 
>>>> OpenJPA in
>>>> the previous reply.
>>>>
>>>> Kevin
>>>>
>>
> 


Re: Missing ProductDerivation resource error

Posted by Marc Prud'hommeaux <mp...@apache.org>.
Rahul-

Did you misspell "apache" in  
"org.apacha.maven.continuum.model.project.Schedule"?




On Jan 9, 2007, at 12:53 AM, Rahul Thakur wrote:

> okies, my work is progressing in trickles as I am squeezing some  
> time outside work :-)
>
> Here's the latest issue while trying to process a bunch of .class  
> files with Enhancer. It seems my orm.xml is missing something that  
> is causing the PersistenceMetaDataFactory parse operation to fail,  
> but not sure what. I have setup only one very basic persistent  
> entity to get started with. Any ideas? I tried googling for some  
> orm.xml samples but not many examples.
>
> TIA,
> Rahul
>
> [snip]
> [ERROR]  Standard error from the OpenJPA Enhancer tool:
> [ERROR] --------------------
> [ERROR] 109  openjpa  INFO   [main] openjpa.Tool - Enhancer running  
> on type "class org.apache.maven.continuum.model.project.Schedule".
> Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT>  
> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException:  
> file:/E:/continuum-key-based-r
> efactor/continuum-model/target/classes/META-INF/orm.xml [Location:  
> Line: 7, C: 94]: Type  
> "org.apacha.maven.continuum.model.project.Schedule" could not be  
> instant
> iated.
>        at  
> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
> (PersistenceMetaDataFactory.java:231)
>        at  
> org.apache.openjpa.persistence.PersistenceMetaDataFactory.load 
> (PersistenceMetaDataFactory.java:180)
>        at  
> org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal 
> (MetaDataRepository.java:414)
>        at org.apache.openjpa.meta.MetaDataRepository.getMetaData 
> (MetaDataRepository.java:272)
>        at org.apache.openjpa.enhance.PCEnhancer.<init> 
> (PCEnhancer.java:186)
>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
> 3680)
>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java: 
> 3635)
>        at org.apache.openjpa.enhance.PCEnhancer.main 
> (PCEnhancer.java:3607)
> Caused by: java.io.IOException: org.xml.sax.SAXException: file:/E:/ 
> continuum-key-based-refactor/continuum-model/target/classes/META- 
> INF/orm.xml [Location: Line:
> 7, C: 94]: Type "org.apacha.maven.continuum.model.project.Schedule"  
> could not be instantiated.
>        at  
> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
> (XMLMetaDataParser.java:373)
>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> (XMLMetaDataParser.java:312)
>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> (XMLMetaDataParser.java:289)
>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
> (XMLMetaDataParser.java:263)
>        at  
> org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
> (PersistenceMetaDataFactory.java:229)
>        ... 7 more
> Caused by: org.xml.sax.SAXException: file:/E:/continuum-key-based- 
> refactor/continuum-model/target/classes/META-INF/orm.xml [Location:  
> Line: 7, C: 94]: Type "org.
> apacha.maven.continuum.model.project.Schedule" could not be  
> instantiated.
>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException 
> (XMLMetaDataParser.java:649)
>        at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName 
> (CFMetaDataParser.java:281)
>        at  
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForNa 
> me(XMLPersistenceMetaDataParser.java:1642)
>        at  
> org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass 
> (XMLPersistenceMetaDataParser.java:713)
>        at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement 
> (CFMetaDataParser.java:102)
>        at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement 
> (XMLMetaDataParser.java:426)
>        at  
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElem 
> ent(AbstractSAXParser.java:533)
>        at  
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEle 
> ment(XMLSchemaValidator.java:708)
>        at  
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanS 
> tartElement(XMLNSDocumentScannerImpl.java:330)
>        at  
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
> $FragmentContentDispatcher.dispatch 
> (XMLDocumentFragmentScannerImpl.java:1693)
>        at  
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl 
> .scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>        at  
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> (XML11Configuration.java:834)
>        at  
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse 
> (XML11Configuration.java:764)
>        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse 
> (XMLParser.java:148)
>        at  
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse 
> (AbstractSAXParser.java:1242)
>        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>        at  
> org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
> (XMLMetaDataParser.java:370)
>        ... 11 more
>
> [ERROR] --------------------
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [ERROR] BUILD ERROR
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA  
> Enhancer tool exited with a non-null exit code.
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
> (DefaultLifecycleExecutor.java:559)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneG 
> oal(DefaultLifecycleExecutor.java:488)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal 
> (DefaultLifecycleExecutor.java:458)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand 
> leFailures(DefaultLifecycleExecutor.java:306)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment 
> s(DefaultLifecycleExecutor.java:273)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute 
> (DefaultLifecycleExecutor.java:140)
>        at org.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)
>        at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        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  
> OpenJPA Enhancer tool exited with a non-null exit code.
>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance 
> (OpenJpaEnhancerMojo.java:254)
>        at org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute 
> (OpenJpaEnhancerMojo.java:130)
>        at org.apache.maven.plugin.DefaultPluginManager.executeMojo 
> (DefaultPluginManager.java:412)
>        at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
> (DefaultLifecycleExecutor.java:534)
>        ... 16 more
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [INFO] Total time: 11 seconds
> [INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
> [INFO] Final Memory: 11M/20M
> [INFO]  
> ---------------------------------------------------------------------- 
> --
> [/snip]
>
>
>
>
>
> ----- Original Message ----- From: "Rahul Thakur"  
> <ra...@gmail.com>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 8:16 AM
> Subject: Re: Missing ProductDerivation resource error
>
>
>> Thanks Michael, Kevin,
>>
>> I think I am making some progress on the Maven plugin.
>>
>> If possible, having one of you guys around on IRC would be a big  
>> help for quick questions (I promise to keep them limited) ;-)
>>
>> Thanks again,
>> Rahul
>>
>> ----- Original Message ----- From: "Kevin Sutter"  
>> <kw...@gmail.com>
>> To: <op...@incubator.apache.org>
>> Sent: Tuesday, January 09, 2007 7:50 AM
>> Subject: Re: Missing ProductDerivation resource error
>>
>>
>>> Rahul,
>>> You are referencing old documentation.  Please use the following  
>>> links for
>>> the current OpenJPA documentation.  Thank you.
>>>
>>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA 
>>> +Documentation
>>>
>>> Mike has answered the specific question about "jdo" support in  
>>> OpenJPA in
>>> the previous reply.
>>>
>>> Kevin
>>>
>


Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
okies, my work is progressing in trickles as I am squeezing some time 
outside work :-)

Here's the latest issue while trying to process a bunch of .class files 
with Enhancer. It seems my orm.xml is missing something that is causing 
the PersistenceMetaDataFactory parse operation to fail, but not sure 
what. I have setup only one very basic persistent entity to get started 
with. Any ideas? I tried googling for some orm.xml samples but not many 
examples.

TIA,
Rahul

[snip]
[ERROR]  Standard error from the OpenJPA Enhancer tool:
[ERROR] --------------------
[ERROR] 109  openjpa  INFO   [main] openjpa.Tool - Enhancer running on 
type "class org.apache.maven.continuum.model.project.Schedule".
Exception in thread "main" <0|false|0.9.7-incubating-SNAPSHOT> 
org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: 
file:/E:/continuum-key-based-r
efactor/continuum-model/target/classes/META-INF/orm.xml [Location: Line: 
7, C: 94]: Type "org.apacha.maven.continuum.model.project.Schedule" 
could not be instant
iated.
        at 
org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:231)
        at 
org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:180)
        at 
org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:414)
        at 
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:272)
        at 
org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:186)
        at 
org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3680)
        at 
org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
        at 
org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
Caused by: java.io.IOException: org.xml.sax.SAXException: 
file:/E:/continuum-key-based-refactor/continuum-model/target/classes/META-INF/orm.xml 
[Location: Line:
7, C: 94]: Type "org.apacha.maven.continuum.model.project.Schedule" 
could not be instantiated.
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:373)
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:312)
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:289)
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:263)
        at 
org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:229)
        ... 7 more
Caused by: org.xml.sax.SAXException: 
file:/E:/continuum-key-based-refactor/continuum-model/target/classes/META-INF/orm.xml 
[Location: Line: 7, C: 94]: Type "org.
apacha.maven.continuum.model.project.Schedule" could not be 
instantiated.
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:649)
        at 
org.apache.openjpa.lib.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:281)
        at 
org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForName(XMLPersistenceMetaDataParser.java:1642)
        at 
org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass(XMLPersistenceMetaDataParser.java:713)
        at 
org.apache.openjpa.lib.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:102)
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:426)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
        at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:708)
        at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:370)
        ... 11 more

[ERROR] --------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA 
Enhancer tool exited with a non-null exit code.
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at 
org.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)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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 OpenJPA 
Enhancer tool exited with a non-null exit code.
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(OpenJpaEnhancerMojo.java:254)
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(OpenJpaEnhancerMojo.java:130)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Tue Jan 09 21:43:49 NZDT 2007
[INFO] Final Memory: 11M/20M
[INFO] ------------------------------------------------------------------------
[/snip]





----- Original Message ----- 
From: "Rahul Thakur" <ra...@gmail.com>
To: <op...@incubator.apache.org>
Sent: Tuesday, January 09, 2007 8:16 AM
Subject: Re: Missing ProductDerivation resource error


> Thanks Michael, Kevin,
>
> I think I am making some progress on the Maven plugin.
>
> If possible, having one of you guys around on IRC would be a big help 
> for quick questions (I promise to keep them limited) ;-)
>
> Thanks again,
> Rahul
>
> ----- Original Message ----- 
> From: "Kevin Sutter" <kw...@gmail.com>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 7:50 AM
> Subject: Re: Missing ProductDerivation resource error
>
>
>> Rahul,
>> You are referencing old documentation.  Please use the following 
>> links for
>> the current OpenJPA documentation.  Thank you.
>>
>> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA+Documentation
>>
>> Mike has answered the specific question about "jdo" support in 
>> OpenJPA in
>> the previous reply.
>>
>> Kevin
>>
> 


Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
Thanks Michael, Kevin,

I think I am making some progress on the Maven plugin.

If possible, having one of you guys around on IRC would be a big help 
for quick questions (I promise to keep them limited) ;-)

Thanks again,
Rahul

----- Original Message ----- 
From: "Kevin Sutter" <kw...@gmail.com>
To: <op...@incubator.apache.org>
Sent: Tuesday, January 09, 2007 7:50 AM
Subject: Re: Missing ProductDerivation resource error


> Rahul,
> You are referencing old documentation.  Please use the following links 
> for
> the current OpenJPA documentation.  Thank you.
>
> http://cwiki.apache.org/confluence/display/openjpa/OpenJPA+Documentation
>
> Mike has answered the specific question about "jdo" support in OpenJPA 
> in
> the previous reply.
>
> Kevin
>
> On 1/8/07, Rahul Thakur <ra...@gmail.com> wrote:
>>
>> Thanks Michael,
>>
>> I figured that last night after some digging around :-)
>>
>> BTW, when I tried switching the 'openjpa.MetaDataFactory' to 'jdo' in
>> 'openjpa.xml' properties, I got a ClassNotFoundException for 'jdo'. I
>> think the docs online say that 'jdo' is default meta data factory:
>>
>> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_conf_openjpa.html#openjpa.MetaDataFactory
>>
>> But here it mentions only 'jpa' as the recognized built-in metadata
>> factory:
>>
>> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_meta.html#ref_guide_meta_factory
>>
>> Which is definitive? I have a .jdo mappings files that I'd like to
>> process.
>>
>> Cheers,
>>
>> Rahul
>>
>>
>> ----- Original Message -----
>> From: "Michael Dick" <mi...@gmail.com>
>> To: <op...@incubator.apache.org>
>> Sent: Tuesday, January 09, 2007 4:35 AM
>> Subject: Re: Missing ProductDerivation resource error
>>
>>
>> > Hi Rahul,
>> >
>> > The problem here is that the enhancer can't find persistence.xml in
>> > the
>> > classpath. If you have persistence.xml defined in
>> > E:\continuum-key-based-refactor\continuum-model\target\classes\META-INF,
>> > it should be picked up.
>> >
>> > Alternatively you can pass in the location of persistence.xml in 
>> > with
>> > the -p
>> > [path to persistence.xml] arguments. I think that just having
>> > persistence.xml on the classpath would be easier and cleaner 
>> > though,
>> > but
>> > I've never looked into writing maven plugins..
>> >
>> >
>> > On 1/7/07, Rahul Thakur < rahul.thakur.xdev@gmail.com> wrote:
>> >>
>> >> Thanks Michael,
>> >>
>> >> That helped a bit! What required config properties do I need to 
>> >> set?
>> >> I
>> >> had the following set up in plugin config in the pom.xml.
>> >>
>> >> [snip]
>> >>       <plugin>
>> >>         <groupId>org.codehaus.mojo</groupId>
>> >>         <artifactId>openjpa-maven-plugin</artifactId>
>> >>         <version>0.0.1-SNAPSHOT</version>
>> >>         <configuration>
>> >>           <toolProperties>
>> >>             <property>
>> >>               <name>addDefaultConstructor</name>
>> >>               <value>false</value>
>> >>             </property>
>> >>             <property>
>> >>               <name>enforcePropertyRestrictions</name>
>> >>               <value>true</value>
>> >>             </property>
>> >>           </toolProperties>
>> >>         </configuration>
>> >>       </plugin>
>> >> [/snip]
>> >>
>> >> And this is what I see in the logs. Appreciate the help.
>> >>
>> >> [snip]
>> >> [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 -cp
>> >>
>> >>
>> 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-uti
>> >> ls-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\org\ap
>> >> ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> jdbc-5-0.9.7-incubating-SNAPSHOT.jar
>> >>
>> ;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> jdbc-0.9.7-incubating-SNAPSHOT.jar 
>> >> ;E:\repository\ant\ant\1.6.5\ant-
>> >> 1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-
>> >> logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> kernel-0.9.7-incubating-SNAPSHOT.jar
>> >> ;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar
>> ;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> all-0.9.7-incubating-SNAPSHOT.jar
>> >> ;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
>> >> s-collections\3.2\commons-collections-3.2.jar
>> >>
>> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> lib-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> persistence-0.9.7-incubating-SNAPSHOT.jar
>> >> ;E:\repository\javax\persistence\persistence-api\1.0\persistence-
>> >> api-1.0.jar
>> >>
>> ;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-
>> pool-1.3.jar
>> >>
>> ;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-
>> >> kernel-5-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-
>> >> 1.8.0.1.ja
>> >> r;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.jar
>> >> org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor
>> >> false -enforcePropertyRestrictions true
>> >>
>> >>
>> E:\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" 
>> >> <4|true|0.9.7-incubating-SNAPSHOT>
>> >> org.apache.openjpa.util.MetaDataException: MetaDataFactory could 
>> >> not
>> >> be
>> >> configured ( conf.ne
>> >> wMetaDataFactoryInstance() returned null). This might mean that no
>> >> configuration properties were found. If you are using Ant, please 
>> >> see
>> >> the <properties> or <pro
>> >> pertiesFile> attributes of the task's nested <config> element. 
>> >> This
>> >> can
>> >> also occur if your OpenJPA distribution jars are corrupt, or if 
>> >> your
>> >> security policy is o
>> >> verly strict.
>> >>         at
>> >> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
>> >> MetaDataRepository.java :1470)
>> >>         at
>> >> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(
>> >> MetaDataRepository.java:1463)
>> >>         at
>> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
>> >> Configurations.java:422)
>> >>         at
>> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
>> >> Configurations.java:347)
>> >>         at
>> >> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java
>> :99)
>> >>         at
>> >> org.apache.openjpa.lib.conf.ObjectValue.instantiate
>> >> (ObjectValue.java:70)
>> >>         at
>> >>
>> >>
>> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance
>> >> (OpenJPAConfigurationImpl.java:831)
>> >>         at
>> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java :3652)
>> >>         at
>> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
>> >>         at
>> >> org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
>> >>
>> >> [ERROR] --------------------
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [ERROR] BUILD ERROR
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
>> >> [INFO]
>> >>
>> ------------------------------------------------------------------------
>> >> [DEBUG] Trace
>> >> org.apache.maven.lifecycle.LifecycleExecutionException: The 
>> >> OpenJPA
>> >> Enhancer tool exited with a non-null exit code.
>> >>         at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
>> >> DefaultLifecycleExecutor.java:559)
>> >>         at
>> >>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
>> >> DefaultLifecycleExecutor.java:488)
>> >>         at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
>> >> DefaultLifecycleExecutor.java:458)
>> >>         at
>> >>
>> >>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> >> (DefaultLifecycleExecutor.java:306)
>> >>         at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
>> >> (
>> >> DefaultLifecycleExecutor.java:273)
>> >>         at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>> >> DefaultLifecycleExecutor.java:140)
>> >>         at
>> >> org.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)
>> >>         at
>> >> sun.reflect.NativeMethodAccessorImpl.invoke(
>> NativeMethodAccessorImpl.java
>> >> :39)
>> >>         at
>> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> DelegatingMethodAccessorImpl.java:25)
>> >>         at java.lang.reflect.Method.invoke (Method.java:585)
>> >>         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
>> >> OpenJPA
>> >> Enhancer tool exited with a non-null exit code.
>> >>         at
>> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
>> >> OpenJpaEnhancerMojo.java:194)
>> >>         at
>> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
>> >> OpenJpaEnhancerMojo.java:88)
>> >>         at
>> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo (
>> >> DefaultPluginManager.java:412)
>> >>         at
>> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> >> DefaultLifecycleExecutor.java:534)
>> >>         ... 16 more
>> >> [/snip]
>> >>
>> >>
>> >> ----- Original Message -----
>> >> From: "Michael Dick" <mi...@gmail.com>
>> >> To: <op...@incubator.apache.org>
>> >> Sent: Monday, January 08, 2007 5:39 AM
>> >> Subject: Re: Missing ProductDerivation resource error
>> >>
>> >>
>> >> > 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.
>> >> >
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > -Michael Dick
>> >
>>
>>
> 


Re: Missing ProductDerivation resource error

Posted by Kevin Sutter <kw...@gmail.com>.
Rahul,
You are referencing old documentation.  Please use the following links for
the current OpenJPA documentation.  Thank you.

http://cwiki.apache.org/confluence/display/openjpa/OpenJPA+Documentation

Mike has answered the specific question about "jdo" support in OpenJPA in
the previous reply.

Kevin

On 1/8/07, Rahul Thakur <ra...@gmail.com> wrote:
>
> Thanks Michael,
>
> I figured that last night after some digging around :-)
>
> BTW, when I tried switching the 'openjpa.MetaDataFactory' to 'jdo' in
> 'openjpa.xml' properties, I got a ClassNotFoundException for 'jdo'. I
> think the docs online say that 'jdo' is default meta data factory:
>
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_conf_openjpa.html#openjpa.MetaDataFactory
>
> But here it mentions only 'jpa' as the recognized built-in metadata
> factory:
>
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_meta.html#ref_guide_meta_factory
>
> Which is definitive? I have a .jdo mappings files that I'd like to
> process.
>
> Cheers,
>
> Rahul
>
>
> ----- Original Message -----
> From: "Michael Dick" <mi...@gmail.com>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 4:35 AM
> Subject: Re: Missing ProductDerivation resource error
>
>
> > Hi Rahul,
> >
> > The problem here is that the enhancer can't find persistence.xml in
> > the
> > classpath. If you have persistence.xml defined in
> > E:\continuum-key-based-refactor\continuum-model\target\classes\META-INF,
> > it should be picked up.
> >
> > Alternatively you can pass in the location of persistence.xml in with
> > the -p
> > [path to persistence.xml] arguments. I think that just having
> > persistence.xml on the classpath would be easier and cleaner though,
> > but
> > I've never looked into writing maven plugins..
> >
> >
> > On 1/7/07, Rahul Thakur < rahul.thakur.xdev@gmail.com> wrote:
> >>
> >> Thanks Michael,
> >>
> >> That helped a bit! What required config properties do I need to set?
> >> I
> >> had the following set up in plugin config in the pom.xml.
> >>
> >> [snip]
> >>       <plugin>
> >>         <groupId>org.codehaus.mojo</groupId>
> >>         <artifactId>openjpa-maven-plugin</artifactId>
> >>         <version>0.0.1-SNAPSHOT</version>
> >>         <configuration>
> >>           <toolProperties>
> >>             <property>
> >>               <name>addDefaultConstructor</name>
> >>               <value>false</value>
> >>             </property>
> >>             <property>
> >>               <name>enforcePropertyRestrictions</name>
> >>               <value>true</value>
> >>             </property>
> >>           </toolProperties>
> >>         </configuration>
> >>       </plugin>
> >> [/snip]
> >>
> >> And this is what I see in the logs. Appreciate the help.
> >>
> >> [snip]
> >> [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 -cp
> >>
> >>
> 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-uti
> >> ls-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\org\ap
> >> ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-
> >> jdbc-5-0.9.7-incubating-SNAPSHOT.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> >> jdbc-0.9.7-incubating-SNAPSHOT.jar ;E:\repository\ant\ant\1.6.5\ant-
> >> 1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-
> >> logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
> >> kernel-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar
> ;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-
> >> all-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
> >> s-collections\3.2\commons-collections-3.2.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
> >> lib-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-
> >> persistence-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\javax\persistence\persistence-api\1.0\persistence-
> >> api-1.0.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> >> persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-
> >> xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-
> pool-1.3.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-
> >> kernel-5-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-
> >> 1.8.0.1.ja
> >> r;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.jar
> >> org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor
> >> false -enforcePropertyRestrictions true
> >>
> >>
> E:\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" <4|true|0.9.7-incubating-SNAPSHOT>
> >> org.apache.openjpa.util.MetaDataException: MetaDataFactory could not
> >> be
> >> configured ( conf.ne
> >> wMetaDataFactoryInstance() returned null). This might mean that no
> >> configuration properties were found. If you are using Ant, please see
> >> the <properties> or <pro
> >> pertiesFile> attributes of the task's nested <config> element. This
> >> can
> >> also occur if your OpenJPA distribution jars are corrupt, or if your
> >> security policy is o
> >> verly strict.
> >>         at
> >> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
> >> MetaDataRepository.java :1470)
> >>         at
> >> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(
> >> MetaDataRepository.java:1463)
> >>         at
> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> >> Configurations.java:422)
> >>         at
> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> >> Configurations.java:347)
> >>         at
> >> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java
> :99)
> >>         at
> >> org.apache.openjpa.lib.conf.ObjectValue.instantiate
> >> (ObjectValue.java:70)
> >>         at
> >>
> >>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance
> >> (OpenJPAConfigurationImpl.java:831)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java :3652)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
> >>
> >> [ERROR] --------------------
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [DEBUG] Trace
> >> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA
> >> Enhancer tool exited with a non-null exit code.
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
> >> DefaultLifecycleExecutor.java:559)
> >>         at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> >> DefaultLifecycleExecutor.java:488)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
> >> DefaultLifecycleExecutor.java:458)
> >>         at
> >>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> >> (DefaultLifecycleExecutor.java:306)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> >> (
> >> DefaultLifecycleExecutor.java:273)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >> DefaultLifecycleExecutor.java:140)
> >>         at
> >> org.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)
> >>         at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java
> >> :39)
> >>         at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:25)
> >>         at java.lang.reflect.Method.invoke (Method.java:585)
> >>         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
> >> OpenJPA
> >> Enhancer tool exited with a non-null exit code.
> >>         at
> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
> >> OpenJpaEnhancerMojo.java:194)
> >>         at
> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
> >> OpenJpaEnhancerMojo.java:88)
> >>         at
> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo (
> >> DefaultPluginManager.java:412)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >> DefaultLifecycleExecutor.java:534)
> >>         ... 16 more
> >> [/snip]
> >>
> >>
> >> ----- Original Message -----
> >> From: "Michael Dick" <mi...@gmail.com>
> >> To: <op...@incubator.apache.org>
> >> Sent: Monday, January 08, 2007 5:39 AM
> >> Subject: Re: Missing ProductDerivation resource error
> >>
> >>
> >> > 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.
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > -Michael Dick
> >
>
>

Re: Missing ProductDerivation resource error

Posted by Michael Dick <mi...@gmail.com>.
Unfortunately you can't use JDO with OpenJPA, so you'll have to convert your
jdo mappings files to persistence.xml.

OpenJPA and BEA's Kodo share much of the same code, with one of the
differences being that Kodo supports JDO as well as JPA.  The references to
JDO in the OpenJPA documentation were missed when some of the documentation
was generated.

Sorry for the confusion, but at this time there OpenJPA doesn't included a
JDO interface.

On 1/8/07, Rahul Thakur <ra...@gmail.com> wrote:
>
> Thanks Michael,
>
> I figured that last night after some digging around :-)
>
> BTW, when I tried switching the 'openjpa.MetaDataFactory' to 'jdo' in
> 'openjpa.xml' properties, I got a ClassNotFoundException for 'jdo'. I
> think the docs online say that 'jdo' is default meta data factory:
>
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_conf_openjpa.html#openjpa.MetaDataFactory
>
> But here it mentions only 'jpa' as the recognized built-in metadata
> factory:
>
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_meta.html#ref_guide_meta_factory
>
> Which is definitive? I have a .jdo mappings files that I'd like to
> process.
>
> Cheers,
>
> Rahul
>
>
> ----- Original Message -----
> From: "Michael Dick" <mi...@gmail.com>
> To: <op...@incubator.apache.org>
> Sent: Tuesday, January 09, 2007 4:35 AM
> Subject: Re: Missing ProductDerivation resource error
>
>
> > Hi Rahul,
> >
> > The problem here is that the enhancer can't find persistence.xml in
> > the
> > classpath. If you have persistence.xml defined in
> > E:\continuum-key-based-refactor\continuum-model\target\classes\META-INF,
> > it should be picked up.
> >
> > Alternatively you can pass in the location of persistence.xml in with
> > the -p
> > [path to persistence.xml] arguments. I think that just having
> > persistence.xml on the classpath would be easier and cleaner though,
> > but
> > I've never looked into writing maven plugins..
> >
> >
> > On 1/7/07, Rahul Thakur < rahul.thakur.xdev@gmail.com> wrote:
> >>
> >> Thanks Michael,
> >>
> >> That helped a bit! What required config properties do I need to set?
> >> I
> >> had the following set up in plugin config in the pom.xml.
> >>
> >> [snip]
> >>       <plugin>
> >>         <groupId>org.codehaus.mojo</groupId>
> >>         <artifactId>openjpa-maven-plugin</artifactId>
> >>         <version>0.0.1-SNAPSHOT</version>
> >>         <configuration>
> >>           <toolProperties>
> >>             <property>
> >>               <name>addDefaultConstructor</name>
> >>               <value>false</value>
> >>             </property>
> >>             <property>
> >>               <name>enforcePropertyRestrictions</name>
> >>               <value>true</value>
> >>             </property>
> >>           </toolProperties>
> >>         </configuration>
> >>       </plugin>
> >> [/snip]
> >>
> >> And this is what I see in the logs. Appreciate the help.
> >>
> >> [snip]
> >> [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 -cp
> >>
> >>
> 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-uti
> >> ls-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\org\ap
> >> ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-
> >> jdbc-5-0.9.7-incubating-SNAPSHOT.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> >> jdbc-0.9.7-incubating-SNAPSHOT.jar ;E:\repository\ant\ant\1.6.5\ant-
> >> 1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-
> >> logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
> >> kernel-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar
> ;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-
> >> all-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
> >> s-collections\3.2\commons-collections-3.2.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
> >> lib-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-
> >> persistence-0.9.7-incubating-SNAPSHOT.jar
> >> ;E:\repository\javax\persistence\persistence-api\1.0\persistence-
> >> api-1.0.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> >> persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-
> >> xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-
> pool-1.3.jar
> >>
> ;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-
> >> kernel-5-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-
> >> 1.8.0.1.ja
> >> r;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.jar
> >> org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor
> >> false -enforcePropertyRestrictions true
> >>
> >>
> E:\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" <4|true|0.9.7-incubating-SNAPSHOT>
> >> org.apache.openjpa.util.MetaDataException: MetaDataFactory could not
> >> be
> >> configured ( conf.ne
> >> wMetaDataFactoryInstance() returned null). This might mean that no
> >> configuration properties were found. If you are using Ant, please see
> >> the <properties> or <pro
> >> pertiesFile> attributes of the task's nested <config> element. This
> >> can
> >> also occur if your OpenJPA distribution jars are corrupt, or if your
> >> security policy is o
> >> verly strict.
> >>         at
> >> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
> >> MetaDataRepository.java :1470)
> >>         at
> >> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(
> >> MetaDataRepository.java:1463)
> >>         at
> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> >> Configurations.java:422)
> >>         at
> >> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> >> Configurations.java:347)
> >>         at
> >> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java
> :99)
> >>         at
> >> org.apache.openjpa.lib.conf.ObjectValue.instantiate
> >> (ObjectValue.java:70)
> >>         at
> >>
> >>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance
> >> (OpenJPAConfigurationImpl.java:831)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java :3652)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
> >>         at
> >> org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
> >>
> >> [ERROR] --------------------
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> >> [INFO]
> >>
> ------------------------------------------------------------------------
> >> [DEBUG] Trace
> >> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA
> >> Enhancer tool exited with a non-null exit code.
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
> >> DefaultLifecycleExecutor.java:559)
> >>         at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> >> DefaultLifecycleExecutor.java:488)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
> >> DefaultLifecycleExecutor.java:458)
> >>         at
> >>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> >> (DefaultLifecycleExecutor.java:306)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> >> (
> >> DefaultLifecycleExecutor.java:273)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >> DefaultLifecycleExecutor.java:140)
> >>         at
> >> org.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)
> >>         at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java
> >> :39)
> >>         at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:25)
> >>         at java.lang.reflect.Method.invoke (Method.java:585)
> >>         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
> >> OpenJPA
> >> Enhancer tool exited with a non-null exit code.
> >>         at
> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
> >> OpenJpaEnhancerMojo.java:194)
> >>         at
> >> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
> >> OpenJpaEnhancerMojo.java:88)
> >>         at
> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo (
> >> DefaultPluginManager.java:412)
> >>         at
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >> DefaultLifecycleExecutor.java:534)
> >>         ... 16 more
> >> [/snip]
> >>
> >>
> >> ----- Original Message -----
> >> From: "Michael Dick" <mi...@gmail.com>
> >> To: <op...@incubator.apache.org>
> >> Sent: Monday, January 08, 2007 5:39 AM
> >> Subject: Re: Missing ProductDerivation resource error
> >>
> >>
> >> > 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.
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > -Michael Dick
> >
>
>


-- 
-Michael Dick

Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
Thanks Michael,

I figured that last night after some digging around :-)

BTW, when I tried switching the 'openjpa.MetaDataFactory' to 'jdo' in 
'openjpa.xml' properties, I got a ClassNotFoundException for 'jdo'. I 
think the docs online say that 'jdo' is default meta data factory:
http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_conf_openjpa.html#openjpa.MetaDataFactory

But here it mentions only 'jpa' as the recognized built-in metadata 
factory:
http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_meta.html#ref_guide_meta_factory

Which is definitive? I have a .jdo mappings files that I'd like to 
process.

Cheers,

Rahul


----- Original Message ----- 
From: "Michael Dick" <mi...@gmail.com>
To: <op...@incubator.apache.org>
Sent: Tuesday, January 09, 2007 4:35 AM
Subject: Re: Missing ProductDerivation resource error


> Hi Rahul,
>
> The problem here is that the enhancer can't find persistence.xml in 
> the
> classpath. If you have persistence.xml defined in
> E:\continuum-key-based-refactor\continuum-model\target\classes\META-INF,
> it should be picked up.
>
> Alternatively you can pass in the location of persistence.xml in with 
> the -p
> [path to persistence.xml] arguments. I think that just having
> persistence.xml on the classpath would be easier and cleaner though, 
> but
> I've never looked into writing maven plugins..
>
>
> On 1/7/07, Rahul Thakur < rahul.thakur.xdev@gmail.com> wrote:
>>
>> Thanks Michael,
>>
>> That helped a bit! What required config properties do I need to set? 
>> I
>> had the following set up in plugin config in the pom.xml.
>>
>> [snip]
>>       <plugin>
>>         <groupId>org.codehaus.mojo</groupId>
>>         <artifactId>openjpa-maven-plugin</artifactId>
>>         <version>0.0.1-SNAPSHOT</version>
>>         <configuration>
>>           <toolProperties>
>>             <property>
>>               <name>addDefaultConstructor</name>
>>               <value>false</value>
>>             </property>
>>             <property>
>>               <name>enforcePropertyRestrictions</name>
>>               <value>true</value>
>>             </property>
>>           </toolProperties>
>>         </configuration>
>>       </plugin>
>> [/snip]
>>
>> And this is what I see in the logs. Appreciate the help.
>>
>> [snip]
>> [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 -cp
>>
>> 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-uti
>> ls-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\org\ap
>> ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-
>> jdbc-5-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
>> jdbc-0.9.7-incubating-SNAPSHOT.jar ;E:\repository\ant\ant\1.6.5\ant-
>> 1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-
>> logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
>> kernel-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-
>> all-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
>> s-collections\3.2\commons-collections-3.2.jar
>> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
>> lib-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-
>> persistence-0.9.7-incubating-SNAPSHOT.jar
>> ;E:\repository\javax\persistence\persistence-api\1.0\persistence-
>> api-1.0.jar
>> ;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
>> persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-
>> xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-pool-1.3.jar
>> ;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-
>> kernel-5-0.9.7-incubating-SNAPSHOT.jar;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-
>> 1.8.0.1.ja
>> r;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.jar
>> org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor
>> false -enforcePropertyRestrictions true
>>
>> E:\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" <4|true|0.9.7-incubating-SNAPSHOT>
>> org.apache.openjpa.util.MetaDataException: MetaDataFactory could not 
>> be
>> configured ( conf.ne
>> wMetaDataFactoryInstance() returned null). This might mean that no
>> configuration properties were found. If you are using Ant, please see
>> the <properties> or <pro
>> pertiesFile> attributes of the task's nested <config> element. This 
>> can
>> also occur if your OpenJPA distribution jars are corrupt, or if your
>> security policy is o
>> verly strict.
>>         at
>> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
>> MetaDataRepository.java :1470)
>>         at
>> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(
>> MetaDataRepository.java:1463)
>>         at
>> org.apache.openjpa.lib.conf.Configurations.configureInstance(
>> Configurations.java:422)
>>         at
>> org.apache.openjpa.lib.conf.Configurations.configureInstance(
>> Configurations.java:347)
>>         at
>> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:99)
>>         at
>> org.apache.openjpa.lib.conf.ObjectValue.instantiate 
>> (ObjectValue.java:70)
>>         at
>>
>> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance
>> (OpenJPAConfigurationImpl.java:831)
>>         at
>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java :3652)
>>         at
>> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
>>         at
>> org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
>>
>> [ERROR] --------------------
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
>> [INFO]
>> ------------------------------------------------------------------------
>> [DEBUG] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA
>> Enhancer tool exited with a non-null exit code.
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
>> DefaultLifecycleExecutor.java:559)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
>> DefaultLifecycleExecutor.java:488)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
>> DefaultLifecycleExecutor.java:458)
>>         at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> (DefaultLifecycleExecutor.java:306)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments 
>> (
>> DefaultLifecycleExecutor.java:273)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>> DefaultLifecycleExecutor.java:140)
>>         at
>> org.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)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>> :39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke (Method.java:585)
>>         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 
>> OpenJPA
>> Enhancer tool exited with a non-null exit code.
>>         at
>> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
>> OpenJpaEnhancerMojo.java:194)
>>         at
>> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
>> OpenJpaEnhancerMojo.java:88)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo (
>> DefaultPluginManager.java:412)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> DefaultLifecycleExecutor.java:534)
>>         ... 16 more
>> [/snip]
>>
>>
>> ----- Original Message -----
>> From: "Michael Dick" <mi...@gmail.com>
>> To: <op...@incubator.apache.org>
>> Sent: Monday, January 08, 2007 5:39 AM
>> Subject: Re: Missing ProductDerivation resource error
>>
>>
>> > 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.
>> >
>> >
>>
>
>
>
> -- 
> -Michael Dick
> 


Re: Missing ProductDerivation resource error

Posted by Michael Dick <mi...@gmail.com>.
Hi Rahul,

The problem here is that the enhancer can't find persistence.xml in the
classpath. If you have persistence.xml defined in
E:\continuum-key-based-refactor\continuum-model\target\classes\META-INF,
it should be picked up.

Alternatively you can pass in the location of persistence.xml in with the -p
[path to persistence.xml] arguments. I think that just having
persistence.xml on the classpath would be easier and cleaner though, but
I've never looked into writing maven plugins..


On 1/7/07, Rahul Thakur < rahul.thakur.xdev@gmail.com> wrote:
>
> Thanks Michael,
>
> That helped a bit! What required config properties do I need to set? I
> had the following set up in plugin config in the pom.xml.
>
> [snip]
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>openjpa-maven-plugin</artifactId>
>         <version>0.0.1-SNAPSHOT</version>
>         <configuration>
>           <toolProperties>
>             <property>
>               <name>addDefaultConstructor</name>
>               <value>false</value>
>             </property>
>             <property>
>               <name>enforcePropertyRestrictions</name>
>               <value>true</value>
>             </property>
>           </toolProperties>
>         </configuration>
>       </plugin>
> [/snip]
>
> And this is what I see in the logs. Appreciate the help.
>
> [snip]
> [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 -cp
>
> 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-uti
> ls-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\org\ap
> ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-
> jdbc-5-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> jdbc-0.9.7-incubating-SNAPSHOT.jar ;E:\repository\ant\ant\1.6.5\ant-
> 1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-
> logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-
> kernel-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-
> all-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
> s-collections\3.2\commons-collections-3.2.jar
> ;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-
> lib-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-
> persistence-0.9.7-incubating-SNAPSHOT.jar
> ;E:\repository\javax\persistence\persistence-api\1.0\persistence-
> api-1.0.jar
> ;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-
> persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-
> xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-pool-1.3.jar
> ;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-
> kernel-5-0.9.7-incubating-SNAPSHOT.jar;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-
> 1.8.0.1.ja
> r;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.jar
> org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor
> false -enforcePropertyRestrictions true
>
> E:\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" <4|true|0.9.7-incubating-SNAPSHOT>
> org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be
> configured ( conf.ne
> wMetaDataFactoryInstance() returned null). This might mean that no
> configuration properties were found. If you are using Ant, please see
> the <properties> or <pro
> pertiesFile> attributes of the task's nested <config> element. This can
> also occur if your OpenJPA distribution jars are corrupt, or if your
> security policy is o
> verly strict.
>         at
> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
> MetaDataRepository.java :1470)
>         at
> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(
> MetaDataRepository.java:1463)
>         at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> Configurations.java:422)
>         at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(
> Configurations.java:347)
>         at
> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:99)
>         at
> org.apache.openjpa.lib.conf.ObjectValue.instantiate (ObjectValue.java:70)
>         at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance
> (OpenJPAConfigurationImpl.java:831)
>         at
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java :3652)
>         at
> org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
>         at
> org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)
>
> [ERROR] --------------------
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA
> Enhancer tool exited with a non-null exit code.
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
> DefaultLifecycleExecutor.java:559)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> DefaultLifecycleExecutor.java:488)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
> DefaultLifecycleExecutor.java:458)
>         at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:306)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
> DefaultLifecycleExecutor.java:273)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:140)
>         at
> org.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)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke (Method.java:585)
>         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 OpenJPA
> Enhancer tool exited with a non-null exit code.
>         at
> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(
> OpenJpaEnhancerMojo.java:194)
>         at
> org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(
> OpenJpaEnhancerMojo.java:88)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo (
> DefaultPluginManager.java:412)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:534)
>         ... 16 more
> [/snip]
>
>
> ----- Original Message -----
> From: "Michael Dick" <mi...@gmail.com>
> To: <op...@incubator.apache.org>
> Sent: Monday, January 08, 2007 5:39 AM
> Subject: Re: Missing ProductDerivation resource error
>
>
> > 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.
> >
> >
>



-- 
-Michael Dick

Re: Missing ProductDerivation resource error

Posted by Rahul Thakur <ra...@gmail.com>.
Thanks Michael,

That helped a bit! What required config properties do I need to set? I 
had the following set up in plugin config in the pom.xml.

[snip]
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <configuration>
          <toolProperties>
            <property>
              <name>addDefaultConstructor</name>
              <value>false</value>
            </property>
            <property>
              <name>enforcePropertyRestrictions</name>
              <value>true</value>
            </property>
          </toolProperties>
        </configuration>
      </plugin>
[/snip]

And this is what I see in the logs. Appreciate the help.

[snip]
[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 -cp 
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-uti
ls-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\org\ap
ache\openjpa\openjpa-jdbc-5\0.9.7-incubating-SNAPSHOT\openjpa-jdbc-5-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-jdbc-0.9.7-incubating-SNAPSHOT.jar;E:\repository\ant\ant\1.6.5\ant-1.6.5.jar;E:\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.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\openjpa\openjpa-kernel\0.9.7-incubating-SNAPSHOT\openjpa-kernel-0.9.7-incubating-SNAPSHOT.jar;E:\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar;E:\repository\org\apache\openjpa\openjpa-all\0.9.7-incubating-SNAPSHOT\openjpa-all-0.9.7-incubating-SNAPSHOT.jar;E:\repository\net\sourceforge\serp\serp\1.11.0\serp-1.11.0.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\commons-collections\common
 s-collections\3.2\commons-collections-3.2.jar;E:\repository\org\apache\openjpa\openjpa-lib\0.9.7-incubating-SNAPSHOT\openjpa-lib-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-persistence\0.9.7-incubating-SNAPSHOT\openjpa-persistence-0.9.7-incubating-SNAPSHOT.jar;E:\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar;E:\repository\org\apache\openjpa\openjpa-persistence-jdbc\0.9.7-incubating-SNAPSHOT\openjpa-persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar;E:\repository\org\apache\openjpa\openjpa-xmlstore\0.9.7-incubating-SNAPSHOT\openjpa-xmlstore-0.9.7-incubating-SNAPSHOT.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\commons-pool\commons-pool\1.3\commons-pool-1.3.jar;E:\repository\org\apache\openjpa\openjpa-kernel-5\0.9.7-incubating-SNAPSHOT\openjpa-kernel-5-0.9.7-incubating-SNAPSHOT.jar;E:\repository\hsqldb\hsqldb\1.8.0.1\hsqldb-1.8.0.1.ja
 r;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.jar 
org.apache.openjpa.enhance.PCEnhancer -addDefaultConstructor 
false -enforcePropertyRestrictions true 
E:\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" <4|true|0.9.7-incubating-SNAPSHOT> 
org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be 
configured (conf.ne
wMetaDataFactoryInstance() returned null). This might mean that no 
configuration properties were found. If you are using Ant, please see 
the <properties> or <pro
pertiesFile> attributes of the task's nested <config> element. This can 
also occur if your OpenJPA distribution jars are corrupt, or if your 
security policy is o
verly strict.
        at 
org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(MetaDataRepository.java:1470)
        at 
org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataRepository.java:1463)
        at 
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:422)
        at 
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:347)
        at 
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:99)
        at 
org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:70)
        at 
org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:831)
        at 
org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3652)
        at 
org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3635)
        at 
org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3607)

[ERROR] --------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The OpenJPA Enhancer tool exited with a non-null exit code.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA 
Enhancer tool exited with a non-null exit code.
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at 
org.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)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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 OpenJPA 
Enhancer tool exited with a non-null exit code.
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.enhance(OpenJpaEnhancerMojo.java:194)
        at 
org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(OpenJpaEnhancerMojo.java:88)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
[/snip]


----- Original Message ----- 
From: "Michael Dick" <mi...@gmail.com>
To: <op...@incubator.apache.org>
Sent: Monday, January 08, 2007 5:39 AM
Subject: Re: Missing ProductDerivation resource error


> 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.
>
> 

Re: Missing ProductDerivation resource error

Posted by Michael Dick <mi...@gmail.com>.
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 <ra...@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