-->
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.  [ 4 posts ] 
Author Message
 Post subject: JBOSS: Not binding factory to JNDI, no JNDI name configured
PostPosted: Tue Sep 07, 2004 12:38 am 
Beginner
Beginner

Joined: Fri Feb 06, 2004 6:59 am
Posts: 36
Location: S
My problem is really simple.

What I really want is to know what is the message on the log at this line means

01:18:26,453 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured

I am using a JNDI, it works fine, I provide only this properties file

hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.datasource=java:/jdbc/Cedipro
hibernate.show_sql=true
hibernate.cglib.use_reflection_optimizer=false

And I have a mysql-ds.xml at jboss deploy dir

I have a web.xml and jboss-web.xml file and they share the datasource fine.

The thing is that I get this message and the JNDI works fine, so what should be more implemented or what should not be.

Regards,

Ernani



[b]Hibernate version: 2.1.6[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() :
sessionFactory = cfg.buildSessionFactory();

session = sessionFactory.openSession();

session.connection().setTransactionIsolation(
Connection.TRANSACTION_READ_COMMITTED);

and session.close():

// checks if session is already connected.
if (session.isConnected()) {

// try to disconnect session
// and catches up all possbile exceptions.
try {
session.flush();
session.close();
} catch (HibernateException he) {
logger.error(he.getMessage());
}
}


[/b]

[b]Name and version of the database you are using:
Mysql 4.0[/b]

[b]Debug level Hibernate log excerpt:
01:18:24,531 INFO [Environment] Hibernate 2.1.6
01:18:24,531 INFO [Environment] loaded properties from resource hibernate.properties: {hibernate.cglib.use_reflection_optimizer=false, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.show_sql=true, hibernate.connection.datasource=java:/jdbc/Cedipro}
01:18:24,546 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Comissions.hbm.xml
01:18:24,781 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Comissions -> comissions
01:18:25,078 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Currency.hbm.xml
01:18:25,109 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Currency -> currency
01:18:25,109 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Person.hbm.xml
01:18:25,125 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Person -> person
01:18:25,140 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Person.personType -> person_type_person
01:18:25,171 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Users.hbm.xml
01:18:25,203 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Users -> users
01:18:25,203 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/PersonType.hbm.xml
01:18:25,250 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.PersonType -> person_type
01:18:25,250 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.PersonType.person -> person_type_person
01:18:25,250 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Products.hbm.xml
01:18:25,265 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Products -> products
01:18:25,281 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/Segments.hbm.xml
01:18:25,312 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.Segments -> segments
01:18:25,312 INFO [Configuration] Mapping resource: com/ejm/cedipro/hibernate/StockItems.hbm.xml
01:18:25,359 INFO [Binder] Mapping class: com.ejm.cedipro.hibernate.StockItems -> stock_items
01:18:25,375 INFO [Configuration] processing one-to-many association mappings
01:18:25,375 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Person.products -> products
01:18:25,375 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Person.comissions -> comissions
01:18:25,375 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Products.stockItems -> stock_items
01:18:25,375 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Segments.products -> products
01:18:25,375 INFO [Binder] Mapping collection: com.ejm.cedipro.hibernate.Segments.comissions -> comissions
01:18:25,375 INFO [Configuration] processing one-to-one association property references
01:18:25,375 INFO [Configuration] processing foreign key constraints
01:18:25,453 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.MySQLDialect
01:18:25,453 INFO [SettingsFactory] Maximim outer join fetch depth: 2
01:18:25,453 INFO [SettingsFactory] Use outer join fetching: true
01:18:25,468 INFO [NamingHelper] JNDI InitialContext properties:{}
01:18:25,484 INFO [DatasourceConnectionProvider] Using datasource: java:/jdbc/Cedipro
01:18:25,500 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
01:18:25,500 INFO [SettingsFactory] Use scrollable result sets: true
01:18:25,500 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): true
01:18:25,500 INFO [SettingsFactory] Optimize cache for minimal puts: false
01:18:25,500 INFO [SettingsFactory] echoing all SQL to stdout
01:18:25,500 INFO [SettingsFactory] Query language substitutions: {}
01:18:25,500 INFO [SettingsFactory] cache provider: net.sf.hibernate.cache.EhCacheProvider
01:18:25,515 INFO [Configuration] instantiating and configuring caches
01:18:25,828 INFO [SessionFactoryImpl] building session factory
[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 8:31 am 
Beginner
Beginner

Joined: Tue Jul 20, 2004 1:53 am
Posts: 43
Location: India
Please read about JNDI bound SessionFactory

_________________
Thanks,
Binil Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 10:41 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
sessionFactory = cfg.buildSessionFactory();

This line should look like while using jboss.
sessionFactory = (SessionFactory) ctx.lookup("java:/hibernate/SessionFactory");
But therefore you have to use a jboss with Hibernate built-in or create a sar file that will create a hibernate service (hibernate mbean). For this refer to these pages: http://www.jboss.org/wiki/Wiki.jsp?page=JBossHibernate and http://www.hibernate.org/66.html.

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Tue Sep 07, 2004 1:26 pm 
Beginner
Beginner

Joined: Fri Feb 06, 2004 6:59 am
Posts: 36
Location: S
Really Thanks for help,

I'd appreciate a lot.

Best wishes

_________________
Best Regards,
Ernani Joppert Pontes Martins


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