[hibernate-dev] Invoking hbm2java without using Ant

Lakshmana Pamarthy pamarthy at yahoo.com
Wed May 14 03:49:08 EDT 2008


Here you go:

I have all the required jars added to the project. Those include
commons-logging-1.0.4jar, hibernate2.jar, hibernate-tools.jar,
hibernate-annotations.jar, dom4j-1.6.1.jar etc...

org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed.
	at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
Caused: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed.)
	at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
	at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
Caused: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed.) (Caused by
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy.  You have more than one version of 'org.apache.commons.logging.Log'
visible, which is not allowed.))
	at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
	at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
	at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
	at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
Caused: java.lang.ExceptionInInitializerError
	at
org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.buildFiles(HibernateRevengWizard.java:250)
	at
org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.instantiate(HibernateRevengWizard.java:237)
	at
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1025)
	at
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595)
	at
org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416)
	at
org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248)
	at
org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:161)
	at
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1387)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341)
	at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119)
	at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908)
	at org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:1957)
	at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1316)
	at org.openide.WizardDescriptor.access$1200(WizardDescriptor.java:119)
	at
org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1964)
Caused: java.lang.reflect.InvocationTargetException
	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:585)
	at
org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:449)
Caused: java.lang.reflect.UndeclaredThrowableException
	at $Proxy22.actionPerformed(Unknown Source)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
	at java.awt.Dialog$1.run(Dialog.java:535)
	at java.awt.Dialog$2.run(Dialog.java:563)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:561)
	at
org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:835)
	at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:869)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:857)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:108)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
	at org.openide.util.Mutex.readAccess(Mutex.java:268)
	at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:842)
	at java.awt.Component.show(Component.java:1302)
	at java.awt.Component.setVisible(Component.java:1255)
	at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:502)
	at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:369)
	at org.netbeans.modules.project.ui.actions.NewFile.doPerform(NewFile.java:153)
	at org.netbeans.modules.project.ui.actions.NewFile.access$200(NewFile.java:84)
	at
org.netbeans.modules.project.ui.actions.NewFile$PopupListener.actionPerformed(NewFile.java:348)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1051)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1092)
	at java.awt.Component.processMouseEvent(Component.java:5517)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
	at java.awt.Component.processEvent(Component.java:5282)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
--- Max Rydahl Andersen <max.andersen at redhat.com> wrote:

> what is the stacktrace ?
> 
> -max
> 
> > Hi,
> >
> > Wondering if you can help me here.
> >
> > I have a hibernate.reveng.xml file which contains some tables. I want to
> > generate mappings and POJOs for those tables that are in the reveng.xml
> file
> > without using Ant.
> >
> > Here is how my code looks like:
> >
> > String fileName = "hibernate.reveng.xml";
> > JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
> > cfg.configure();
> > OverrideRepository or = new OverrideRepository();
> > or.addResource(fileName);
> > cfg.setReverseEngineeringStrategy(or.getReverseEngineeringStrategy(new
> > DefaultReverseEngineeringStrategy()));
> >
> > But I am getting java.lang.ExceptionInInitializerError at
> > JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
> >
> > Any idea why I am getting an error there ?
> >
> > Thanks
> >
> >
> >
> >
> >
> > 
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> > 
> 
> 
> 
> 



      



More information about the hibernate-dev mailing list