-->
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.  [ 1 post ] 
Author Message
 Post subject: using generated home DAO's
PostPosted: Fri Nov 29, 2013 8:54 pm 
Newbie

Joined: Fri Nov 29, 2013 8:47 pm
Posts: 1
hi everyone is there any full example of how use those generated "home" DAO with eclipse plugin? I tried implementing it but have an error with the name of session factory despite I have

<session-factory name="SessionFactory">

on my hibernate.cfg.xml (been searchong a lot about this exception... and finally reach out that session name has to be registered on a server... but didn't find out how)

those generated DAO's with the method ".lookup..." (to get the session) doesn't seems to work... could someone please help me with this? thanks!

just in case you'd like the details:

Caused by: java.lang.IllegalStateException: Could not locate SessionFactory in JNDI

this is hibernate.cfg.xml

<hibernate-configuration>
<session-factory name="SessionFactory">
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/web3</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="current_session_context_class">thread</property>
<property name="javax.persistence.validation.mode">none</property>
<property name="hibernate.connection.autocommit">false</property>
<mapping resource="domain/Tarjeta.hbm.xml"/>
<mapping resource="domain/DetVenta.hbm.xml"/>
<mapping resource="domain/Pizza.hbm.xml"/>
<mapping resource="domain/Venta.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.