-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate.configurations.xml and empty schema
PostPosted: Wed Mar 28, 2012 2:42 pm 
Newbie

Joined: Wed Mar 28, 2012 1:55 pm
Posts: 3
Hi!

I'm getting started to work with hibernate but i have a problem in which i've spent several days and i'm still get stuck. I hope some of you can help me. :)

I'm using hibernate tools for getting start and i want to create my POJO's classes from my database mysql. So, according to the reference guide ( http://docs.jboss.org/tools/2.0.0.GA/hibernatetools/en/html_single/index.html) and i manage to create the hibernate configuracion file ( .cfg.xml ) and after that the hibernate console configuration. In spite of the fact that it seems all is ok, when i try to examine the configuration in the hibernate configuration view, if i expand the database node, i don't get any error but the database node stays empty. In theory, it should show up like in reference guid, with the database which the user has permissions. I can see when i click the node how the message pending appears and inmediately dissapears but nothing else is hook in the node.

I've been careful about including the driver for connecting to mysql database.

I'm desperate because i don't get any error message but it doesn't work.

Here my hibernate configuration file.

<?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 name="factorySession">
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">prueba</property>
<property name="hibernate.connection.username">prueba</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
</session-factory>
</hibernate-configuration>

Sorry for my english and thanks for everything!

David.


Top
 Profile  
 
 Post subject: Re: Hibernate.configurations.xml and empty schema
PostPosted: Wed Mar 28, 2012 3:09 pm 
Newbie

Joined: Wed Mar 28, 2012 1:55 pm
Posts: 3
Solved.

I added all the lib related with hibernate according another example project and it already works.


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