-->
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: hbm2hbmxml error: Velocity engine could not be initialized
PostPosted: Wed Jan 18, 2006 7:43 pm 
Newbie

Joined: Wed Jan 18, 2006 7:37 pm
Posts: 2
Hi,

I got the exception " org.hibernate.tool.hbm2x.ExporterException: Velocity engine could not be initialized" when using hbm2hbmxml. Any suggestion would be appreciated.

Hibernate: 3.1.1
Tools: 3.1.0 Beta 2

Ant Build File:

<project name="build.xml" default="build">
<property name="lib.path" value="WebContent/WEB-INF/lib" />
<property name="out.path" value="JavaSource/ca/cbc/formhander" />


<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
classpath="
${lib.path}/hibernate-tools.jar;
${lib.path}/velocity-1.4.jar;
${lib.path}/velocity-tools-generic-1.4.jar;
${lib.path}/jtidy-r8-21122004.jar;
${lib.path}/hibernate3.jar;
${lib.path}/ojdbc14.jar;
${lib.path}/commons-logging.jar;
${lib.path}/commons-collections.jar;
${lib.path}/dom4j-1.6.1.jar;
${lib.path}/cglib-2.1.3.jar;
${lib.path}/asm.jar"
/>

<target name="db2hbm">
<hibernatetool destdir="${out.path}">
<jdbcconfiguration
configurationfile="conf/hibernate.cfg.xml"
packagename="ca.cbc.formhandler"
revengfile="conf/hibernate.reveng.xml"
/>
<hbm2hbmxml/>
</hibernatetool>

</target>

<target name="build" />
</project>

Config File

<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.username">rss</property>
<property name="connection.password">rss</property>
<property name="connection.url">
jdbc:oracle:thin:@localhost:1521:poseidon
</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="dialect">
org.hibernate.dialect.OracleDialect
</property>
<property name="hibernate.cache.use_second_level_cache">
false
</property>
</session-factory>
</hibernate-configuration>

reveng File

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<table-filter match-name="BIN$.*" exclude="true" />
<table-filter match-schema="SYS" match-name=".*" exclude="true" />
<table-filter match-schema="WMSYS" match-name=".*" exclude="true" />
<table-filter match-schema="SYSTEM" match-name=".*" exclude="true" />
</hibernate-reverse-engineering>

Thanks,
Frank


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 8:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
run with ant -debug and show the stacktrace

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 19, 2006 12:07 pm 
Newbie

Joined: Wed Jan 18, 2006 7:37 pm
Posts: 2
Run with ant -debug

Caused by: java.lang.ClassNotFoundException: org.apache.velocity.tools.generic.log.CommonsLogLogSystem

It's a classpath problem.

Thanks a lot. :)


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.