Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75CC4E3B6 for ; Tue, 19 Feb 2013 16:28:31 +0000 (UTC) Received: (qmail 92503 invoked by uid 500); 19 Feb 2013 16:28:31 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 92424 invoked by uid 500); 19 Feb 2013 16:28:31 -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 92410 invoked by uid 99); 19 Feb 2013 16:28:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 16:28:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FRT_BELOW2 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of maxtorzito@gmail.com designates 209.85.215.44 as permitted sender) Received: from [209.85.215.44] (HELO mail-la0-f44.google.com) (209.85.215.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 16:28:23 +0000 Received: by mail-la0-f44.google.com with SMTP id eb20so6808969lab.17 for ; Tue, 19 Feb 2013 08:28:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=yxkno9UFfBDf8o9excXW7vX/lphC/0L4RpuA3K9O/Is=; b=ak+G4w10xu2+kbRxSQ8uUhE0Aw2Rom9JYT+pS7mOoEdd3buqUe3ighbw0br7EdF9ww QnEUMQfFvxGRwhyfomIeeXmFfXHlWMbaLP6fx0Bovw+exZit5xw43vgnEpLu28uqfWXT JE2FfYK5mxpyubA9jOAvvcRU6bld5+NC53BGkyet+CzhkUctwrGqYCdsrkV8yVt9FE+8 eJ0fHhxW/IDA7u+FgwQb60Fyhb7TFHpLTXG99yrt15Yulb9S7XrGCWDCboz3t47Ukxs9 g3MghM5EEey5N/LvEIR/VSM48dKbWZEFdvUBeQ0QGddXc4H6B9BisQTsrYdjmpsfdE6X 2ZTw== MIME-Version: 1.0 X-Received: by 10.152.123.194 with SMTP id mc2mr14901193lab.7.1361291282047; Tue, 19 Feb 2013 08:28:02 -0800 (PST) Received: by 10.112.97.10 with HTTP; Tue, 19 Feb 2013 08:28:01 -0800 (PST) In-Reply-To: References: Date: Tue, 19 Feb 2013 10:28:01 -0600 Message-ID: Subject: Re: openjpa, maven and persistence.xml. help me please From: =?ISO-8859-1?Q?Jos=E9_Luis_Cetina?= To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=f46d04426eda4d621404d61653d0 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04426eda4d621404d61653d0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here is my pom.xml maybe can help you org.bsc.maven maven-processor-plugin ${plugins.maven.processor.plugin} process process generate-sources org.apache.openjpa.persistence.meta.AnnotationProcessor6 true org.codehaus.mojo build-helper-maven-plugin ${plugins.build-helper-maven-plugin} add-source generate-sources add-source ${project.build.directory}/generated-sources/apt org.apache.openjpa openjpa-maven-plugin ${plugins.openjpa.maven.plugin} true true enhancer process-classes enhance org.apache.openjpa openjpa ${apache.openjpa.version} 2013/2/19 Kevin Sutter > definitely sounds like a maven pom.xml configuration issue... Something > isn't getting passed from the parent to the sub-modules that is required > for this compile/enhance step... Good luck. > > Kevin > > On Tue, Feb 19, 2013 at 3:49 AM, Aitor Iturriondobeitia < > laudio.info@gmail.com> wrote: > > > thanks > > i have more information about this. > > i think that is not jpa problem. My poersistencefile is into the > META-INF. > > I think tha is maven problem. > > when i intall (compile) my applicaion without the parent it runs ok but > > when i intall from the parent it does't run > > what do you think about this? do you occur anythig? > > thanks > > > > > > 2013/2/18 Kevin Sutter > > > > > Welcome to the OpenJPA project! Depending on your environment, getti= ng > > the > > > Enhancement processing to find your persistence.xml can be tricky > > > sometimes. I'm assuming you have looked at the available documentati= on > > for > > > getting this setup properly [1]. The key is probably in the error > > message > > > you received: > > > > > > "..Ensure that you have a > > > META-INF/persistence.xml file, that it is available in your classpath= , > or > > > that the properties file you are using for configuration is available= ." > > > > > > The contents of your persistence.xml looks fine, so the issue is > probably > > > with just finding your persistence.xml. You have to ensure that this > is > > > available via your classpath that is used for your enhancement > > processing. > > > With maven, it's sometimes useful to run with the -X option to see ho= w > > your > > > properties, environment variables, and classpaths are getting setup. > > > > > > Another idea that is simple is to use the javaagent approach for > getting > > > the enhancement processing done. This is especially useful for test > > > purposes, but can also be used for jse production usage. > > > > > > Sorry that we don't have a definitive answer for you. It looks like > some > > > experimentation and understanding of your specific environment will b= e > > > required to get the enhancement done. Good luck! Please post back > with > > > either success or continued issues. Thanks. > > > > > > This has nothing to do with your enhancement processing, but I would > > > suggest adding another property to your persistence.xml which will he= lp > > > with foreign key processing: > > > > > value=3D"buildSchema(ForeignKeys=3Dtrue)"/> > > > > > > Kevin > > > > > > > > > [1] http://openjpa.apache.org/entity-enhancement.html > > > > > > On Mon, Feb 18, 2013 at 10:37 AM, laudio.info > > > wrote: > > > > > > > Hello > > > > i am trying to make my fisrt openjpa project. > > > > i am using maven. > > > > i have create the persistence.xml file (bellow) but when i try to > > compile > > > > my projects appears one error: > > > > [INFO] [openjpa:test-enhance {execution: enhancer}] > > > > [INFO] > > > > > > -----------------------------------------------------------------------= - > > > > [ERROR] FATAL ERROR > > > > [INFO] > > > > > > -----------------------------------------------------------------------= - > > > > [INFO] MetaDataFactory could not be configured > > > > (conf.newMetaDataFactoryInstance() returned null). This might mean > that > > > no > > > > configuration properties were found. Ensure that you have a > > > > META-INF/persistence.xml file, that it is available in your > classpath, > > or > > > > that the properties file you are using for configuration is > available. > > If > > > > you are using Ant, please see the or > > > > attributes of the task's nested element. This can also occ= ur > > if > > > > your OpenJPA distribution jars are corrupt, or if your security > policy > > is > > > > overly strict. > > > > [INFO] > > > > > > -----------------------------------------------------------------------= - > > > > [INFO] Trace > > > > > > > > org.apache.openjpa.util.MetaDataException: MetaDataFactory could no= t > be > > > > configured (conf.newMetaDataFactoryInstance() returned null). This > > might > > > > mean that no configuration properties were found. Ensure that you > have > > a > > > > META-INF/persistence.xml file, that it is available in your > classpath, > > or > > > > that the properties file you are using for configuration is > available. > > If > > > > you are using Ant, please see the or > > > > attributes of the task's nested element. This can also occ= ur > > if > > > > your OpenJPA distribution jars are corrupt, or if your security > policy > > is > > > > overly strict. > > > > at > > > > > > > > > > > > > > org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(Meta= DataRepository.java:1904) > > > > at > > > > > > > > > > > > > > org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataRepos= itory.java:1885) > > > > at > > > > > > > > > > > > > > org.apache.openjpa.lib.conf.Configurations.configureInstance(Configuratio= ns.java:518) > > > > at > > > > > > > > > > > > > > org.apache.openjpa.lib.conf.Configurations.configureInstance(Configuratio= ns.java:443) > > > > > > > > My persistence.xml file is into the META-INF directory and has this= : > > > > > > > > > > version=3D"2.0"> > > > > > > > > > > > > > > > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > > > > com.caf.db.jpa.entities.Myrequest > > > > com.caf.db.jpa.entities.Myresponse > > > > > > > > > > value=3D"buildSchema" > > > > /> > > > > > > > value=3D"org.apache.derby.jdbc.EmbeddedDriver" /> > > > > > > > value=3D"jdbc:derby:C:\Curro\My\prototipoWorkspace\MyDB\MyDB" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > thanks > > > > > > > > > > --=20 ------------------------------------------------------------------- *SCJA. Jos=E9 Luis Cetina* ------------------------------------------------------------------- --f46d04426eda4d621404d61653d0--