So.. i believe i deadlock when i try to reverse the database. It will simply halt after running ~10 minutes, and always on the same view.
Heres a thread dump of that particular situation.
---------------------------------------------------------------------------
Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
"Low Memory Detector" daemon prio=6 tid=0x02bfc400 nid=0x9bc runnable [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x02bf7800 nid=0xa4 waiting on condition [0x00000000..0x02eaf918]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x02bf6400 nid=0x258 runnable [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x02bf5400 nid=0x8c4 waiting on condition [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x02bf1000 nid=0xfe4 in Object.wait() [0x02dbf000..0x02dbfc14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0f897708> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x0f897708> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x02becc00 nid=0x47c in Object.wait() [0x02d6f000..0x02d6fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0f897798> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x0f897798> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x002e5c00 nid=0x190 runnable [0x0091e000..0x0091fe54]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.DataPacket.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:971)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:941)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:432)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:915)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
- locked <0x0de67aa8> (a oracle.jdbc.driver.T4CPreparedStatement)
- locked <0x0f90dbd8> (a oracle.jdbc.driver.T4CConnection)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getExportedKeysResultSet(OracleMetaDataDialect.java:577)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getExportedKeys(OracleMetaDataDialect.java:405)
at org.hibernate.cfg.reveng.JDBCReader.processForeignKeys(JDBCReader.java:185)
at org.hibernate.cfg.reveng.JDBCReader.resolveForeignKeys(JDBCReader.java:119)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:93)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:115)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:42)
at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:81)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
"VM Thread" prio=10 tid=0x02be3800 nid=0x918 runnable
"VM Periodic Task Thread" prio=10 tid=0x02bfdc00 nid=0x98c waiting on condition
JNI global references: 1044
Heap
def new generation total 5376K, used 1780K [0x0d9b0000, 0x0df80000, 0x0f870000)
eden space 4800K, 25% used [0x0d9b0000, 0x0dadd028, 0x0de60000)
from space 576K, 100% used [0x0de60000, 0x0def0000, 0x0def0000)
to space 576K, 0% used [0x0def0000, 0x0def0000, 0x0df80000)
tenured generation total 71248K, used 53881K [0x0f870000, 0x13e04000, 0x269b0000)
the space 71248K, 75% used [0x0f870000, 0x12d0e420, 0x12d0e600, 0x13e04000)
compacting perm gen total 12288K, used 6036K [0x269b0000, 0x275b0000, 0x2a9b0000)
the space 12288K, 49% used [0x269b0000, 0x26f95058, 0x26f95200, 0x275b0000)
ro space 8192K, 66% used [0x2a9b0000, 0x2aef9920, 0x2aef9a00, 0x2b1b0000)
rw space 12288K, 52% used [0x2b1b0000, 0x2b7f6130, 0x2b7f6200, 0x2bdb0000)
---------------------------------------------------------------------------
I've given ANT -Xmx400M -Xms128M, it didnt make a difference.
Heres my buid.xml
---------------------------------------------------------------------------
<project basedir="." default="init" name="Test">
<property name="build.dir" value="."/>
<path id="toolslib">
<path location="hibernate-tools.jar" />
<path location="hibernate3.jar" />
<path location="freemarker.jar" />
<path location="mysql.jar" />
<path location="javassist.jar" />
<path location="commons-logging-1.0.4.jar"/>
<path location="hibernate-annotations.jar"/>
<path location="dom4j-1.6.1.jar"/>
<path location="hibernate-commons-annotations.jar"/>
<path location="ejb3-persistence.jar"/>
<path location="commons-collections-2.1.1.jar"/>
<path location="jtidy-r8-20060801.jar"/>
<path location="oracle-jdbc-10.1.0.2.0.jar"/>
</path>
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />
<target name="init">
<hibernatetool destdir="${build.dir}">
<jdbcconfiguration propertyfile="hibernate.properties" />
<hbm2java jdk5="true" ejb3="true"/>
</hibernatetool>
</target>
</project>
---------------------------------------------------------------------------
And my hibernate.properties
---------------------------------------------------------------------------
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@xxx:1521:xxx
hibernate.connection.username = xxx
hibernate.connection.password = xxx
#hibernate.currentSchema.jdbcSQL = xxx
#hibernate.default_schema = xxx
hibernate.connection.autocommit = false
hibernate.show_sql = false
---------------------------------------------------------------------------
Hope someone knows what the hell is going on :-)
/cytg.
|