-->
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.  [ 3 posts ] 
Author Message
 Post subject: Not binding factory to JNDI, no JNDI name configured
PostPosted: Wed Feb 01, 2006 4:28 pm 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
Hibernate version: 3.1

I'm in serious trouble with a simple web application deployed under JBoss 3.2.3 / Tomcat 4.1.

The application is packed in a EAR file with the following structure:
Code:
App.EAR
   META-INF
      application.xml
      jboss-app.xml
   WebApp.WAR
      WEB-INF
         jboss-web.xml
         web.xml
         classes
         lib


Inside WEB-INF/classes my hibernate.cfg.xml refferes to a JNDI data source:
Code:
<property name="hibernate.connection.datasource">java:/ORA_PPO</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>   


When SessionFactory is built the following exception occurs:
Code:
4:44:08,965 INFO  [SessionFactoryImpl] building session factory
  14:44:18,128 INFO  [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
  14:44:18,128 INFO  [NamingHelper] JNDI InitialContext properties:{}
  14:44:18,148 INFO  [STDOUT] java.lang.ClassCastException
  14:44:18,158 INFO  [STDOUT]    at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:23)
  14:44:18,158 INFO  [STDOUT]    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:301)
  14:44:18,158 INFO  [STDOUT]    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
  14:44:18,158 INFO  [STDOUT]    ...


The deployed data source file contains:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<datasources>
   <local-tx-datasource>
      <jndi-name>ORA_PPO</jndi-name>     <connection-url>jdbc:oracle:thin:@127.0.0.1:1521:database</connection-url>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <user-name>username</user-name>
      <password>password</password>
   </local-tx-datasource>
</datasources>


Could it be some classloader issue?

Am I forgetting something?

Any suggestions will be very welcome.

Thanks in advance,
Gabriel C. Oliveira


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 5:11 am 
Newbie

Joined: Wed Aug 03, 2005 11:04 am
Posts: 10
Are you deploying multiple application in one JBoss instance?

Then have a look here http://jira.jboss.com/jira/browse/JBAS-2276.

Anyway, JBoss 3.2.3 is pretty old. There is already a JBoss 3.2.8 afaik. Consider upgarding to or using JBoss 4.0.3 with an already included hibernate-deployer (har-Archives).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 8:20 am 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
Gropi wrote:
Are you deploying multiple application in one JBoss instance?
Then have a look here http://jira.jboss.com/jira/browse/JBAS-2276.

Yes, but the application I mentioned is the only one with Hibernate. Others use only the data source.

The JIRA issue didn't help, for it addresses only the multiple Hibernate applications scenario.

Gropi wrote:
Anyway, JBoss 3.2.3 is pretty old. There is already a JBoss 3.2.8 afaik. Consider upgarding to or using JBoss 4.0.3 with an already included hibernate-deployer (har-Archives).

I know, but unfortunately I have to deploy such application in my customer's production environment which uses only JBoss 3.2.3. If I had an option I would use Java 5 and JBoss 4.


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