-->
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.  [ 7 posts ] 
Author Message
 Post subject: <Class> not mapped
PostPosted: Thu Nov 10, 2005 6:00 pm 
Newbie

Joined: Wed Nov 09, 2005 9:07 pm
Posts: 8
I'm getting started with Hibernate Tools in Eclipse, and I'm trying to run a bit of EJB QL in the scratchpad: "from Bilingual". I have a persistant class Bilingual, and I am setup per this post (http://forum.hibernate.org/viewtopic.php?t=949918). I get a not-mapped error (stack trace below). What am I doing wrong?

Hibernate version:

JBoss 4.0.3, Eclipse 3.1.1, JBoss IDE 1.5RC1

Name and version of the database you are using:

PostgreSQL 8.0.3

Full stack trace of any exception that occurs:

!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-11-10 15:42:33.722
!MESSAGE Bilingual is not mapped.
!STACK 0
Bilingual is not mapped.
at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:145)
at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:86)
at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70)
at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:260)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3033)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2922)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:690)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:546)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:283)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:214)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:154)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:101)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:473)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1032)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:982)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at org.hibernate.console.HQLQueryPage.getList(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(Unknown Source)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:848)
at org.eclipse.jface.viewers.TableViewer.getRawChildren(TableViewer.java:1086)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:790)
at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:905)
at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:798)
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(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(Unknown Source)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(Unknown Source)
at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source)
at org.hibernate.console.QueryPageModel.add(Unknown Source)
at org.hibernate.console.KnownConfigurations$1.queryPageCreated(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.access$5(Unknown Source)
at org.hibernate.console.ConsoleConfiguration$3.execute(Unknown Source)
at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(Unknown Source)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.execute(Unknown Source)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.run(Unknown Source)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.hibernate.eclipse.console.actions.ExecuteHQLAction.runWithEvent(Unknown Source)
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:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 Nov 11, 2005 1:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
apparently Bilingual is not mapped in your console configuration.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 6:58 am 
Newbie

Joined: Wed Nov 09, 2005 9:07 pm
Posts: 8
max wrote:
apparently Bilingual is not mapped in your console configuration.


I thought I already did that. I gave it the path to the class files. I checked use EJB3. What am I missing to make this map?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 7:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
we dont support auto discovery in hibernate console.

you need to list them in the cfg.xml file.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 8:48 am 
Newbie

Joined: Wed Nov 09, 2005 9:07 pm
Posts: 8
max wrote:
we dont support auto discovery in hibernate console.

you need to list them in the cfg.xml file.


Thanks. Is it on your feature list? Obviously, specifying mappings separately like this defeats the whole purpose of EJB3.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 9:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Yes its on the feature list, but requires a full entitymanager which i'm hesitant to add....maybe i should just auto list classes that has a @Entity tag...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 9:46 am 
Newbie

Joined: Wed Nov 09, 2005 9:07 pm
Posts: 8
max wrote:
Yes its on the feature list, but requires a full entitymanager which i'm hesitant to add....maybe i should just auto list classes that has a @Entity tag...


Well, you know better than I what's required for implementation, but EJB3 obsoletes external mapping files for most cases, and I think *way* more people will use the tool if this is supported. Might be worth throwing out a poll.

Thanks for your help.

Clay


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.