-->
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.  [ 1 post ] 
Author Message
 Post subject: Need help with ddl2hbm utility
PostPosted: Fri Jul 01, 2011 3:17 pm 
Newbie

Joined: Fri Jul 01, 2011 3:12 pm
Posts: 1
I wish to run ddl2hbm from command line.

I wish to generate hibernate mapping files hbm.xml from mysql tables.

I downloaded the
hibernate-tools-2.1.3.jar
and
jdom.jar from jdom-1.1.1.zip.

I got this application to work, accept my mysql credentials allowed me to select database and when I selected one of the tables and clicked on generate I get the following exception.

c:\hibernate-365\tools>java -cp %classpath% net.sf.hibernate.tool.ddl2hbm.Gui
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.jdom.input.DOMBuilder.<init>(Z)V
at net.sf.hibernate.tool.ddl2hbm.MapGenerator.<init>(MapGenerator.java:76)
at net.sf.hibernate.tool.ddl2hbm.Gui.cmdGenerateActionPerformed(Gui.java:669)
at net.sf.hibernate.tool.ddl2hbm.Gui.access$800(Gui.java:32)
at net.sf.hibernate.tool.ddl2hbm.Gui$10.actionPerformed(Gui.java:552)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6041)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

My classpath is

c:\hibernate-365\lib\required\slf4j-api-1.6.1.jar
c:\hibernate-365\lib\required\jta-1.1.jar
c:\hibernate-365\lib\required\dom4j-1.6.1.jar
c:\hibernate-365\tools\jdom.jar
c:\hibernate-365\tools\jdom-1.1.1\jdom\lib\xerces.jar
c:\hibernate-365\tools\jdom-1.1.1\jdom\lib\xalan.jar
c:\hibernate-365\tools\jdom-1.1.1\jdom\lib\xml-apis.jar
c:\hibernate-365\tools\jdom-1.1.1\jdom\lib\jaxen.jar
c:\hibernate-365\tools\jdom-1.1.1\jdom\lib\saxpath.jar
c:\hibernate-365\tools\hibernate-tools-2.1.3.jar
c:\hibernate-365\lib\required\commons-collections-3.1.jar
C:\spring\305\projects\spring-build\lib\ivy\commons-logging.jar
c:\Users\rkannan\apache-tomcat-7.0.11-windows-x64\apache-tomcat-7.0.11\lib\mysqljdbc.jar
c:\hibernate-365\hibernate3.jar


Then I dowloaded other versions of jdom and tried with no relief.

Then I downloaded the later version of hib-tools
hibernate-tools-3.0.0.alpha4a.jar and that appears to be completely different.

I would like to use hib-tools-2.1.3.jar ...
Can someone advise if this is even doable? If so how can I get the correct version of MapGenerator?

Thank you very much
dT


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.