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