-->
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.  [ 5 posts ] 
Author Message
 Post subject: Issues with Hibernate Console and CreateSessionFactory
PostPosted: Thu May 05, 2005 6:23 pm 
Newbie

Joined: Thu May 05, 2005 4:53 pm
Posts: 11
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.2

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-05-05 13:42:51.117
!MESSAGE entity class not found: org.rev.RuleRange
!STACK 0
org.hibernate.MappingException: entity class not found: org.rev.RuleRange
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:147)
at org.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:175)
at org.hibernate.persister.BasicEntityPersister.<init>(BasicEntityPersister.java:352)
at org.hibernate.persister.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:95)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:44)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:196)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1031)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:221)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.console.ConsoleConfiguration.initSessionFactory(ConsoleConfiguration.java:219)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:51)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:47)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
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$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
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:228)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
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:315)
at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
at org.eclipse.core.launcher.Main.run(Main.java:942)
at org.eclipse.core.launcher.Main.main(Main.java:926)
Caused by: java.lang.ClassNotFoundException: org.rev.RuleRange

Name and version of the database you are using:
MS SQL Server 2000

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

I am not sure what's going wrong, is it looking at the right CLASSPATH, the .class file eexists and in the right location.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 6:25 pm 
Newbie

Joined: Thu May 05, 2005 4:53 pm
Posts: 11
Forgot to add I am using Eclipse 3.1 and the latest beta tools set.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 7:12 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
or you haven't pojo for org.rev.RuleRange or you need add projects bin directory in config classpath (muts add jdbc driver and project output directory)

regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 7:25 pm 
Newbie

Joined: Thu May 05, 2005 4:53 pm
Posts: 11
I went past that problem but now when I try to get the mapped entities for the particular configuration in the console it throws me this exception

2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-05-05 16:18:56.632
!MESSAGE [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'from'.
!STACK 0
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'from'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:108)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1109)
at org.hibernate.loader.Loader.doQuery(Loader.java:349)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:195)
at org.hibernate.loader.Loader.doList(Loader.java:1360)
at org.hibernate.loader.Loader.list(Loader.java:1343)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:872)
at org.hibernate.impl.SessionImpl.find(SessionImpl.java:973)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at org.hibernate.console.HQLQueryPage.getList(HQLQueryPage.java:30)
at org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(QueryPageViewer.java:74)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:765)
at org.eclipse.jface.viewers.TableViewer.getRawChildren(TableViewer.java:1046)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:707)
at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:822)
at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:762)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:712)
at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:701)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1171)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1108)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1169)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1128)
at org.eclipse.jface.viewers.TableViewer.inputChanged(TableViewer.java:662)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:248)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1324)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:168)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:147)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:105)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:78)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:47)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:52)
at javax.swing.AbstractListModel.fireIntervalAdded(Unknown Source)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50)
at org.hibernate.console.KnownConfigurations$3.queryPageCreated(KnownConfigurations.java:167)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:265)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:246)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$5.run(KnownConfigurationsView.java:143)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$3.doubleClick(KnownConfigurationsView.java:91)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:637)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1021)
at org.eclipse.core.runtime.Platform.run(Platform.java:757)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:40)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:635)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:857)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:964)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:219)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:216)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:275)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
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:228)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
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:315)
at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
at org.eclipse.core.launcher.Main.run(Main.java:942)
at org.eclipse.core.launcher.Main.main(Main.java:926)


I am on SQL Server 2000 and it seems the SQL generated by the tool is incorrect. Is this a known issue?


Top
 Profile  
 
 Post subject: Issues with Hibernate Console and SQL Server 2000
PostPosted: Thu May 05, 2005 7:46 pm 
Newbie

Joined: Thu May 05, 2005 4:53 pm
Posts: 11
Changing the subject


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