-->
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: 'hibernate.dialect' must be set when no Connection available
PostPosted: Fri May 28, 2010 9:53 pm 
Newbie

Joined: Sat Mar 06, 2010 1:19 pm
Posts: 8
Hello,

I'm facing this problem, and i didn't find any other case on the internet.What could it be?
It's strange because it happens only sometimes.

Code:
Caused by: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection available
   at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:107)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:142)
   at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
   at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)


Top
 Profile  
 
 Post subject: Re: 'hibernate.dialect' must be set when no Connection available
PostPosted: Mon Jun 14, 2010 6:56 pm 
Newbie

Joined: Sat Mar 06, 2010 1:19 pm
Posts: 8
This error was throwed because I was using the configuration programatically...
Now I'm configuring the session factory with a xml configuration. It's right now.

But Why?? Why this error is throwed using the configuration programatically??
Is it a hibernate bug?


Top
 Profile  
 
 Post subject: Re: 'hibernate.dialect' must be set when no Connection available
PostPosted: Fri Feb 25, 2011 4:52 pm 
Newbie

Joined: Fri Feb 25, 2011 4:37 pm
Posts: 2
I got the same error recently and can't find the solution so far.


Top
 Profile  
 
 Post subject: Re: 'hibernate.dialect' must be set when no Connection available
PostPosted: Fri Feb 25, 2011 4:55 pm 
Newbie

Joined: Fri Feb 25, 2011 4:37 pm
Posts: 2
We are out of luck. A ticket has been opened but is not closed:
https://issues.jboss.org/browse/JBIDE-6140


Top
 Profile  
 
 Post subject: Re: 'hibernate.dialect' must be set when no Connection available
PostPosted: Tue Sep 27, 2011 6:23 am 
Newbie

Joined: Tue Sep 27, 2011 6:21 am
Posts: 1
I was having the same error, my code to create session was as below
AnnotationConfiguration cfg = new AnnotationConfiguration()

annotedSessionFactory = cfg.buildSessionFactory();

Below is the modified code which solved the error

AnnotationConfiguration cfg = new AnnotationConfiguration().configure();
//cfg.addAnnotatedClass(hello.Message.class);
annotedSessionFactory = cfg.buildSessionFactory();


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.