-->
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: Hibernate tool eclipse plug-in PostgreSql Dialect not Found
PostPosted: Sat Sep 03, 2005 1:32 pm 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
I have a PostgreSQL db and an Hibernate application over it.

I installed hibernate tool plung-in into eclipse 3.1 and I configured it
using Hibernate Console Configuration wizard. In classpath I didn't set Hibernates jars as the documentation raccomand.

When I try to create a Session Facory I have this Exception:

org.hibernate.HibernateException: Dialect class not found: net.sf.hibernate.dialect.PostgreSQLDialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:81)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1803)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:47)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:44)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.fetchDeferredChildren(LazyDatabaseSchemaWorkbenchAdapter.java:30)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

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

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 03, 2005 1:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
dont use hibernate 2 with a hibernate 3 tool

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Now I can't open HQL Scratchpad...
PostPosted: Sun Sep 04, 2005 4:07 am 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
max wrote:
dont use hibernate 2 with a hibernate 3 tool


Thanks for your tip; now I passed to Hibernate 3 using
org.hibernate.dialect.PostgreSQLDialect
and I can connect to Postgres.

But I have another exception:

java.lang.NoClassDefFoundError: org/springframework/beans/BeanWrapper
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317)
at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297)
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:163)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:43)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:114)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:410)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:219)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1126)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:209)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:71)
at org.hibernate.console.ConsoleConfiguration.initSessionFactory(ConsoleConfiguration.java:207)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:38)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:46)
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: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)

so I can't open HQL Scratchpad and I can't make HQL queries...
Where should I place Spring libs?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 4:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the console classpath would be a good place.

but why are your pojo's dependent on spring ? (just curious as i thought the pojos shouldnt be dependent on spring et.al.)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 4:42 am 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
Infact my POJO don't depend on spring....
(I don't use spring in this project)
I thought the Tools needed that library to format the output on a table.
Isn't it?


max wrote:
the console classpath would be a good place.

but why are your pojo's dependent on spring ? (just curious as i thought the pojos shouldnt be dependent on spring et.al.)


Top
 Profile  
 
 Post subject: SORRY!!!
PostPosted: Sun Sep 04, 2005 5:31 am 
Newbie

Joined: Sat Sep 03, 2005 1:04 pm
Posts: 12
I must correct myself...

I find a my imported library that It was linked wrongly to spring... I removed it and now all works.

Thanks very much sorry again

panks wrote:
Infact my POJO don't depend on spring....
(I don't use spring in this project)
I thought the Tools needed that library to format the output on a table.
Isn't it?


max wrote:
the console classpath would be a good place.

but why are your pojo's dependent on spring ? (just curious as i thought the pojos shouldnt be dependent on spring et.al.)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 6:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I promise you that the tools doesn't need any spring to format a table...

_________________
Max
Don't forget to rate


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.