-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Class Not Found using Maven and hibernate3:hbm2ddl
PostPosted: Tue Aug 14, 2007 2:53 am 
Newbie

Joined: Tue Dec 19, 2006 7:23 pm
Posts: 4
I recently added c3p0 and now when I use Maven to generate the schema I am getting class not found.

It works fine if I remove the c3p0 config form hibernate.cfg.xml

when I run
mvn hibernate3:hbm2ddl

i get

java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/PoolConfig

Must be a classpath issue, but I have c3p0 as a dependency in the pom.xml.

When I run the app itself all seems fine.

Is there a way to tell the hibernate3-maven-plugin about a classpath, or a dependency?

Here is my plugin config

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>postgresql</implementation>
</component>
<component>
<name>hbm2hbmxml</name>
<outputDirectory>src/main/resources</outputDirectory>
</component>
</components>
<componentProperties>
<drop>true</drop>
<jdk5>true</jdk5>
<implementation>annotationconfiguration</implementation>
<configurationfile>/src/main/resources/hibernate.cfg.xml</configurationfile>
<outputfilename>schema.sql</outputfilename>
</componentProperties>
</configuration>
</plugin>
</plugins>

Here is my dependency, I have the c3p0 version in a top level pom.
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
</dependency>

Thanks in advance
BobBobBob


Top
 Profile  
 
 Post subject: Try adding C3P0 to Build Extensions
PostPosted: Tue Mar 18, 2008 7:03 pm 
Newbie

Joined: Tue Mar 18, 2008 7:01 pm
Posts: 1
Add the following tags:


<build>
...
...

<extension>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</extension>

...
...

</build>


Make sure that your GroupID, Artificat ID and Version matches to what you have added in the Dependency tags.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.