-->
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.  [ 6 posts ] 
Author Message
 Post subject: Application initialization
PostPosted: Sun Jan 04, 2004 10:35 am 
Newbie

Joined: Sun Jan 04, 2004 10:24 am
Posts: 3
Location: Brasil
Hello. I'm having problems when initializing my application. I'm using Hibernate 2 and HSQLDB (hipersonic db). Things seems to go well but, when it displays the message:

INFO: Use scrollable result sets: true

it stops and does nothing. What it should be? A piece (that might be useful) of the code of the application files comes below. Thanks.

------hibernate.properties-------
hibernate.dialect net.sf.hibernate.dialect.HSQLDialect
hibernate.connection.driver_class org.hsqldb.jdbcDriver
hibernate.connection.username sa
hibernate.connection.password
hibernate.connection.url jdbc:hsqldb:test
hibernate.connection.pool_size 5

-----class mapping------
<?xml version="1.0"?>
<!DOCTYPE
hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="Amigo" table="amigos">
<id name="nome" column="nome" type="string">
<generator class="assigned"/>
</id>
<property name="endereco" type="string"/>
<property name="telefone" column="fone" type="string"/>
<property name="celular" column="cel" type="string"/>
<property name="email" type="string"/>
<property name="nascimento" type="date"/>
</class>
</hibernate-mapping>

-----java class for initializing--------
public AmigoDAO() throws Exception {
Configuration cfg = new Configuration().addFile("Amigo.hbm.xml");
SessionFactory factory = cfg.buildSessionFactory(); // IT STOPS HERE
}

_________________
Pablo Faria
Student and Researcher in Computer Sciences
Musician too.
Personal website: www.tupinikim.org


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 04, 2004 2:13 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Set log and try-catch the buildSessionFactory.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: logging
PostPosted: Sat Jan 10, 2004 5:15 pm 
Newbie

Joined: Sun Jan 04, 2004 10:24 am
Posts: 3
Location: Brasil
Ok, I did it. With LOG4J I could isolate the problem and, for some reason I don't understand, it stops and keeps waiting indefinetely at the point bellow:

[file "SessionFactoryImpl.java" at hibernate source files directory]

class constructor SessionFactoryImpl(...) partial code:
[...]

//Persisters:

log.info("persisters loop");
Iterator iter;

classPersisters = new HashMap();
classPersistersByName = new HashMap();
iter = cfg.getClassMappings();
while ( iter.hasNext() ) {
PersistentClass model = (PersistentClass) iter.next();
ClassPersister cp = PersisterFactory.create(model, this); // problem
classPersisters.put( model.getPersistentClass(), cp );
classPersistersByName.put( model.getName(), cp );
}

[...]

What it could be? I did rebuild the entire hibernate2.jar file, but nothing changed.

_________________
Pablo Faria
Student and Researcher in Computer Sciences
Musician too.
Personal website: www.tupinikim.org


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 10, 2004 5:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try using your debugger and step through the code to find where it locks up.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 8:20 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
And check your mapping, should be something wrong in it.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: thanks
PostPosted: Tue Jan 13, 2004 10:21 am 
Newbie

Joined: Sun Jan 04, 2004 10:24 am
Posts: 3
Location: Brasil
I'd like to thank you both, who tried to help me. I finally discovered the error and, as almost always happens with begginers, it was only some missing get and set methods. Anyway, I think hibernate could throw some message warning it. Well, that's it.

See you!

_________________
Pablo Faria
Student and Researcher in Computer Sciences
Musician too.
Personal website: www.tupinikim.org


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