-->
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.  [ 3 posts ] 
Author Message
 Post subject: Exception when using hbm2java with ant
PostPosted: Tue Nov 22, 2005 12:57 am 
Newbie

Joined: Tue Nov 22, 2005 12:48 am
Posts: 8
Hi,

Below is the build file I used.

---------------------------------------------------------------------------
<?xml version="1.0"?>

<project name="Project-db-hibernate-tools" basedir=".">

<property name="hibernate.tools.home" value="D:/Testing/eclipse/plugins/org.hibernate.eclipse_3.1.0.beta1/lib"/>
<path id="hibernate.class.path">
<pathelement location="${hibernate.tools.home}/tools/velocity-1.4.jar"/>
<pathelement location="${hibernate.tools.home}/tools/hibernate-tools.jar"/>
<pathelement location="${hibernate.tools.home}/tools/velocity-tools-generic-1.4.jar"/>
<pathelement location="${hibernate.tools.home}/tools/jtidy-r8-21122004.jar"/>
<fileset dir="${hibernate.tools.home}/hibernate">
<include name="*.jar"/>
</fileset>
<fileset dir="D:/Testing/tomcat-5.0.28/common/lib">
<include name="*.jar"/>
</fileset>

</path>

<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="hibernate.class.path"/>


<hibernatetool destdir="D:/Testing/eclipse-ws/Project-db/temp">
<classpath> <!-- a classpath is optional, but needed for exporters that require access to domain classes etc. -->
<path location="D:/Testing/eclipse-ws/Project-db/build/bin/"/>
</classpath>
<configuration configurationfile="D:/Testing/eclipse-ws/Project-db/src/hibernate.cfg.xml" >
<fileset dir="D:/Testing/eclipse-ws/Project-db/src"> <!-- A configuration can take a configurationfile and/or a fileset of hbm.xml's -->
<include name="**/*.xml"/>
</fileset>
</configuration>

<hbm2java/>
</hibernatetool>
</project>



The following exception is thrown after the executing the build file. What's the problem? Thanks a lot.

-------------------------------------------------------------------------
Buildfile: D:\Testing\eclipse-ws\Project-db\ant\build-2.xml
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)

BUILD FAILED
D:\Testing\eclipse-ws\Project-db\ant\build-2.xml:26: org.hibernate.tool.hbm2x.ExporterException: Velocity engine could not be initialized

Total time: 2 seconds


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 2:14 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
try putting velocity-tools-generic-1.1.jar in the classpath ... should come w/ the tools distribution. if this doesn't work, post the output after running ant w/ -debug .


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 3:23 am 
Newbie

Joined: Tue Nov 22, 2005 12:48 am
Posts: 8
Thank you very much for the prompt reply.
I made a typo "velocity-tools-generic-1.1.jar" to "velocity-tools-generic-1.4.jar".


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