-->
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.  [ 2 posts ] 
Author Message
 Post subject: Unable to bind SessionFactory to JNDI
PostPosted: Fri Sep 17, 2004 8:22 am 
Newbie

Joined: Thu Sep 16, 2004 6:46 am
Posts: 3
Hi,

My sessionfactory does not get bound to the JNDI tree. The exception that i am getting is OperationNotSupportedException. And the message is "rebind not allowed in a ReadOnlyContext". This i found after debugging the hibernate source code. I am attaching the hibernate.cfg.xml file. Can you let me know how to resolve the problem

Thanks,
Mrigank


Mapping documents:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory
name="java:comp/env/MySessionFactory">
<!-- properties -->
<property name="connection.datasource">jdbc/myDataSource</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="jndi.url">t3://localhost:7001</property>
<property name="transaction.manager_lookup_class">
net.sf.hibernate.transaction.WeblogicTransactionManagerLookup
</property>
<property name="transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory
</property>

<!-- mapping files -->
<mapping resource="Item.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 19, 2004 2:44 am 
Regular
Regular

Joined: Sat Aug 28, 2004 4:15 pm
Posts: 61
If you search this forum for posts about weblogic and hibernate you'll see in several places how people have named their session factory. Try using one of those namign styles and you should have much better luck.



Joe

_________________
Joe W


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