From: George T. <geo...@fr...> - 2005-08-07 09:48:14
|
Hello Kal Using tm4j-0.9.8, I try to call the following code TMAPITopicMapImpl tmapiTmImpl = getTmApiTmImpl (); QueryEvaluator qe = QueryEvaluatorFactory.newQueryEvaluator (tmapiTmImpl.getWrapped()); TologResultsSet rSet = qe.execute ("topic($T)?"); while the TopicMap is connected to MySQL using Hibernate the "qe.execute()" throws the following... ava.rmi.UnmarshalException: Error unmarshaling return; nested exception is: java.lang.ClassNotFoundException: net.sf.hibernate.LazyInitializationException at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at etm.server.rmi.tmapi.EtmTopicMapImp_Stub.getRemoteTologTopics(Unknown Source) at etm.client.tmapi.TopicMapImp.getRemoteTologTopics(TopicMapImp.java:431) at yellow.ui.tm.DlgFindTopic.findTopics(DlgFindTopic.java:489) at yellow.ui.tm.DlgFindTopic.btnFindActionPerformed(DlgFindTopic.java:329) at yellow.ui.tm.DlgFindTopic.access$000(DlgFindTopic.java:34) at yellow.ui.tm.DlgFindTopic$1.actionPerformed(DlgFindTopic.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4 20) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener .java:234) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3093) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) 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:1766) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :153) at java.awt.Dialog$1.run(Dialog.java:515) at java.awt.Dialog.show(Dialog.java:536) at java.awt.Component.show(Component.java:1300) at java.awt.Component.setVisible(Component.java:1253) at yellow.ui.props.PropSupTopicType$TopicTypePanelInplace.editTopicType(PropSup TopicType.java:260) at yellow.ui.props.PropSupTopicType$TopicTypePanelInplace.actionPerformed(PropS upTopicType.java:222) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4 20) 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:1000) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI .java:1041) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3093) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) 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:1766) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :153) at java.awt.Dialog$1.run(Dialog.java:515) at java.awt.Dialog.show(Dialog.java:536) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:77 9) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:822) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:810) at org.openide.util.Mutex.doEventAccess(Mutex.java:1044) at org.openide.util.Mutex.readAccess(Mutex.java:170) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:795) at java.awt.Component.show(Component.java:1300) at java.awt.Component.setVisible(Component.java:1253) at yellow.ui.tm.wizcreatetype.WizDCreateType.showWizardCreateType(WizDCreateTyp e.java:77) at yellow.actions.CreateNewTypeAction.performAction(CreateNewTypeAction.java:55 ) at yellow.ui.graph.PanGraph$3.actionPerformed(PanGraph.java:294) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4 20) 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:1000) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI .java:1041) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3093) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) 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:1766) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:234) 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) Caused by: java.lang.ClassNotFoundException: net.sf.hibernate.LazyInitializationException at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215) ... 98 more The same code works OK when the TopicMap is connected to Ozone or XTM I have included all these in my classpath libs/hibernate/c3p0.jar libs/hibernate/cglib2.jar libs/hibernate/commons-dbcp.jar libs/hibernate/commons-lang.jar libs/hibernate/commons-pool.jar libs/hibernate/connector.jar libs/hibernate/dom4j.jar libs/hibernate/ehcache.jar libs/hibernate/hibernate2.jar libs/hibernate/jaas.jar libs/hibernate/jcs.jar libs/hibernate/jdbc2_0-stdext.jar libs/hibernate/jta.jar libs/hibernate/mysql-connector-java-3.0.16-ga-bin.jar libs/hibernate/odmg.jar libs/hibernate/proxool.jar and the Hibernate works OK except for the part of the Tolog. Do you have any ideas on what should I do to overcome the net.sf.hibernate.LazyInitializationException? Thank you and have a nice Summer George ____________________________________________________________________ http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου. http://www.freemail.gr - free email service for the Greek-speaking. |