-->
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.  [ 4 posts ] 
Author Message
 Post subject: Getting Maven, XDoclet, and Hibernate to play nice...
PostPosted: Mon Sep 06, 2004 10:49 pm 
Newbie

Joined: Mon Sep 06, 2004 10:38 pm
Posts: 8
Hibernate version: 2.1.6

Mapping documents: NA

Code between sessionFactory.openSession() and session.close(): NA

Full stack trace of any exception that occurs: NA

Name and version of the database you are using: PostgreSQL 7.4.2

Debug level Hibernate log excerpt: NA

I am attempting to create a small project using Maven to run XDoclet to run Hibernate. I am currently having the following trouble. I am using Maven 1.0.

When I run 'maven clean xdoclet:hibernatedoclet' the goal succeeds; however, only the first (alphabetically) of my .java files gets processed. I have three, and they are all in the same directory. I am using **/*.java, so all should be picked up.


When I run 'maven hibernate:schema-export', it fails with the following error. I have hibernate, maven hibernate plugin, and xdoclet hibernate module all specified as dependencies.
Element... h:schema-export
Line...... 46
Column.... 53
Dialect class not found: net.sf.hibernate.dialect.PostgreSQLDialect
Total time: 3 seconds
Finished at: Mon Sep 06 22:44:06 EDT 2004


I have searched these forums, the XDoclet site, as well as Google, and find no information. Any help would be greatly appreciates.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 10:57 am 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:57 am
Posts: 33
Location: Alpharetta, Georgia
What does your <classpath> declaration look like? It's missing one of the hibernate jars ... hibernate2.jar or whatever versioned jar you're using.

Oh yes, Maven.
<dependencies>
....
Quote:
<dependency>
Quote:
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>2.1.4</version>
<url>http://www.ibiblio.org/maven</url>
<type>jar</type>
<properties>
Quote:
<war.bundle>true</war.bundle>

</properties>
</dependency>

....
</dependencies>

<dependency>

If you're creating a web application of some kind and stuffing it all into a .war file you'll need to be sure to include that war.bundle property.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 11:27 am 
Newbie

Joined: Mon Sep 06, 2004 10:38 pm
Posts: 8
Thanks for the response; I do have hibernate 2.1.6 as a dependency, and when I run maven with a -X option, I can see that it is added to the classloader. So unfortunately, the solution is not that simple.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 2:22 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
schema-export starts Hibernate completely, so you need all the underlying jars, ie.


<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>full-2.0.2</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>odmg</groupId>
<artifactId>odmg</artifactId>
<version>3.0</version>
</dependency>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.