- This topic has 13 replies, 2 voices, and was last updated 20 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
RUFFIEMemberHi, I’m a beginning struts developer and I am trying out myEclipse.
I love the clear flash tutorials, but I have a problem with the Hibernate one.
The java file is looking for some import declarations (i think).
I have a screenshot to show you what i mean:
http://www.xs4all.nl/~ruffie21/hibernate.JPGSo my question is. Is this a real problem e.g. the project won’t run, if so, how do i fix this?
I use Eclipse 3.0.0 (updating to 3.0.1 internally, errors at the updated ant plugin (read timeout)).
Riyad KallaMemberWhat is the error? “Cannot find class”? Try and click CTRL+SHFT+O for Organize Imports and see if they clear up. Also make sure you “Add Hibrenate Capabilities” to your project, and also make sure that all the libraries were added correctly to your build path (Project Properties > java Build Path > Library tab)
RUFFIEMemberHi there, tnx for the answers.
But I gotta tell you, everything you said to check I did, about adding Hibernate capabilities, done that too (I followed the tutorial).So I just deleted my whole project and started all over. And now all the errors are gone too. Don’t know exactly how, cuz I didn’t change any settings or so, weird thing.
But I still got a few problems regarding Hibernate and MyEclipse (maybe someone could change my thread title?):
– This has been going on for a couple of days already, but just one day when I wanted to start MyEclipse, it halted said to check the log. I won’t post that yet, cuz I tried the following:
1. Tried to use the update function inside of Eclipse, but that gave a read timeout error at the Ant package.
2. When I start eclipse.exe itself, it works fine (MyEclipse functionality available too). So I downloaded the 3.0.1 release of Eclipse and just overwrote the old installation, but when starting MyEclipse again, still gives me the following error in the log:!SESSION Oct 13, 2004 22:49:00.593 --------------------------------------------- eclipse.buildId=M200409161125 java.version=1.3.1_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:00.603 !MESSAGE Error registering XML parser services. !STACK 0 java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.registerEndorsedXMLParser(EclipseAdaptor.java:272) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStart(EclipseAdaptor.java:253) at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:61) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:553) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:477) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:166) at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:425) at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:216) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688) !ENTRY initial@reference:file:c:/eclipse/plugins/org.eclipse.core.runtime_3.0.1/ 0 0 Oct 13, 2004 22:49:00.983 !MESSAGE FrameworkEvent.ERROR !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.runtime.PlatformActivator.start() of bundle org.eclipse.core.runtime. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) Root exception: java.lang.NoClassDefFoundError: org/xml/sax/SAXException at org.eclipse.core.internal.runtime.PlatformActivator.startRegistry(PlatformActivator.java:143) at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:65) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) !ENTRY initial@reference:file:c:/eclipse/plugins/org.eclipse.update.configurator_3.0.0/ 0 0 Oct 13, 2004 22:49:01.33 !MESSAGE FrameworkEvent.ERROR !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.update.internal.configurator.ConfigurationActivator.start() of bundle org.eclipse.update.configurator. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) Root exception: java.lang.Exception: Cannot initialize the Update Configurator at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:93) at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:71) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.93 !MESSAGE Startup error !STACK 1 java.lang.IllegalStateException: Bundle initial@reference:file:c:/eclipse/plugins/org.eclipse.core.runtime_3.0.1/ [283] is not active. at org.eclipse.core.runtime.adaptor.EclipseStarter.ensureBundlesActive(EclipseStarter.java:303) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:227) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688) !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.113 !MESSAGE Bundle update@/c:/eclipse/plugins/org.apache.ant_1.6.1/ [3] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.113 !MESSAGE Bundle update@/c:/eclipse/plugins/org.apache.ant_1.6.2/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.123 !MESSAGE Bundle update@/c:/eclipse/plugins/org.apache.lucene_1.3.0/ [4] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.123 !MESSAGE Bundle update@/c:/eclipse/plugins/org.apache.lucene_1.3.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.143 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ant.ui_3.0.0/ [6] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.143 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ant.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.163 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.core.filebuffers_3.0.0/ [10] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.163 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.core.filebuffers_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.183 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.core.resources_3.0.0/ [12] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.183 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.core.resources_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.203 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.debug.core_3.0.0/ [16] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.203 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.debug.core_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.223 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.debug.ui_3.0.0/ [17] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.223 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.debug.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.233 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.help.base_3.0.0/ [19] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.233 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.help.base_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.253 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.help.webapp_3.0.0/ [22] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.253 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.help.webapp_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.264 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.core_3.0.0/ [24] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.264 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.core_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.284 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.debug.ui_3.0.0/ [25] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.284 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.debug.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.304 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.debug_3.0.0/ [26] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.304 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.debug_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.314 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.doc.isv_3.0.0/ [27] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.314 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.doc.isv_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.324 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.doc.user_3.0.0/ [28] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.324 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.doc.user_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.354 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.junit_3.0.0/ [30] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.354 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.junit_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.374 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.launching_3.0.0/ [31] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.374 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.launching_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.384 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.source_3.0.0/ [32] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.384 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.source_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.404 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.ui_3.0.0/ [33] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.404 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.414 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt_3.0.0/ [34] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.414 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jdt_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.434 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jface.text_3.0.0/ [35] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.434 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.jface.text_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.454 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ltk.core.refactoring_3.0.0/ [37] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.454 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ltk.core.refactoring_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.464 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ltk.ui.refactoring_3.0.0/ [38] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.464 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ltk.ui.refactoring_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.474 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.build_3.0.0/ [42] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.474 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.build_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.494 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.core_3.0.0/ [43] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.494 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.core_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.504 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.runtime_3.0.0/ [46] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.504 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.runtime_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.524 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.source_3.0.0/ [47] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.534 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.source_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.544 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.ui_3.0.0/ [48] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.574 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.584 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde_3.0.0/ [49] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.584 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.pde_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.604 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.doc.isv_3.0.0/ [50] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.604 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.doc.isv_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.614 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.doc.user_3.0.0/ [51] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.614 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.doc.user_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.624 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.source.win32.win32.x86_3.0.0/ [52] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.624 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.source.win32.win32.x86_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.644 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.source_3.0.0/ [53] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.644 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform.source_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.664 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform_3.0.0/ [54] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.664 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.platform_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.674 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.sdk_3.0.0/ [55] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.674 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.sdk_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.684 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.search_3.0.0/ [56] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.684 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.search_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.704 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.swt.win32_3.0.0/ [57] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.704 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.swt.win32_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.714 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.swt_3.0.0/ [58] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.714 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.swt_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.734 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.cvs.core_3.0.0/ [60] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.734 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.cvs.core_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.744 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.cvs.ui_3.0.0/ [63] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.744 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.cvs.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.764 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.ui_3.0.0/ [64] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.764 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.team.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.774 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.text_3.0.0/ [65] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.774 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.text_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.784 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.cheatsheets_3.0.0/ [67] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.784 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.cheatsheets_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.804 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.editors_3.0.0/ [69] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.804 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.editors_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.814 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.externaltools_3.0.0/ [70] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.814 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.externaltools_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.834 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.ide_3.0.0/ [72] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.834 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.ide_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.844 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.intro_3.0.0/ [73] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.844 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.intro_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.864 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.presentations.r21_3.0.0/ [74] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.864 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.presentations.r21_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.874 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.win32_3.0.0/ [76] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.874 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.win32_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.894 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.workbench.texteditor_3.0.0/ [78] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.894 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.workbench.texteditor_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.904 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.workbench_3.0.0/ [79] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.904 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui.workbench_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.924 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui_3.0.0/ [80] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.924 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.934 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.update.core_3.0.0/ [83] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.934 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.update.core_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.954 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.update.ui_3.0.0/ [85] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.954 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.update.ui_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.965 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.core.runtime_3.0.0/ [289] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.965 !MESSAGE Bundle initial@reference:file:c:/eclipse/plugins/org.eclipse.core.runtime_3.0.1/ was picked instead. !ENTRY org.eclipse.osgi Oct 13, 2004 22:49:01.975 !MESSAGE Bundle update@/c:/eclipse/plugins/org.eclipse.osgi_3.0.0/ [308] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 13, 2004 22:49:01.975 !MESSAGE Bundle System Bundle was picked instead.
This was the one BEFORE updating to 3.0.1 of Eclipse:
!SESSION Oct 12, 2004 15:57:44.458 --------------------------------------------- eclipse.buildId=I200406251208 java.version=1.3.1_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US !ENTRY org.eclipse.osgi Oct 12, 2004 15:57:44.458 !MESSAGE Error registering XML parser services. !STACK 0 java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.registerEndorsedXMLParser(EclipseAdaptor.java:272) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStart(EclipseAdaptor.java:253) at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:61) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:553) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:477) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:166) at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:425) at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:216) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628) !ENTRY initial@reference:file:c:/eclipse/plugins/org.eclipse.core.runtime_3.0.0/ 0 0 Oct 12, 2004 15:57:45.460 !MESSAGE FrameworkEvent.ERROR !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.runtime.PlatformActivator.start() of bundle org.eclipse.core.runtime. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) Root exception: java.lang.NoClassDefFoundError: org/xml/sax/SAXException at org.eclipse.core.internal.runtime.PlatformActivator.startRegistry(PlatformActivator.java:143) at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:65) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) !ENTRY initial@reference:file:c:/eclipse/plugins/org.eclipse.update.configurator_3.0.0/ 0 0 Oct 12, 2004 15:57:45.570 !MESSAGE FrameworkEvent.ERROR !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.update.internal.configurator.ConfigurationActivator.start() of bundle org.eclipse.update.configurator. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:975) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) Root exception: java.lang.Exception: Cannot initialize the Update Configurator at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:93) at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:71) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:421) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:366) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:999) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:577) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:488) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:444) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:186) at org.eclipse.osgi.framework.eventmgr.EventThread.run(EventThread.java:104) !ENTRY org.eclipse.osgi Oct 12, 2004 15:57:45.620 !MESSAGE Startup error !STACK 1 java.lang.IllegalStateException: Bundle initial@reference:file:c:/eclipse/plugins/org.eclipse.core.runtime_3.0.0/ [1] is not active. at org.eclipse.core.runtime.adaptor.EclipseStarter.ensureBundlesActive(EclipseStarter.java:303) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:227) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628) !ENTRY org.eclipse.osgi Oct 12, 2004 15:57:45.670 !MESSAGE Bundle update@/c:/eclipse/plugins/com.cross.easystruts.eclipse_0.6.4/ [134] was not resolved. !SUBENTRY 1 org.eclipse.osgi Oct 12, 2004 15:57:45.670 !MESSAGE Missing required bundle org.eclipse.update.ui.forms_0.0.0.
So I don’t know what happened. It just suddenly did. And before I blame MyEclipse or install it all over again, just wanted to first find out if this can be fixed.
-Second thing regarding Hibernate. I think i saw this same very problem somewhere here, I haven’t searched yet, so please excuse me if this is already spoken of, I will then search for myself:
I completed a project based on the Hibernate tutorial. Same methods, flow everything, except different database, properties and such of course.
Everything checks out OK when deploying and I get the input form screen, BUT when I hit Submit I get the error that the Hibernate Session is CLOSED.
So what’s up with that?Sorry for the long post, but I don’t like to open a new thread for every little problem 😉
Riyad KallaMemberjava.version=1.3.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US!ENTRY org.eclipse.osgi Oct 13, 2004 22:49:00.603
!MESSAGE Error registering XML parser services.
!STACK 0
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactoryEclipse 3.0 requires that you run it with a 1.4 JRE
ubmit I get the error that the Hibernate Session is CLOSED.
So what’s up with that?This is a common problem when getting started with Hibernate (god knows I’ve done it), you need to be good about opening/closing your sessions at the right time. It sounds like you are inadvertantly trying to use a session, that a few lines of code before you are probably closing. What you can do is figure out where this exception is being thrown and then add a line RIGHT before it to open a new session, the problem will likely go away.
If you want to get good with Hibernate I HIGHLY suggest Hibernate in Action, its a fantastic book written by the authors of Hibernate… it gives you all the in depth details that others may not be aware of, or cover stuff you have always wondered about. It has a particularly good section on explainin what a “Session” is and how to use it.
RUFFIEMember@support-rkalla wrote:
java.version=1.3.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US!ENTRY org.eclipse.osgi Oct 13, 2004 22:49:00.603
!MESSAGE Error registering XML parser services.
!STACK 0
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactoryEclipse 3.0 requires that you run it with a 1.4 JRE
ubmit I get the error that the Hibernate Session is CLOSED.
So what’s up with that?This is a common problem when getting started with Hibernate (god knows I’ve done it), you need to be good about opening/closing your sessions at the right time. It sounds like you are inadvertantly trying to use a session, that a few lines of code before you are probably closing. What you can do is figure out where this exception is being thrown and then add a line RIGHT before it to open a new session, the problem will likely go away.
If you want to get good with Hibernate I HIGHLY suggest Hibernate in Action, its a fantastic book written by the authors of Hibernate… it gives you all the in depth details that others may not be aware of, or cover stuff you have always wondered about. It has a particularly good section on explainin what a “Session” is and how to use it.
Tnx, I’ll take a look into that!
Furthermore. I’m running the 1.5.0SDK/JRE here and it worked all fine before as i said. This problem just came all of a sudden. I can run eclipse.exe (or myeclipse that is), but ony with the -vm <path of jvm> parameter. My enviroment variables are all good.
To my understanding this isn’t much of a problem, so I’l just work like this for now.About Hibernate, it’s very weird then, cause I followed the exact code and everything of the tutorial, and that one works? 😛
Riyad KallaMemberFurthermore. I’m running the 1.5.0SDK/JRE here and it worked all fine before as i said.
If you look at the section of code that I quoted, it is showing that Eclipse is running with Java 1.3.1_01, not your 5.0 install. This is likely just a path issue.
I can run eclipse.exe (or myeclipse that is), but ony with the -vm <path of jvm> parameter.
Yes you are exactly right, this is what you need to do in order to run eclipse with multiple JREs installed:
eclipse.exe -vm c:\jdk1.5.0\bin\javaw.exe
About Hibernate, it’s very weird then, cause I followed the exact code and everything of the tutorial, and that one works? 😛
Yes I’m sure it did, but I know that when I was getting started with Hibernate I had this problem ALL the time, I just don’t remember the “golden rule” that I used to avoid it… if you can give me code snippets we can look at it together. First look at where the exception is being thrown, what does that code look like? Does it call any other code? Etc…
RUFFIEMemberI’m currently reading a lot on the Hibernate site, and the developers there said something about Hibernate’s built-in connection pooling is not for production. What do they mean by that? They’re also recommending other things like Proxool, but If they ain’t working (and recommending other things) why make it? There has to be a way to keep the connection open properly right. I really would like to use Hibernate because of it’s ease within the myEclipse enviroment.
Anyways, this is the exception I get:
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: net.sf.hibernate.HibernateException: Session is closed org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.RuntimeException: net.sf.hibernate.HibernateException: Session is closed com.frontier.hibernate.ComponentService.getComponentList(ComponentService.java:220) org.apache.jsp.AddComponent_jsp._jspService(AddComponent_jsp.java:120) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I see 2 files that I have, ComponentService and AddComponent.jsp.
Here is ComponentService.java (from VipService.java):/* * Created on Oct 13, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.frontier.hibernate; /** * @author ifrontier * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ import java.util.List; import net.sf.hibernate.HibernateException; import net.sf.hibernate.ObjectNotFoundException; import net.sf.hibernate.Query; import net.sf.hibernate.Session; import com.frontier.hibernate.Component; /** * Provides an interface used to access <code>Vipdata</code> objects from the * database using Hibernate. * * @author Don Fair * */ /* * The VipService class */ public class ComponentService { private static ComponentService instance = null; private ComponentService() { } /** * getInstance() returns the instance of the <code>ComponentService</code> singleton. * * @return <code>ComponentService</code> singleton. */ public static synchronized ComponentService getInstance() { /* * Creates the Singleton instance, if needed. * */ if (instance == null) { instance = new ComponentService(); } return instance; } /** * getComponent() returns <code>Component</code> object from database with given id. If * the user is not found, will return null. * * @param id The <code>Long</code> id of desired <code>Component</code> * @return <code>Component</code> with given id, if it exists. Otherwise, returns null. */ public Component getComponent(Long id) { /* * Use the ConnectionFactory to retrieve an open * Hibernate Session. * */ Session session = null; try { session = SessionFactory.currentSession(); /* * Calls the load method on the Hibernate session object * to retrieve the Item with the provided id. */ return (Component) session.load(Component.class, id); } /* * If the object is not found, i.e., no Item exists with the * requested id, we want the method to return null rather * than throwing an Exception. * */ catch (ObjectNotFoundException onfe) { return null; } catch (HibernateException e) { /* * All Hibernate Exceptions are transformed into an unchecked * RuntimeException. This will have the effect of causing the * user's request to return an error. * */ System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } /* * Regardless of whether the above processing resulted in an Exception * or proceeded normally, we want to close the Hibernate session. When * closing the session, we must allow for the possibility of a Hibernate * Exception. **/ finally { if (session != null) { try { session.close(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } } } } /** * updateItem() updates specfied <code>Item</code> through Hibernate. * * @param item An <code>Item</code> to be updated */ public void updateComponent(Component component) { /* * Use the ConnectionFactory to retrieve an open * Hibernate Session. * */ Session session = null; try { session = SessionFactory.currentSession(); /* * Update the state of the item using the Hibernate session's update method. * * Call the flush method to ensure that the object in saved. * */ session.update(component); session.flush(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } /* * Regardless of whether the above processing resulted in an Exception * or proceeded normally, we want to close the Hibernate session. When * closing the session, we must allow for the possibility of a Hibernate * Exception. * */ finally { if (session != null) { try { session.close(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } } } } /** * getItemList() returns list of all <code>Item</code> objects stored in the database. * * @return <code>List</code> of <code>Item</code> objects. */ public List getComponentList() { /* * Use the ConnectionFactory to retrieve an open * Hibernate Session. * */ Session session = null; try { session = SessionFactory.currentSession(); /* * Build HQL (Hibernate Query Language) query to retrieve a list * of all the items currently stored by Hibernate. */ Query query = session.createQuery( "select Component from com.frontier.hibernate.Component Component order by Component.idComponent"); return query.list(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } /* * Regardless of whether the above processing resulted in an Exception * or proceeded normally, we want to close the Hibernate session. When * closing the session, we must allow for the possibility of a Hibernate * Exception. * */ finally { if (session != null) { try { session.close(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } } } } /** * addItem() inserts new <code>Item</code> into the database through Hibernate. * * @param item A new <code>Item</code> to be added. */ public void addComponent(Component data) { Session session = null; try { session = SessionFactory.currentSession(); session.save(data); session.flush(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } /* * Regardless of whether the above processing resulted in an Exception * or proceeded normally, we want to close the Hibernate session. When * closing the session, we must allow for the possibility of a Hibernate * Exception. * */ finally { if (session != null) { try { session.close(); } catch (HibernateException e) { System.err.println("Hibernate Exception" + e.getMessage()); throw new RuntimeException(e); } } } } }
I’m not putting AddComponent.java nor .jsp here (yet), cause there is no line 120. (I assume the numbers in the exception error are linenumbers?)
First the SessionFactory.java
package com.frontier.hibernate; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.cfg.Configuration; /** * Configures and provides access to Hibernate sessions, tied to the * current thread of execution. Follows the Thread Local Session * pattern, see {@link http://hibernate.org/42.html}. */ public class SessionFactory { /** * Location of hibernate.cfg.xml file. * NOTICE: Location should be on the classpath as Hibernate uses * #resourceAsStream style lookup for its configuration file. That * is place the config file in a Java package - the default location * is the default Java package.<br><br> * Examples: <br> * <code>CONFIG_FILE_LOCATION = "/hibernate.conf.xml". * CONFIG_FILE_LOCATION = "/com/foo/bar/myhiberstuff.conf.xml".</code> */ private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml"; /** Holds a single instance of Session */ private static final ThreadLocal threadLocal = new ThreadLocal(); /** The single instance of hibernate configuration */ private static final Configuration cfg = new Configuration(); /** The single instance of hibernate SessionFactory */ private static net.sf.hibernate.SessionFactory sessionFactory; /** * Returns the ThreadLocal Session instance. Lazy initialize * the <code>SessionFactory</code> if needed. * * @return Session * @throws HibernateException */ public static Session currentSession() throws HibernateException { Session session = (Session) threadLocal.get(); if (session == null) { if (sessionFactory == null) { try { cfg.configure(CONFIG_FILE_LOCATION); sessionFactory = cfg.buildSessionFactory(); } catch (Exception e) { System.err.println("%%%% Error Creating SessionFactory %%%%"); e.printStackTrace(); } } session = sessionFactory.openSession(); threadLocal.set(session); } return session; } /** * Close the single hibernate session instance. * * @throws HibernateException */ public static void closeSession() throws HibernateException { Session session = (Session) threadLocal.get(); threadLocal.set(null); if (session != null) { session.close(); } } /** * Default constructor. */ private SessionFactory() { } }
The only thing I find strange (to me, cuz I’ve got no experience with it yet) is why it has so many finally { …session.close() } functions.
Riyad KallaMemberThe finally close blocks are because Hibernate throws checked exceptions (something I heard Gavin wishes he could change), and the finally clauses are to make sure the session gets closed if any exception is thrown in the try block (for example, open a session, attempt a connection, connection fails, throws an exception… besides the exception you want to make sure your session is closed).
RUFFIEMemberDo you have any other ideas on how this can be fixed or done in another way? I’m still busy with Hibernate docs right now (don’t work on weekends ;)).
Riyad KallaMemberYou mean the session closed exception? I don’t have any other things to try besides what I already suggested, also with respect to your question about connection pooling, for Hibernate they suggest either using your application server’s connection pool, or like you found, another 3rd party pool. The one included with Hibernate is just for testing and getting something working quickly, what they don’t want you to do is deploy a full J2EE app using their connection pool, its not anywhere near as robust or tested as the other 3rd party connection pools, that is what they mean by that warning.
RUFFIEMember@support-rkalla wrote:
You mean the session closed exception? I don’t have any other things to try besides what I already suggested, also with respect to your question about connection pooling, for Hibernate they suggest either using your application server’s connection pool, or like you found, another 3rd party pool. The one included with Hibernate is just for testing and getting something working quickly, what they don’t want you to do is deploy a full J2EE app using their connection pool, its not anywhere near as robust or tested as the other 3rd party connection pools, that is what they mean by that warning.
As I’m still unexperienced with all this, can you maybe suggest a few other 3rd party tools, with almost the same functionality (e.g. class/mapping generation and such). Someone pointed me to proxool, I’m looking at it right now, but I’d be very thankful if you could point me to some other alternatives.
Riyad KallaMemberAs I’m still unexperienced with all this, can you maybe suggest a few other 3rd party tools, with almost the same functionality (e.g. class/mapping generation and such).
You mean persistence engines like Hibernate, or tools for Eclipse that let you work with hibernate? You can try Hibernate Synchronizer plugin, its quite good and a lot of people like it: http://www.binamics.com/hibernatesync/
Someone pointed me to proxool, I’m looking at it right now, but I’d be very thankful if you could point me to some other alternatives.
Proxool is a connection pool not a persistence engine.. its a pluggable part to Hibernate (persistence engine)… I’m not sure I understand your question. Either way, another popular connection pool is the Jakarta Commons DB Connection Pool here: http://jakarta.apache.org/commons/dbcp/
RUFFIEMember@support-rkalla wrote:
As I’m still unexperienced with all this, can you maybe suggest a few other 3rd party tools, with almost the same functionality (e.g. class/mapping generation and such).
You mean persistence engines like Hibernate, or tools for Eclipse that let you work with hibernate? You can try Hibernate Synchronizer plugin, its quite good and a lot of people like it: http://www.binamics.com/hibernatesync/
Someone pointed me to proxool, I’m looking at it right now, but I’d be very thankful if you could point me to some other alternatives.
Proxool is a connection pool not a persistence engine.. its a pluggable part to Hibernate (persistence engine)… I’m not sure I understand your question. Either way, another popular connection pool is the Jakarta Commons DB Connection Pool here: http://jakarta.apache.org/commons/dbcp/
Yes I’m sorry if my question seemed rather vague.
I did mean other tools LIKE Hibernate with almost the same functionalities. The generation and mapping in particular.I did see that Proxool isn’t really what I’m looking for. I understand it kinda works like a proxy, running transparent to your excisting db pool (something in that matter).
I’ll look at the synchronizer plugin right away, thank you very much.
Other recommendations are surely welcome still.O yeah and about the original problem, about the hibernate session being closed; someone posted the solution in another topic in this forum as being:
if (session == null || session.isOpen() == false) {....
. You had to put that in the generated SessionFactory class and this wasn’t covered in the tutorial 🙂
And on another note, i convinced my boss to “buy” myeclipse 😀
Riyad KallaMemberI did mean other tools LIKE Hibernate with almost the same functionalities.
Ahh, ok the only other one I know of with the same hype level as Hibernate is JDO, its Sun’s ‘official’ version of Hibernate.
And on another note, i convinced my boss to “buy” myeclipse 😀
That’s great, thank you for the support!
-
AuthorPosts