This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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

[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/>
 <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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: [Hibernate + JBoss] How to create a session factory
It's not a secret anymore!