• Post Reply Bookmark Topic Watch Topic
  • New Topic

[Hibernate + JBoss] How to create a session factory  RSS feed

 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!