-->
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.  [ 3 posts ] 
Author Message
 Post subject: No database selected
PostPosted: Tue Sep 01, 2009 3:47 pm 
Newbie

Joined: Tue Sep 01, 2009 3:39 pm
Posts: 1
When running "Run SchemaExport" I'm getting am "No database selected" error. My Configuration and Session Factory sections build just fine.

An ideas on what I missing?

My hibernate.cfg.xml file follows:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/nagios</property>
<property name="hibernate.connection.username">nagios</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: No database selected
PostPosted: Wed Sep 02, 2009 1:42 pm 
Newbie

Joined: Wed Sep 02, 2009 1:35 pm
Posts: 4
You dont have anything between <property name="hibernate.connection.password"></property> is it supposed to be like that?

_________________
AidenWin

Foreclosure Canada


Top
 Profile  
 
 Post subject: Re: No database selected
PostPosted: Wed Sep 16, 2009 5:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
blank passwords should be fine.

But I assume this is mysql related error and then its a matter of ensuring the URL is correct.

Can you connect with that exact same jdbc url outside of hibernate and execute queries ?

_________________
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.  [ 3 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.