tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ManojS <manoj_...@yahoo.co.in>
Subject javax.naming.OperationNotSupportedException with Hibernate 3 and Openejb 3.0
Date Fri, 13 Jun 2008 07:02:40 GMT

Hello,
Does anyone had the following problem while working with openejb and
hibernate ?

When I run my hibernate application in openejb (openejb 3.0 war deployed in
tomcat 5.5, java 1.5, hibernate 3) it is showing an error while loading the
hibernate configuration with following lines of code.



> new Configuration().setInterceptor( new MyHibernateInterceptor()
> ).configure( "shoppingmodule-hibernate.cfg.xml" ).buildSessionFactory();
> 

The error log is as follows:



> INFO - Factory name: shoppingmodule/hibernate/HibernateFactory
> INFO - JNDI InitialContext properties:{}
> INFO - Creating subcontext: shoppingmodule
> INFO - Creating subcontext: hibernate
> WARN - Could not bind factory to JNDI
> javax.naming.OperationNotSupportedException
> 	at
> org.apache.openejb.core.ivm.naming.IvmContext.rebind(IvmContext.java:283)
> 	at
> org.apache.openejb.core.ivm.naming.IvmContext.rebind(IvmContext.java:287)
> 	at org.hibernate.util.NamingHelper.bind(NamingHelper.java:74)
> 	at
> org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
> 	at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:290)
> 	at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
> 

My "shoppingmodule-hibernate.cfg.xml" file looklike as follows:



> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE hibernate-configuration PUBLIC
> "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
> <hibernate-configuration>
>   <session-factory name="shoppingmodule/hibernate/HibernateFactory">
>   <property name="show_sql">true</property>
>   <property name="connection.datasource">java:comp/env/MySqlDS</property>
>   <property
> name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
>   <property
> name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
>   <property
> name="transaction.manager_lookup_class">org.apache.openejb.hibernate.TransactionManagerLookup</property>
>   <property name="connection.release_mode">auto</property>
>   <property name="transaction.flush_before_completion">true</property>
>   <property name="transaction.auto_close_session">true</property>
>         <mapping resource="..." />
>         ... All my resource mappigs are coming here ...]
>   </session-factory>
> </hibernate-configuration>
> 

Thanks in advance for any help/solutions.
-Manoj.

-- 
View this message in context: http://www.nabble.com/javax.naming.OperationNotSupportedException-with-Hibernate-3-and-Openejb-3.0-tp17816372p17816372.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message