From open-jpa-dev-return-1570-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Mon Jan 08 16:50:21 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 68557 invoked from network); 8 Jan 2007 16:50:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2007 16:50:20 -0000 Received: (qmail 25059 invoked by uid 500); 8 Jan 2007 16:50:27 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 24954 invoked by uid 500); 8 Jan 2007 16:50:27 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 24945 invoked by uid 99); 8 Jan 2007 16:50:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 08:50:26 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of michael.d.dick@gmail.com designates 64.233.162.234 as permitted sender) Received: from [64.233.162.234] (HELO nz-out-0506.google.com) (64.233.162.234) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 08:50:17 -0800 Received: by nz-out-0506.google.com with SMTP id j2so2481847nzf for ; Mon, 08 Jan 2007 08:49:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=JAH6z3QAO9WSM/qCU8Oq4c0dfghkAx0sycZ4pqm3ugPtvTP8pOoCHWFkRWv/07S3oDm8ZSzOsbrj7NKnhXoXMXgNFEgNHubAt7CuW3oWcY81Dwfjj7eOwFokxoKP1tDHahNDu7JRuzMerzFwO7SZ1Dg6VILiZPyyJKJvl+K1RzI= Received: by 10.65.206.7 with SMTP id i7mr2606241qbq.1168274996381; Mon, 08 Jan 2007 08:49:56 -0800 (PST) Received: by 10.65.241.10 with HTTP; Mon, 8 Jan 2007 08:49:56 -0800 (PST) Message-ID: <72c1350f0701080849p20a99223y4de31eeaa0bdd3e@mail.gmail.com> Date: Mon, 8 Jan 2007 10:49:56 -0600 From: "Michael Dick" To: open-jpa-dev@incubator.apache.org Subject: Re: Missing ProductDerivation resource error In-Reply-To: <001701c73342$84e66be0$4001a8c0@nonec03d6244ff> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_30522_2665995.1168274996143" References: <000d01c731f8$11894e10$4001a8c0@nonec03d6244ff> <72c1350f0701070839g12bdd852le1f0d20a8a3b0454@mail.gmail.com> <000501c7328d$58cb3b40$4001a8c0@nonec03d6244ff> <72c1350f0701080735mb5e2020s70eac005e283d1b0@mail.gmail.com> <001701c73342$84e66be0$4001a8c0@nonec03d6244ff> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_30522_2665995.1168274996143 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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" > To: > 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] > >> > >> org.codehaus.mojo > >> openjpa-maven-plugin > >> 0.0.1-SNAPSHOT > >> > >> > >> > >> addDefaultConstructor > >> false > >> > >> > >> enforcePropertyRestrictions > >> true > >> > >> > >> > >> > >> [/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 or >> pertiesFile> attributes of the task's nested 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" > >> To: > >> 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 ------=_Part_30522_2665995.1168274996143--