RE: issue with Hibernate 3 plugin creating H2 plugin in wrong location
I tried this: jdbc:h2:file:/Users/mickknutson/svnworkspaces/baselogic/services/data-services/target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE And this did not work. I still get the database created at /Users/mickknutson/target/** not even /Users/mickknutson/taget/h2/** which is what is more confusing. mgainty wrote: use the absolute path of the module's local target dir so for example local target dir is C:/data/test then specify jdbc:h2:file:C:/data/test Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Thu, 20 Aug 2009 09:25:18 -0400 Subject: Re: issue with Hibernate 3 plugin creating H2 plugin in wrong location From: mickknut...@gmail.com To: users@maven.apache.org Next, here is my issue piece by piece to get past the grinch. I have the following hibernate 3 plugin: ... artifactIdhibernate3-maven-plugin/artifactId ... component namehbm2hbmxml/name outputDirectorytarget/classes/outputDirectory /component ... propertyfilesrc/test/resources/database.properties/propertyfile ... goals goalhbm2ddl/goal /goals ... Using this h2 URL: jdbc:h2:file:target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE I have also tried to pre-pend ${basedir}/ but I still get my h2 database created in: C:\Documents and Setting\[user id]\target\h2** How can I get this put into the module's local target dir? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Thu, Aug 20, 2009 at 9:22 AM, Mick Knutson mickknut...@gmail.com wrote: first off, why does my post keep getting rejected as SPAM? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- _ Hotmail® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009 -- View this message in context: http://www.nabble.com/issue-with-Hibernate-3-plugin-creating-H2-plugin-in-wrong-location-tp25061974p25738843.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
issue with Hibernate 3 plugin creating H2 plugin in wrong location
first off, why does my post keep getting rejected as SPAM? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com ---
Re: issue with Hibernate 3 plugin creating H2 plugin in wrong location
Next, here is my issue piece by piece to get past the grinch. I have the following hibernate 3 plugin: ... artifactIdhibernate3-maven-plugin/artifactId ... component namehbm2hbmxml/name outputDirectorytarget/classes/outputDirectory /component ... propertyfilesrc/test/resources/database.properties/propertyfile ... goals goalhbm2ddl/goal /goals ... Using this h2 URL: jdbc:h2:file:target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE I have also tried to pre-pend ${basedir}/ but I still get my h2 database created in: C:\Documents and Setting\[user id]\target\h2** How can I get this put into the module's local target dir? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Thu, Aug 20, 2009 at 9:22 AM, Mick Knutson mickknut...@gmail.com wrote: first off, why does my post keep getting rejected as SPAM? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com ---
RE: issue with Hibernate 3 plugin creating H2 plugin in wrong location
use the absolute path of the module's local target dir so for example local target dir is C:/data/test then specify jdbc:h2:file:C:/data/test Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Thu, 20 Aug 2009 09:25:18 -0400 Subject: Re: issue with Hibernate 3 plugin creating H2 plugin in wrong location From: mickknut...@gmail.com To: users@maven.apache.org Next, here is my issue piece by piece to get past the grinch. I have the following hibernate 3 plugin: ... artifactIdhibernate3-maven-plugin/artifactId ... component namehbm2hbmxml/name outputDirectorytarget/classes/outputDirectory /component ... propertyfilesrc/test/resources/database.properties/propertyfile ... goals goalhbm2ddl/goal /goals ... Using this h2 URL: jdbc:h2:file:target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE I have also tried to pre-pend ${basedir}/ but I still get my h2 database created in: C:\Documents and Setting\[user id]\target\h2** How can I get this put into the module's local target dir? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Thu, Aug 20, 2009 at 9:22 AM, Mick Knutson mickknut...@gmail.com wrote: first off, why does my post keep getting rejected as SPAM? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- _ Hotmail® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009
RE: Hibernate 3 Plugin
Hello Neil I think the problem is it doesn't find the persistence.xml because it isn't the standard META-INF/persistence.xml as per the hibernatools documentation: https://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html jpaconfiguration will simply just try and auto-configure itself based on the available classpath, e.g. look for META-INF/persistence.xml. Try moving your persistence.xml to the META-INF directory and try it again Regards Johann Reyes -Original Message- From: Neil Chaudhuri [mailto:nchaudh...@potomacfusion.com] Sent: Thursday, August 13, 2009 2:26 PM To: users@maven.apache.org Subject: Hibernate 3 Plugin I am using Maven with JPA/Hibernate, and I would like to generate a DDL file to give to my DBAs. I am using the Hibernate 3 Maven plugin to do this. However, I keep getting the error [ERROR] Persistence unit not found: 'myapp'. Here is the relevant portion of the POM: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration components component namehbm2ddl/name implementationjpaconfiguration/implementation /component /components componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile persistenceunitmyapp/persistenceunit outputfilenamemyapp.sql/outputfilename formattrue/format /componentProperties /configuration dependencies dependency groupIdcom.oracle.jdbc/groupId artifactIdojdbc6/artifactId version11.1.0.7.0/version /dependency /dependencies /plugin Here is the persistence.xml founf in src/main/resources as well as target/classes: persistence-unit name=myapp transaction-type=RESOURCE_LOCAL providerorg.hibernate.ejb.HibernatePersistence/provider jta-data-sourceMYAPP_DS/jta-data-source properties property name=hibernate.show_sql value=true/ property name=hibernate.format_sql value=true/ property name=hibernate.dialect value=org.hibernate.dialect.Oracle10gDialect/ property name=hibernate.cache.provider_class value=org.hibernate.cache.HashtableCacheProvider/ /properties /persistence-unit The files are where they are supposed to be, and surely the plugin knows to look in the target folder for everything. I would appreciate any insight into what the issue might be. Thanks. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Hibernate 3 Plugin
Hello Neil I think the problem is it doesn't find the persistence.xml because it isn't the standard META-INF/persistence.xml as per the hibernatools documentation: https://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html jpaconfiguration will simply just try and auto-configure itself based on the available classpath, e.g. look for META-INF/persistence.xml. Try moving your persistence.xml to the META-INF directory and try it again Regards Johann Reyes -Original Message- From: Neil Chaudhuri [mailto:nchaudh...@potomacfusion.com] Sent: Thursday, August 13, 2009 2:26 PM To: users@maven.apache.org Subject: Hibernate 3 Plugin I am using Maven with JPA/Hibernate, and I would like to generate a DDL file to give to my DBAs. I am using the Hibernate 3 Maven plugin to do this. However, I keep getting the error [ERROR] Persistence unit not found: 'myapp'. Here is the relevant portion of the POM: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration components component namehbm2ddl/name implementationjpaconfiguration/implementation /component /components componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile persistenceunitmyapp/persistenceunit outputfilenamemyapp.sql/outputfilename formattrue/format /componentProperties /configuration dependencies dependency groupIdcom.oracle.jdbc/groupId artifactIdojdbc6/artifactId version11.1.0.7.0/version /dependency /dependencies /plugin Here is the persistence.xml founf in src/main/resources as well as target/classes: persistence-unit name=myapp transaction-type=RESOURCE_LOCAL providerorg.hibernate.ejb.HibernatePersistence/provider jta-data-sourceMYAPP_DS/jta-data-source properties property name=hibernate.show_sql value=true/ property name=hibernate.format_sql value=true/ property name=hibernate.dialect value=org.hibernate.dialect.Oracle10gDialect/ property name=hibernate.cache.provider_class value=org.hibernate.cache.HashtableCacheProvider/ /properties /persistence-unit The files are where they are supposed to be, and surely the plugin knows to look in the target folder for everything. I would appreciate any insight into what the issue might be. Thanks. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Hibernate 3 Plugin
I am using Maven with JPA/Hibernate, and I would like to generate a DDL file to give to my DBAs. I am using the Hibernate 3 Maven plugin to do this. However, I keep getting the error [ERROR] Persistence unit not found: 'myapp'. Here is the relevant portion of the POM: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration components component namehbm2ddl/name implementationjpaconfiguration/implementation /component /components componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile persistenceunitmyapp/persistenceunit outputfilenamemyapp.sql/outputfilename formattrue/format /componentProperties /configuration dependencies dependency groupIdcom.oracle.jdbc/groupId artifactIdojdbc6/artifactId version11.1.0.7.0/version /dependency /dependencies /plugin Here is the persistence.xml founf in src/main/resources as well as target/classes: persistence-unit name=myapp transaction-type=RESOURCE_LOCAL providerorg.hibernate.ejb.HibernatePersistence/provider jta-data-sourceMYAPP_DS/jta-data-source properties property name=hibernate.show_sql value=true/ property name=hibernate.format_sql value=true/ property name=hibernate.dialect value=org.hibernate.dialect.Oracle10gDialect/ property name=hibernate.cache.provider_class value=org.hibernate.cache.HashtableCacheProvider/ /properties /persistence-unit The files are where they are supposed to be, and surely the plugin knows to look in the target folder for everything. I would appreciate any insight into what the issue might be. Thanks.
Re: Hibernate 3 Plugin
Hi, you haven't defined an execution for the PlugIN. executions execution idhbm2ddl/id phaseprocess-classes/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile In my opinion this should be changed... to the given persistence.xml file... Here is the persistence.xml founf in src/main/resources as well as target/classes: configurationfile${basedir}/src/main/resources/persistence.xml/configurationfile... Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Hibernate 3 Plugin
With Karl's suggestion, I changed my plugin definition as follows: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version executions execution idhbm2ddl/id phaseprocess-classes/phase goals goalhbm2ddl/goal /goals /execution /executions configuration components component namehbm2ddl/name implementationjpaconfiguration/implementation /component /components componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile${basedir}/src/main/resources/persistence.xml/configurationfile persistenceunitmyapp/persistenceunit outputfilenamemyapp.sql/outputfilename formattrue/format /componentProperties /configuration dependencies dependency groupIdcom.oracle.jdbc/groupId artifactIdojdbc6/artifactId version11.1.0.7.0/version /dependency /dependencies /plugin Unfortunately, I am still getting the same error. I am wondering if this has to do with the fact I have a multi-module project. This persistence pom produces a jar packaging and is dependent on no other modules, but it does have a parent pom that simply lists the modules and defines dependencies in common among modules like Spring. Should my plugin definition be at the parent level? Thanks. -Original Message- From: Karl Heinz Marbaise [mailto:khmarba...@gmx.de] Sent: Thu 8/13/2009 4:09 PM To: Maven Users List Subject: Re: Hibernate 3 Plugin Hi, you haven't defined an execution for the PlugIN. executions execution idhbm2ddl/id phaseprocess-classes/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile In my opinion this should be changed... to the given persistence.xml file... Here is the persistence.xml founf in src/main/resources as well as target/classes: configurationfile${basedir}/src/main/resources/persistence.xml/configurationfile... Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Hibernate 3 Plugin
Also, in case you are trying to run unit tests against this: http://www.baselogic.com/blog/uncategorized/persistenceexception-issue-with-cobertura-and-the-hibernate3-maven-plugin --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Thu, Aug 13, 2009 at 2:53 PM, Neil Chaudhuri nchaudh...@potomacfusion.com wrote: With Karl's suggestion, I changed my plugin definition as follows: plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version executions execution idhbm2ddl/id phaseprocess-classes/phase goals goalhbm2ddl/goal /goals /execution /executions configuration components component namehbm2ddl/name implementationjpaconfiguration/implementation /component /components componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile${basedir}/src/main/resources/persistence.xml/configurationfile persistenceunitmyapp/persistenceunit outputfilenamemyapp.sql/outputfilename formattrue/format /componentProperties /configuration dependencies dependency groupIdcom.oracle.jdbc/groupId artifactIdojdbc6/artifactId version11.1.0.7.0/version /dependency /dependencies /plugin Unfortunately, I am still getting the same error. I am wondering if this has to do with the fact I have a multi-module project. This persistence pom produces a jar packaging and is dependent on no other modules, but it does have a parent pom that simply lists the modules and defines dependencies in common among modules like Spring. Should my plugin definition be at the parent level? Thanks. -Original Message- From: Karl Heinz Marbaise [mailto:khmarba...@gmx.de] Sent: Thu 8/13/2009 4:09 PM To: Maven Users List Subject: Re: Hibernate 3 Plugin Hi, you haven't defined an execution for the PlugIN. executions execution idhbm2ddl/id phaseprocess-classes/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties createtrue/create dropfalse/drop exportfalse/export configurationfile/target/classes/persistence.xml/configurationfile In my opinion this should be changed... to the given persistence.xml file... Here is the persistence.xml founf in src/main/resources as well as target/classes: configurationfile${basedir}/src/main/resources/persistence.xml/configurationfile... Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org