This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes [Hibernate + JBoss] How to create a session factory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate + JBoss] How to create a session factory" Watch "[Hibernate + JBoss] How to create a session factory" New topic
Author

[Hibernate + JBoss] How to create a session factory

Luciano Queiroz
Ranch Hand

Joined: Feb 04, 2002
Posts: 172
Hi guys!

I'm trying to use Hibernate, but found some problems.
When I try to open the session for the first time, Hibernate aparently creates the session, maps the HBMs, but then it returns an error.
Am I missing any configuration in JBoss???
My code is as follows:


InitialContext initialContext = new InitialContext();
SessionFactory sessionFactory = (SessionFactory) initialContext.lookup( sessionFactoryJndiName );
Session session = sessionFactory.openSession();



09:23:48,657 INFO [Configuration] Configuration resource: /organisation.hibernate.cfg.xml
09:23:50,625 INFO [Configuration] Configured SessionFactory: /hibernate/organisationSessionFactory

[AbstractPasswordCredentialLoginModule] The ConnectionManager mbean: jboss.jca:service=LocalTxCM,name=DefaultDS specified in a ConfiguredIdentityLoginModule could not be found. ConnectionFactory will be unusable!


<b>Luciano Queiroz</b><br/>
 Brazil<br/>
 <i>SCJP 1.2, SCWCD, IBM 141, IBM 483, SCJP 1.4, IBM 484, IBM 287, SCBCD, SCEA, SCJP 5.0, SCJP 6.0, SCWCD 5</i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Hibernate + JBoss] How to create a session factory