Upgrade to Hibernate 3.6 errors with reverse engineering
===

I have found a few threads on various sites that seem to touch on this problem, but I am having no luck. It seems as though it simply can not be done. I get the 
`Caused by: java.lang.IncompatibleClassChangeError: Found interface org.hibernate.cfg.Mappings, but class was expected` error. Looking at the [compatability matrix ][1] that is [Shown in this thread.][2] it seems that I can't use reveng unless I downgrade. But this can not seem right. 

When I started upgrading everything worked, and now I am getting that same error. I made sure not to have two different jars with the same name on my class path. I have the following jars:

    commons-logging-1.0.4.jar
    dom4j-1.6.1.jar
    hibernate3.jar
    hibernate-tools.jar    
    slf4j-api-1.6.6.jar
    slf4j-log4j12-1.6.6.jar
    sqljdbc4.jar
    other various jars not dealing with hibernate..

Here is the full stack trace:

        ...   
        hibernatetool
        Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
        1. task: hbm2hbmxml (Generates a set of hbm.xml files)     java.lang.IncompatibleClassChangeError: Found interface org.hibernate.cfg.Mappings, but class was expected
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:390)
    	at org.apache.tools.ant.Target.performTasks(Target.java:411)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    	at org.apache.tools.ant.Main.runBuild(Main.java:809)
    	at org.apache.tools.ant.Main.startAnt(Main.java:217)
    	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:601)
    	at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:29)
    Caused by: java.lang.IncompatibleClassChangeError: Found interface org.hibernate.cfg.Mappings, but class was expected
    	at org.hibernate.cfg.reveng.MappingsDatabaseCollector.getTable(MappingsDatabaseCollector.java:25)
    	at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:535)
    	at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
    	at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860)
    	at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:121)
    	at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:94)
    	... 

ant:

    <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="classpath" />
    ...
     <hibernatetool>
        <jdbcconfiguration configurationfile="${conf.dir}/${dbName}_hibernate-template.cfg.xml" packagename="myPackageName" revengfile="${conf.dir}/hibernate.reveng.xml" reversestrategy="com.capitaliq.loader.dev.codegen.HibernateReverseStrategy" detectmanytomany="false" />
		<hbm2hbmxml destdir="${srcGen.dir}" />
		<!-- Generate new hibernate.cfg.xml including new POJOs-->
		<!--'destdir' is relative to 'packagename' configuration-->
		<hbm2cfgxml ejb3="false" destdir="${conf.dir}" />
	</hibernatetool>

	<!-- Generate java POJOs from mapping files-->
	<hibernatetool> <!--Line 384-->
		<configuration configurationfile="${conf.dir}/${dbName}_hibernate-template.cfg.xml">
			<fileset dir="${orm.pkg.dir}">
				<include name="**/*.hbm.xml" />
			</fileset>
		</configuration>
		<!--'destdir' is relative to 'packagename' configuration-->
		<hbm2java jdk5="true" ejb3="false" destdir="${srcGen.dir}" />
	</hibernatetool>

Any help would be great; this computer is about to get thrown. Thanks guys.


  [1]: https://community.jboss.org/wiki/HibernateCompatibilityMatrix
  [2]: https://forum.hibernate.org/viewtopic.php?f=6&t=1004766