Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 84584 invoked from network); 28 Aug 2007 16:11:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2007 16:11:42 -0000 Received: (qmail 3950 invoked by uid 500); 28 Aug 2007 16:11:38 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 3926 invoked by uid 500); 28 Aug 2007 16:11:38 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 3917 invoked by uid 99); 28 Aug 2007 16:11:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 09:11:38 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jamin.short@gmail.com designates 66.249.92.171 as permitted sender) Received: from [66.249.92.171] (HELO ug-out-1314.google.com) (66.249.92.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 16:11:31 +0000 Received: by ug-out-1314.google.com with SMTP id 17so256861ugm for ; Tue, 28 Aug 2007 09:10:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YIdYDviShGpeGynObZNSlc+xIUELL2zv6ho7iQqZky9/SxBIgKAbQT+TVKmvVNCha8YL59jDGllyTJQ6FwIvnD/ME/QTq2Ke/M7sQA4ZQZxv3breWS1at+MbTCyH6jKG6c6Xhm7IKgxR9U1rdRIyhfhc4mKrNnefFBY68ErFBsE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Roe/MBrkDtHFgavNpRAXTjv/FhGX2UB7slFeIMKMpGjr/oR4vfmMuVTFOOaLk/hUKQga9m5CUtObsxax9WNOhzwICPddRuKFYDzyzv9rLa+MvC6nW5dkgsV2yw4QbtvROY2ZQT5mfeUGJLehXbpec1o54XYv6MKyCbnXgDM9OjU= Received: by 10.142.233.9 with SMTP id f9mr580074wfh.1188317452021; Tue, 28 Aug 2007 09:10:52 -0700 (PDT) Received: by 10.143.35.17 with HTTP; Tue, 28 Aug 2007 09:10:52 -0700 (PDT) Message-ID: <86aa493a0708280910t2a006612t6679be2fd0e098f@mail.gmail.com> Date: Tue, 28 Aug 2007 17:10:52 +0100 From: "ben short" To: users@openjpa.apache.org Subject: Re: how to get maven openjpa plugin to enhance In-Reply-To: <7262f25e0708280830s5376bb9fof22ae239ae87f301@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46D382EC.4070400@co.brazos.tx.us> <7262f25e0708280830s5376bb9fof22ae239ae87f301@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Ok heres my setup, as I said I only got this far lastnight so by no means is it 100% correct.. pom.xml 4.0.0 com.daisytechnologies.jpatest jpa-test jar 1.0-SNAPSHOT jpa-test http://maven.apache.org junit junit 3.8.1 test org.apache.openjpa openjpa-all 0.9.6-incubating org.springframework spring 2.0.6 compile postgresql postgresql 8.2-504.jdbc3 compile org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 org.codehaus.mojo openjpa-maven-plugin process-classes enhance addDefaultConstructor true enforcePropertyRestrictions true org.apache.maven.plugins maven-surefire-plugin com/daisytechnologies/**/*Tests.class And my persistance.xml which is in src/main/resources/META-INF org.apache.openjpa.persistence.PersistenceProviderImpl com.daisytechnologies.jpatest.Product com.daisytechnologies.jpatest.ProductInstance com.daisytechnologies.jpatest.AttributeAndValue and orm.xml also in src/main/resources/META-INF PROPERTY Running mvn process-classes produces the following output... [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building jpa-test [INFO] task-segment: [process-classes] [INFO] ---------------------------------------------------------------------------- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 2 source files to C:\Documents and Settings\Ben\My Documents\Programming\Projects\jpa-test\target\classes [INFO] [openjpa:enhance {execution: default}] [INFO] [ERROR] -------------------- [ERROR] Standard error from the OpenJPA Enhancer tool: [ERROR] -------------------- [ERROR] 47 INFO [main] openjpa.Tool - Enhancer running on type "class com.daisytechnologies.jpatest.Product". 203 INFO [main] openjpa.Tool - The class is already persistence capable - no enhancement performed. 203 INFO [main] openjpa.Tool - Enhancer running on type "class com.daisytechnologies.jpatest.Main". 203 WARN [main] openjpa.Enhance - Type "class com.daisytechnologies.jpatest.Main" has no metadata; enhancing as persistence aware. If you intended for "class com.daisytechnologies.jpatest.Main" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class com.daisytechnologies.jpatest.Main". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 203 INFO [main] openjpa.Tool - The class does not have metadata - enhanced as persistence-aware. 219 INFO [main] openjpa.Tool - Enhancer running on type "class com.daisytechnologies.jpatest.AttributeAndValue". 250 INFO [main] openjpa.Tool - Enhancer running on type "class com.daisytechnologies.jpatest.Main$1". 250 WARN [main] openjpa.Enhance - Type "class com.daisytechnologies.jpatest.Main$1" has no metadata; enhancing as persistence aware. If you intended for "class com.daisytechnologies.jpatest.Main$1" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class com.daisytechnologies.jpatest.Main$1". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 266 INFO [main] openjpa.Tool - The class does not have metadata - enhanced as persistence-aware. 266 INFO [main] openjpa.Tool - Enhancer running on type "class com.daisytechnologies.jpatest.ProductInstance". [ERROR] -------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Tue Aug 28 17:08:37 BST 2007 [INFO] Final Memory: 6M/12M [INFO] ------------------------------------------------------------------------ On 8/28/07, Patrick Linskey wrote: > Hi, > > What do you see if you set the openjpa.Log system property to > DefaultLevel=TRACE? > > I'm not a maven expert, but I imagine that you could do this like so: > > mvn -Dopenjpa.Log=DefaultLevel=TRACE package > > -Patrick > > On 8/27/07, sudhakar wrote: > > > > I have the following in my maven JPA project's pom.xml. But when I run > > "mvn clean package" I get an error message as follows. I am following > > the instructions here > > > > http://bill.dudney.net/roller/bill/entry/20070424 > > > > I am using the 1.0.0-SNAPSHOT version of OpenJPA. I'd appreciate any > > help troubleshooting this. > > Thanks > > > > > > [INFO] [openjpa:enhance {execution: JPA Enhance}] > > [INFO] > > [INFO] > > ------------------------------------------------------------------------ > > [ERROR] BUILD ERROR > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] The OpenJPA Enhancer tool exited with a non-null exit code. > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] Trace > > org.apache.maven.lifecycle.LifecycleExecutionException: The OpenJPA > > Enhancer too > > l exited with a non-null exit code. > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa > > ultLifecycleExecutor.java:564) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi > > fecycle(DefaultLifecycleExecutor.java:480) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau > > ltLifecycleExecutor.java:459) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan > > dleFailures(DefaultLifecycleExecutor.java:311) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen > > ts(DefaultLifecycleExecutor.java:278) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi > > fecycleExecutor.java:143) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > > java:39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > > sorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > 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(OpenJpaEnhancer > > Mojo.java:248) > > at > > org.codehaus.mojo.openjpa.OpenJpaEnhancerMojo.execute(OpenJpaEnhancer > > Mojo.java:105) > > at > > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi > > nManager.java:443) > > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa > > ultLifecycleExecutor.java:539) > > ... 16 more > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] Total time: 10 seconds > > [INFO] Finished at: Mon Aug 27 16:59:12 CDT 2007 > > [INFO] Final Memory: 8M/19M > > [INFO] > > ------------------------------------------------------------------------ > > > > > > > > > > > > My pom.xml > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > > http://maven.apache.org/maven-v4_0_0.xsd"> > > 4.0.0 > > brazos.voter > > brazos.voter.lib > > 1.0.0 > > > > > > > > org.codehaus.mojo > > openjpa-maven-plugin > > > > > > JPA Enhance > > process-classes > > > > enhance > > > > > > > > > > > > > > addDefaultConstructor > > false > > > > > > enforcePropertyRestrictions > > true > > > > > > > > > > > > maven-compiler-plugin > > > > 1.6 > > 1.6 > > iso-8859-1 > > > > > > > > maven-surefire-plugin > > 2.2 > > > > > > > > src/test/resources/testng.xml > > > > > > > > > > > > maven-jar-plugin > > > > > > > > true > > > > > > > > > > > > > > > > > > Ibiblio > > Ibiblio > > http://www.ibiblio.org/maven > > > > > > java.net > > > > https://maven-repository.dev.java.net/nonav/repository > > > > legacy > > > > > > java.net 2 > > http://download.java.net/maven/2 > > > > > > apache-snapshots2 > > > > http://people.apache.org/repo/m2-snapshot-repository/ > > > > > > > > > > org.testng > > testng > > 5.1 > > jdk15 > > test > > > > > > log4j > > log4j > > 1.2.13 > > > > > > dbunit > > dbunit > > 2.2 > > > > > > javax.persistence > > persistence-api > > 1.0 > > > > > > javax.ejb > > ejb-api > > 3.0 > > > > > > javax.transaction > > jta > > 1.0.1B > > > > > > org.apache.derby > > derby > > 10.2.2.0 > > > > > > org.apache.openjpa > > openjpa > > 1.0.0-SNAPSHOT > > > > > > > > > > > > -- > > --------------------------- > > Senior Systems Analyst > > Brazos County IT Department > > http://www.co.brazos.tx.us > > Ph No: 979-361-4688 > > > > > > > -- > Patrick Linskey > 202 669 5907 >