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
|