Home » Archived » IAM (Eclipse Integration for Apache Maven) » Maven, Hibernate & Derby
Maven, Hibernate & Derby [message #17457] |
Tue, 17 March 2009 17:47  |
Eclipse User |
|
|
|
Originally posted by: jon.hanson.geemayl.com
Hi,
I'm attempting to use the IAM plugin to invoke a Maven project which runs
the Mojo Hibernate plugin to create some Derby DB tables from some
annotated Java POM classes.
My pom.xml works if i invoke Maven from the command line, e.g. mvn
package, however from within Eclipse i get the following error:
17/03/09 21:28:26 GMT: [INFO] [hibernate3:hbm2ddl]
17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
17/03/09 21:28:27 GMT: [INFO] No hibernate properties file loaded.
17/03/09 21:28:27 GMT: [WARN] 1 errors occurred while performing <hbm2ddl>.
17/03/09 21:28:27 GMT: [ERROR] Error #1: java.sql.SQLException: No
suitable driver found for jdbc:derby://localhost:1527/testdb;create=true
I'm guessing this is because the derbyclient.jar, which contains the Derby
JDBC driver, isn't being found. However, my pom.xml file has this:
<build>
<extensions>
<extension>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.4.2.0</version>
</extension>
which I believe is supposed to address this (when running from the command
line at least). Indeed, if i remove it then i get the same error when
building from the command line.
Any idea how i might fix this? I guess adding the derbyclient.jar to the
classpath used by Eclipse might fix this however that seems a bit drastic.
thanks,
Jon
|
|
| |
Re: Maven, Hibernate & Derby [message #17466 is a reply to message #17457] |
Fri, 20 March 2009 04:56   |
Eclipse User |
|
|
|
Hello Jon,
IAM runs maven in the same process as Eclipse, so classloading issues
might show up.
You can try adding derby as a dependency of your hibernate plug-in
(instead of as a build extension), but I'm not sure.
If you can provide a test case in bugzilla, that would be great.
Yours,
Abel Muiño
jon hanson wrote:
> Hi,
> I'm attempting to use the IAM plugin to invoke a Maven project which runs
> the Mojo Hibernate plugin to create some Derby DB tables from some
> annotated Java POM classes.
> My pom.xml works if i invoke Maven from the command line, e.g. mvn
> package, however from within Eclipse i get the following error:
> 17/03/09 21:28:26 GMT: [INFO] [hibernate3:hbm2ddl]
> 17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
> file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
> 17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
> file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
> 17/03/09 21:28:27 GMT: [INFO] No hibernate properties file loaded.
> 17/03/09 21:28:27 GMT: [WARN] 1 errors occurred while performing <hbm2ddl>.
> 17/03/09 21:28:27 GMT: [ERROR] Error #1: java.sql.SQLException: No
> suitable driver found for jdbc:derby://localhost:1527/testdb;create=true
> I'm guessing this is because the derbyclient.jar, which contains the Derby
> JDBC driver, isn't being found. However, my pom.xml file has this:
> <build>
> <extensions>
> <extension>
> <groupId>org.apache.derby</groupId>
> <artifactId>derbyclient</artifactId>
> <version>10.4.2.0</version>
> </extension>
> which I believe is supposed to address this (when running from the command
> line at least). Indeed, if i remove it then i get the same error when
> building from the command line.
> Any idea how i might fix this? I guess adding the derbyclient.jar to the
> classpath used by Eclipse might fix this however that seems a bit drastic.
> thanks,
> Jon
|
|
| |
Re: Maven, Hibernate & Derby [message #17476 is a reply to message #17471] |
Mon, 23 March 2009 06:09  |
Eclipse User |
|
|
|
Hi Jon,
IAM uses a preview of the next major Maven release, that is not yet
finished and has bugs, and that explains why you get different results
in the command line.
For more info
http://code.google.com/p/q4e/wiki/ReportingBugs
http://code.google.com/p/q4e/wiki/FAQ
Thanks
On 3/21/09 12:43 AM, jon hanson wrote:
> Hi Abel,
>
> Actually, adding Derby as a dependency of the Hibernate plugin appears
> to have fixed the problem.
>
> Just in case anyone else hits the same problem, here is the XML:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>hibernate3-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <id>generate-ddl</id>
> <phase>process-classes</phase>
> <goals>
> <goal>hbm2ddl</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
>
> <implementation>annotationconfiguration</implementation>
> </component>
> </components>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.derby</groupId>
> <artifactId>derbyclient</artifactId>
> <version>10.4.2.0</version>
> </dependency>
> </dependencies>
> </plugin>
>
> Thanks for your help,
>
> Jon
>
|
|
| |
Re: Maven, Hibernate & Derby [message #568601 is a reply to message #17457] |
Fri, 20 March 2009 04:56  |
Eclipse User |
|
|
|
Hello Jon,
IAM runs maven in the same process as Eclipse, so classloading issues
might show up.
You can try adding derby as a dependency of your hibernate plug-in
(instead of as a build extension), but I'm not sure.
If you can provide a test case in bugzilla, that would be great.
Yours,
Abel Muiño
jon hanson wrote:
> Hi,
> I'm attempting to use the IAM plugin to invoke a Maven project which runs
> the Mojo Hibernate plugin to create some Derby DB tables from some
> annotated Java POM classes.
> My pom.xml works if i invoke Maven from the command line, e.g. mvn
> package, however from within Eclipse i get the following error:
> 17/03/09 21:28:26 GMT: [INFO] [hibernate3:hbm2ddl]
> 17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
> file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
> 17/03/09 21:28:26 GMT: [INFO] Configuration XML file loaded:
> file:/G:/dev/workspace/testdb/src/main/resources/hibernate.c fg.xml
> 17/03/09 21:28:27 GMT: [INFO] No hibernate properties file loaded.
> 17/03/09 21:28:27 GMT: [WARN] 1 errors occurred while performing <hbm2ddl>.
> 17/03/09 21:28:27 GMT: [ERROR] Error #1: java.sql.SQLException: No
> suitable driver found for jdbc:derby://localhost:1527/testdb;create=true
> I'm guessing this is because the derbyclient.jar, which contains the Derby
> JDBC driver, isn't being found. However, my pom.xml file has this:
> <build>
> <extensions>
> <extension>
> <groupId>org.apache.derby</groupId>
> <artifactId>derbyclient</artifactId>
> <version>10.4.2.0</version>
> </extension>
> which I believe is supposed to address this (when running from the command
> line at least). Indeed, if i remove it then i get the same error when
> building from the command line.
> Any idea how i might fix this? I guess adding the derbyclient.jar to the
> classpath used by Eclipse might fix this however that seems a bit drastic.
> thanks,
> Jon
|
|
|
Re: Maven, Hibernate & Derby [message #568622 is a reply to message #17466] |
Fri, 20 March 2009 19:43  |
Eclipse User |
|
|
|
Hi Abel,
Actually, adding Derby as a dependency of the Hibernate plugin appears to
have fixed the problem.
Just in case anyone else hits the same problem, here is the XML:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>generate-ddl</id>
<phase>process-classes</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>annotationconfiguration</implementation>
</component>
</components>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.4.2.0</version>
</dependency>
</dependencies>
</plugin>
Thanks for your help,
Jon
|
|
|
Re: Maven, Hibernate & Derby [message #568637 is a reply to message #17471] |
Mon, 23 March 2009 06:09  |
Eclipse User |
|
|
|
Hi Jon,
IAM uses a preview of the next major Maven release, that is not yet
finished and has bugs, and that explains why you get different results
in the command line.
For more info
http://code.google.com/p/q4e/wiki/ReportingBugs
http://code.google.com/p/q4e/wiki/FAQ
Thanks
On 3/21/09 12:43 AM, jon hanson wrote:
> Hi Abel,
>
> Actually, adding Derby as a dependency of the Hibernate plugin appears
> to have fixed the problem.
>
> Just in case anyone else hits the same problem, here is the XML:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>hibernate3-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <id>generate-ddl</id>
> <phase>process-classes</phase>
> <goals>
> <goal>hbm2ddl</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
>
> <implementation>annotationconfiguration</implementation>
> </component>
> </components>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.derby</groupId>
> <artifactId>derbyclient</artifactId>
> <version>10.4.2.0</version>
> </dependency>
> </dependencies>
> </plugin>
>
> Thanks for your help,
>
> Jon
>
|
|
|
Goto Forum:
Current Time: Wed May 28 22:56:49 EDT 2025
Powered by FUDForum. Page generated in 0.04889 seconds
|