Hibernate version: 3.1.2
Hibernate Tools version: 3.1 beta 4
Name and version of the database you are using: Informix
I have created the following ant script to reverse engineer some of the tables in an Informix database:
Code:
project name="java" default="reverse" basedir=".">
<target name="init">
<property name="lib.dir" location="${basedir}/lib" />
<property name="cfg.dir" location="${basedir}/cfg" />
<property name="hibernate.config.file" location="${cfg.dir}/hibernate.cfg.xml" />
<property name="hibernate.reveng.config.file" location="${cfg.dir}/hibernate.reveng.xml" />
<property name="output.dir" location="${basedir}/output" />
<path id="hibernate-classpath">
<fileset dir="/opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate">
<include name="*.jar" />
</fileset>
<fileset dir="/opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/informix">
<include name="*.jar" />
</fileset>
</path>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath>
<path refid="hibernate-classpath"/>
</classpath>
</taskdef>
</target>
<target name="reverse" depends="init">
<hibernatetool destdir="${output.dir}">
<jdbcconfiguration
configurationfile="${hibernate.config.file}"
revengfile="${hibernate.reveng.config.file}"
reversestrategy="org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy"/>
</hibernatetool>
</target>
</project>
When I run it using -debug for ant, I get the following output:
Apache Ant version 1.6.0 compiled on December 18 2003
Apache Ant version 1.6.0 compiled on December 18 2003
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: /opt/java/j2sdk1.4.2_09/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.0 compiled on December 18 2003
Setting ro project property: ant.file -> /home/jmelendez/sandbox/HibernateReverseGen/build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/jmelendez/sandbox/HibernateReverseGen/build.xml with URI = file:///home/jmelendez/sandbox/HibernateReverseGen/build.xml
Setting ro project property: ant.project.name -> java
Adding reference: java
Setting ro project property: ant.file.java -> /home/jmelendez/sandbox/HibernateReverseGen/build.xml
Project base dir set to: /home/jmelendez/sandbox/HibernateReverseGen
+Target:
+Target: init
Adding reference: hibernate-classpath
+Target: reverse
Build sequence for target `reverse' is [init, reverse]
Complete build sequence is [init, reverse, ]
init:
Setting project property: lib.dir -> /home/jmelendez/sandbox/HibernateReverseGen/lib
Setting project property: cfg.dir -> /home/jmelendez/sandbox/HibernateReverseGen/cfg
Setting project property: hibernate.config.file -> /home/jmelendez/sandbox/HibernateReverseGen/cfg/hibernate.cfg.xml
Setting project property: hibernate.reveng.config.file -> /home/jmelendez/sandbox/HibernateReverseGen/cfg/hibernate.reveng.xml
Setting project property: output.dir -> /home/jmelendez/sandbox/HibernateReverseGen/output
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (org/apache/commons/net/SocketClient) for type rexec
Adding reference: hibernate-classpath
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (org/apache/commons/net/SocketClient) for type rexec
Could not load a dependent class (com/starbase/starteam/Item) for type stlist
Could not load a dependent class (org/apache/commons/net/SocketClient) for type telnet
Could not load a dependent class (org/apache/commons/net/ftp/FTP) for type ftp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (com/starbase/starteam/Item) for type stcheckin
Could not load a dependent class (com/starbase/starteam/Item) for type stcheckout
fileset: Setup scanner in dir /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate with patternSet{ includes: [*.jar] excludes: [] }
fileset: Setup scanner in dir /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools with patternSet{ includes: [*.jar] excludes: [] }
fileset: Setup scanner in dir /home/jmelendez/sandbox/HibernateReverseGen/lib/informix with patternSet{ includes: [*.jar] excludes: [] }
Finding class org.hibernate.tool.ant.HibernateToolTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/HibernateToolTask.class
Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
Class org.hibernate.tool.ant.HibernateToolTask loaded from ant loader (parentFirst)
Class java.lang.Object loaded from parent loader (parentFirst)
Class java.util.Map loaded from parent loader (parentFirst)
Finding class org.hibernate.tool.ant.ExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/ExporterTask.class
Class org.hibernate.tool.ant.ExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DAOExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2DAOExporterTask.class
Finding class org.hibernate.tool.ant.Hbm2JavaExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2JavaExporterTask.class
Class org.hibernate.tool.ant.Hbm2JavaExporterTask loaded from ant loader (parentFirst)
Class org.hibernate.tool.ant.Hbm2DAOExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DocExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2DocExporterTask.class
Class org.hibernate.tool.ant.Hbm2DocExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2HbmXmlExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2HbmXmlExporterTask.class
Class org.hibernate.tool.ant.Hbm2HbmXmlExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2CfgXmlExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2CfgXmlExporterTask.class
Class org.hibernate.tool.ant.Hbm2CfgXmlExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.GenericExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/GenericExporterTask.class
Class org.hibernate.tool.ant.GenericExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.Hbm2DDLExporterTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/Hbm2DDLExporterTask.class
Class org.hibernate.tool.ant.Hbm2DDLExporterTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.ConfigurationTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/ConfigurationTask.class
Class org.hibernate.tool.ant.ConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.AnnotationConfigurationTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/AnnotationConfigurationTask.class
Class org.hibernate.tool.ant.AnnotationConfigurationTask loaded from ant loader (parentFirst)
Finding class org.hibernate.tool.ant.JDBCConfigurationTask
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/tool/ant/JDBCConfigurationTask.class
Class org.hibernate.tool.ant.JDBCConfigurationTask loaded from ant loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
reverse:
Class java.util.ArrayList loaded from parent loader (parentFirst)
Class java.util.Properties loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
Class java.io.File loaded from parent loader (parentFirst)
Finding class org.hibernate.cfg.Configuration
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate/hibernate3.jar org/hibernate/cfg/Configuration.class
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.hibernate.cfg.Configuration loaded from ant loader (parentFirst)
Class org.apache.tools.ant.types.PropertySet loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.Environment$Variable loaded from parent loader (parentFirst)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class java.io.FileNotFoundException loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Finding class org.hibernate.HibernateException
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate/hibernate3.jar org/hibernate/HibernateException.class
Finding class org.hibernate.exception.NestableRuntimeException
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate/hibernate3.jar org/hibernate/exception/NestableRuntimeException.class
Class java.lang.RuntimeException loaded from parent loader (parentFirst)
Finding class org.hibernate.exception.Nestable
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/hibernate/hibernate3.jar org/hibernate/exception/Nestable.class
Class org.hibernate.exception.Nestable loaded from ant loader (parentFirst)
Class org.hibernate.exception.NestableRuntimeException loaded from ant loader (parentFirst)
Class org.hibernate.HibernateException loaded from ant loader (parentFirst)
Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
Finding class org.hibernate.cfg.JDBCMetaDataConfiguration
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/cfg/JDBCMetaDataConfiguration.class
Class org.hibernate.cfg.JDBCMetaDataConfiguration loaded from ant loader (parentFirst)
Finding class org.hibernate.cfg.reveng.ReverseEngineeringStrategy
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/cfg/reveng/ReverseEngineeringStrategy.class
Class org.hibernate.cfg.reveng.ReverseEngineeringStrategy loaded from ant loader (parentFirst)
Finding class org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy
Loaded from /opt/hibernate/tools/plugins/org.hibernate.eclipse_3.1.0.beta4/lib/tools/hibernate-tools.jar org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.class
Class org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy loaded from ant loader (parentFirst)
Class java.lang.ClassNotFoundException loaded from parent loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
Class org.apache.tools.ant.types.FileSet loaded from parent loader (parentFirst)
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
Class java.util.Iterator loaded from parent loader (parentFirst)
Class org.apache.tools.ant.Project loaded from parent loader (parentFirst)
Class java.lang.Class loaded from parent loader (parentFirst)
Class org.apache.tools.ant.AntClassLoader loaded from parent loader (parentFirst)
BUILD SUCCESSFUL
Total time: 2 seconds
Note, that I get a BUILD SUCCESSFUL. But, there is no output from the reverse engineering. Also, note that with the debug output, there are some Exception classes that get loaded. I have messed with this thing for awhile and have not a clue what is going on. I have assured that the config files all exist and messed around with the classpath.
Any help is greatly appreciated. I do hope this is just a stupid error on my part.
Thanks,
Jesse