Bind an object under the name HibernateSessionFactory Error

 

If you are getting errors like below in logs while deploying application or in general then try below mentioned steps to make it working.

<14-Dec-2010 10:41:01 CET> <error> <cluster> <BEA-000123> <Conflict start: Youtried to bind an object under the name in the JNDI tree HibernateSessionFactory. Theobject from 4004698486404642S: hrofserver01: ckm : is not HPOF01_1-clusterable, andyou have tried to bind more than two ounces or more servers from. Such objects canonly be deployed from one server.>
<14-Dec-2010 10:41:01 CET> <error> <cluster> <BEA-000123> <Conflict start: Youtried to bind an object under the name in the JNDI tree HibernateSessionFactory.From the object-2465366582483676621S: hrofserver02: [7010.7010, -1, -1, -1, -1, -1]ckm: HPOF02_1 is non-clusterable, and you have tried to bind more than two ounces ormore from servers. Such objects can only be deployed from one server.> ”

OR error like below in server logs:

####<Nov 12, 2011 8:34:05 AM CET> <Error> <Cluster> <sun879> <M2> <[ACTIVE] ExecuteThread: ‘5’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <> <> <> <1289918045285> <BEA-000123> <Conflict start: You tried to bind an object under the name HibernateSessionFactory in the JNDI tree. The object from 4449434054399910424S:hpof.Server.com:[8001,8001,-1,-1,-1,-1,-1]:hpof.Server.com:8001,hpof1.Server.com:8001:MYEAPAPP:M2 is non-clusterable, and you have tried to bind more than once from two or more servers. Such objects can only be deployed from one server.>
In persistance.xml when the below property is added you will face this issue

<property name="hibernate.session_factory_name">hibernate.SessionFactory</property>
<!-- JNDI bound Session Factory Name -->

Unlike EJB entity beans, Hibernate itself is not clusterable so your application may be doing a JNDI lookup on a cluster JNDI tree which does not exist,
so it will only be pinned to one of your server as stated in the log message.

Please add the below property to persistance.xml to resolve this issue.

<property name="hibernate.jndi.weblogic.jndi.replicateBindings">false</property>

<!-- because SessionFactory is not clusterable -->

By adding this option, there won’t be any cluster communication on the hibernate object and the cluster features won’t be activated.

After updating the xml you have to clean the tmp folder and cache folder and need to do a complete bounce to make it working.

In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply