-->
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.  [ 15 posts ] 
Author Message
 Post subject: Eclipse 3.1.2, jdk 1.5, hibernate tools beta 4 on mac
PostPosted: Mon Mar 27, 2006 5:01 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
After doing some initial messing with beta 4 of the hibernate tools, I'm excited for the possibilities, but has anyone else been having problems with fairly simple queries?
I have a Product class and a foreign keyed class called Manufacturer. I try to do a query:
from Product p where p.manufacturer.name like 'Sony%'
and it gives the error, "An unknown error has occurred" indefinitely and I have to kill eclipse to get out of the error loop.
I'm running with eclipse 3.1.2, with the latest jdk 5, hibernate tools beta 4, on mac os 10.4.5. I realize that the jdk 5 is not the default jdk on the mac as of now, so they may still be having problems. I'm just wondering if others are having similar problems.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 5:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I have heard that people were using it on Mac so I know it should work on that platform.

In any case, what does the error log view show ? Any stacktrace ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: No stack trace that I can find
PostPosted: Tue Mar 28, 2006 3:08 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
Max,
There isn't a stack trace in the eclipse console window. Is there another log where I can look for a stack trace?

Also it does work for some queries, but it just seems a bit odd that that particular fairly simple query should get the error.

Thanks,
Jeremy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 3:19 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
im talking about Eclipse Log *view* not the console.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: log view
PostPosted: Tue Mar 28, 2006 3:33 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
Please forgive my ignorance. When you say log *view* I understand that to mean you are wanting any output from an eclipse *view* called log, which I cannot find looking through the eclipse views that are available.

When I say console, I mean the area in eclipse - under views->Basic->console where I get most of my error messages for runtimes within eclipse. Sometimes I have gotten error messages in that console when I hadn't configured the HibernateConsole correctly. I didn't mean a terminal console from where I might have started up eclipse.

Is there another log view that you are referring to?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 4:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Window > Show View > Error Log

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: No error log view
PostPosted: Tue Mar 28, 2006 4:06 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
I don't have that as an option in either the window->show views or the window->show views->other sections. Is that something from a plugin or the JBoss IDE? I have installed the latest WTP, hibernate tools, spring ide, and xmlbuddy as plugins.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 5:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is part of PDE which is available if you run with an eclipse SDK.

it might hide it self under Other > PDE Runtime > Error Log

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: PDE and just waiting for an updated version
PostPosted: Fri Mar 31, 2006 2:49 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
Max,

I greatly appreciate your help with this.

I think that if it takes installing the plugin development environment, I'll just wait for another beta to try it. It seems like a useful tool, but not *that* useful for my current job right now as to spend more time messing with it.

Also, having to run eclipse with 1.5 in order to use the tool with a 1.5 project creates some issues for me on a mac. My anecdotal evidence suggests that one of the reasons why Apple hasn't gone to 1.5 as the default is that there are some memory leaks with their current 1.5 implementation and I would prefer not to keep eclipse in 1.5 for that reason, if I don't have to.

Anyway, thanks for your time!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 3:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I actually never though noone would run eclipse without having access to the Error Log View...hard to figure out what went wrong when something does go wrong.

If you don't have the error log view then simply locate the log file of your workspace and locate the error manually. It is in <workspace>/.metadata/.log

Running with JDK 1.5 is only needed if you use annotations; otherwise it is pretty hard to load classes with annotations in them. To bad the Mac JDK 1.5 is not production ready (incredible actually!)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Log messages
PostPosted: Fri Mar 31, 2006 4:12 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
Max,

I captured the output just from the one query that I mention above and it produces about 150 k of text in the log file - for that one query.

It doesn't look like there are any errors in the log output, but just lots and lots of queries. I wonder if that might have something to do with the one-to-many relationships from product to features, specifications, addons, and warranties.

I can email it over but a snippet of it I'll post:

!ENTRY org.hibernate.eclipse 2 30000 2006-03-31 13:07:30.560 !MESSAGE WARN main net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: bundleresource://626/ehcache-failsafe.xml

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:32.835
!MESSAGE DEBUG main org.hibernate.SQL - select product0_.id as id4_, product0_.sku as sku4_, product0_.name as name4_, product0_.model as model4_, product0_.description as descript5_4_, product0_.inventory_level as inventory6_4_, product0_.image_url as image7_4_, product0_.image_thumbnail_url as image8_4_, product0_.list_price as list9_4_, product0_.our_price as our10_4_, product0_.sale_price as sale11_4_, product0_.sale_start_date as sale12_4_, product0_.sale_end_date as sale13_4_, product0_.rebate_description as rebate14_4_, product0_.rebate_start_date as rebate15_4_, product0_.rebate_end_date as rebate16_4_, product0_.allow_ups_shipment as allow17_4_, product0_.contains_tentoe_info as contains18_4_, product0_.is_visible as is19_4_, product0_.last_unidata_update as last20_4_, product0_.manufacturer_id as manufac21_4_, product0_.category_id as category22_4_ from product product0_, manufacturer manufactur1_ where product0_.manufacturer_id=manufactur1_.id and (manufactur1_.name like 'Sony%')

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.48
!MESSAGE DEBUG main org.hibernate.SQL - select manufactur0_.id as id0_0_, manufactur0_.name as name0_0_, manufactur0_.code as code0_0_ from manufacturer manufactur0_ where manufactur0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.59
!MESSAGE DEBUG main org.hibernate.SQL - select category0_.id as id6_0_, category0_.name as name6_0_, category0_.code as code6_0_, category0_.depth_level as depth4_6_0_, category0_.is_visible as is5_6_0_ from category category0_ where category0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.92
!MESSAGE DEBUG main org.hibernate.SQL - select category0_.id as id6_0_, category0_.name as name6_0_, category0_.code as code6_0_, category0_.depth_level as depth4_6_0_, category0_.is_visible as is5_6_0_ from category category0_ where category0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.98
!MESSAGE DEBUG main org.hibernate.SQL - select category0_.id as id6_0_, category0_.name as name6_0_, category0_.code as code6_0_, category0_.depth_level as depth4_6_0_, category0_.is_visible as is5_6_0_ from category category0_ where category0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.104
!MESSAGE DEBUG main org.hibernate.SQL - select manufactur0_.id as id0_0_, manufactur0_.name as name0_0_, manufactur0_.code as code0_0_ from manufacturer manufactur0_ where manufactur0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.109
!MESSAGE DEBUG main org.hibernate.SQL - select category0_.id as id6_0_, category0_.name as name6_0_, category0_.code as code6_0_, category0_.depth_level as depth4_6_0_, category0_.is_visible as is5_6_0_ from category category0_ where category0_.id=?

!ENTRY org.hibernate.eclipse 1 10000 2006-03-31 13:07:33.115
!MESSAGE DEBUG main org.hibernate.SQL - select category0_.id as id6_0_, category0_.name as name6_0_, category0_.code as code6_0_, category0_.depth_level as depth4_6_0_, category0_.is_visible as is5_6_0_ from category category0_ where category0_.id=?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 4:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm - debug logging should not be enabled by default!

That many queries for one indicate to me a lot of non-lazy loading.

But no sign of the "An unknown error has occurred" in the logs ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: lazy loading and errors
PostPosted: Fri Mar 31, 2006 4:29 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
I haven't disabled lazy-loading in those mappings, neither have I set logging to DEBUG, strange...
I did a grep -i "an unknown" in the .metadata directory with no result, so it doesn't look like it exists in the log.

However, I found one thing I should have noticed before at the end of the log. (I had looked for ERROR and error, but hadn't done the -i on error...) It was this:

!ENTRY org.eclipse.jface 4 2 2006-03-31 13:07:36.399 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". !STACK 0 java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/ToStringBuilder at com.rcwilley.business.product.Product.toString(Product.java:1045) at org.hibernate.eclipse.console.views.QueryPageViewer$LabelProviderImpl.getColumnText(QueryPageViewer.java:61) at org.eclipse.jface.viewers.TableViewer.doUpdateItem(TableViewer.java:472) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:434)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1763)
at org.eclipse.jface.viewers.TableViewer.createItem(TableViewer.java:344) at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:850) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:748)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:737)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1264)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1201)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1262)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1221)
at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:698)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:248)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1417)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:174)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:153)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:111)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:88)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:52)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:62)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50)
at org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:60)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:306)
at org.hibernate.console.ConsoleConfiguration.access$5(ConsoleConfiguration.java:302)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:295)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:287)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(ExecuteHQLAction.java:131)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(ExecuteHQLAction.java:116)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(ExecuteHQLAction.java:120)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:222)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:228)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1380)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1404)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1389)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1237)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3061)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 31, 2006 4:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the classpath for the console configuration need to contain all the libraries your pojos are dependent on

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Thanks!
PostPosted: Fri Mar 31, 2006 4:48 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
Thanks!
That seems to do it for this query. Now that I know how to get to the errors in the logs and now that I understand that requirement for the POJOs - I read it before, but was just plowing through and didn't quite get it - I think I'll be a-okay.
Nothing to do with the mac after all, though their jdk progress is a bit frustrating.


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

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.