I have trouble viewing the results of a query. Nothing is displayed in the View tab, but the console says nothing wrong has happened. The same query works well with Hiber8IDE.
Laurent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmmm I would be interested in seeing if anything is in your <workspace>/.metadata/.log file. Also you might need to select the log tab before running the query as there is a current bug in there that it won't display any log information if the window hasn't been viewed at least once.
Any more details would be good, like query, mappings, actual data in the DB?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using Hibernator 0.9.5, I also do not see any results in the view tab. Like above, the query works in Hiber8IDE. The log tab shows nothing but green and my <workspace>/.metadata/.log file does not contain any errors.
The query I'm using is "select emp.firstName from emp in class Employee". The classes and mappings are pretty basic (a little test application). I can zip up the project and send it to you, if you like.
Darcy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I'm stumped . Email me the project and I'll have a look. dbradby at bigpond.net.au
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-09-11
Same problem.Classes and mappings file seem ok.No error in eclpse log. Any idea?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-11-20
Same problem here: pasting .log:
!ENTRY org.eclipse.ui 4 4 Nov 20, 2003 17:34:34.551
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Nov 20, 2003 17:34:34.551
!MESSAGE Failed to lazily initialize a collection - no Session
!STACK 0
net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no Session
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:167)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:64)
at net.sf.hibernate.collection.Bag.toString(Bag.java:487)
at net.sf.hibernator.views.TableAdapter.setData(TableAdapter.java:43)
at net.sf.hibernator.views.TableAdapter.createFromQuery(TableAdapter.java:26)
at net.sf.hibernator.views.ResultsView.loadTable(ResultsView.java:74)
at net.sf.hibernator.views.ResultsView$2.run(ResultsView.java:57)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:127)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:24)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:2337)
at net.sf.hibernator.views.ResultsView.loadQuery(ResultsView.java:55)
at net.sf.hibernator.views.QueryView.execute(QueryView.java:171)
at net.sf.hibernator.views.QueryView.access$0(QueryView.java:154)
at net.sf.hibernator.views.QueryView$1.handleEvent(QueryView.java:66)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-12-18
Hello Folks,
I had the same issue until I changed all the lazy="true" attributes in my Hibernate descriptors on my collection (set, list, etc.) mappings to false. You could probably remove them since I think the default is false.
It looks like the lazy evaluation of a collection requires an active Hibernate session. I think Hibernator is opening a session, doing the query, and then closing the session. The lazy collections don't fetch results until you access the collection elements, resulting in the LazyInitializationException.
Byers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have trouble viewing the results of a query. Nothing is displayed in the View tab, but the console says nothing wrong has happened. The same query works well with Hiber8IDE.
Laurent
Hmmm I would be interested in seeing if anything is in your <workspace>/.metadata/.log file. Also you might need to select the log tab before running the query as there is a current bug in there that it won't display any log information if the window hasn't been viewed at least once.
Any more details would be good, like query, mappings, actual data in the DB?
Thanks
Using Hibernator 0.9.5, I also do not see any results in the view tab. Like above, the query works in Hiber8IDE. The log tab shows nothing but green and my <workspace>/.metadata/.log file does not contain any errors.
The query I'm using is "select emp.firstName from emp in class Employee". The classes and mappings are pretty basic (a little test application). I can zip up the project and send it to you, if you like.
Darcy.
Well I'm stumped . Email me the project and I'll have a look. dbradby at bigpond.net.au
Thanks
Same problem.Classes and mappings file seem ok.No error in eclpse log. Any idea?
Same problem here: pasting .log:
!ENTRY org.eclipse.ui 4 4 Nov 20, 2003 17:34:34.551
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Nov 20, 2003 17:34:34.551
!MESSAGE Failed to lazily initialize a collection - no Session
!STACK 0
net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection - no Session
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:167)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:64)
at net.sf.hibernate.collection.Bag.toString(Bag.java:487)
at net.sf.hibernator.views.TableAdapter.setData(TableAdapter.java:43)
at net.sf.hibernator.views.TableAdapter.createFromQuery(TableAdapter.java:26)
at net.sf.hibernator.views.ResultsView.loadTable(ResultsView.java:74)
at net.sf.hibernator.views.ResultsView$2.run(ResultsView.java:57)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:127)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:24)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:2337)
at net.sf.hibernator.views.ResultsView.loadQuery(ResultsView.java:55)
at net.sf.hibernator.views.QueryView.execute(QueryView.java:171)
at net.sf.hibernator.views.QueryView.access$0(QueryView.java:154)
at net.sf.hibernator.views.QueryView$1.handleEvent(QueryView.java:66)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Hello Folks,
I had the same issue until I changed all the lazy="true" attributes in my Hibernate descriptors on my collection (set, list, etc.) mappings to false. You could probably remove them since I think the default is false.
It looks like the lazy evaluation of a collection requires an active Hibernate session. I think Hibernator is opening a session, doing the query, and then closing the session. The lazy collections don't fetch results until you access the collection elements, resulting in the LazyInitializationException.
Byers