Hibernate Session Factory Is Not Registered In JNDI Tree Of Manager Server throwing: java.rmi.UnmarshalException (Doc ID 1345333.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 9.2 to 10.3.5
Information in this document applies to any platform.

Symptoms


When deploying an EAR application on the Managed server the deployment fails with the following exception:
javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Failed to load class org.hibernate.impl.SessionFactoryImpl]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:470)
...
...
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Failed to load class org.hibernate.impl.SessionFactoryImpl
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
... 45 more
Caused by: java.lang.ClassNotFoundException: Failed to load class org.hibernate.impl.SessionFactoryImpl
at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:208)
at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:135)
at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:305)
...
...

The application had Hibernate Session Beans that requires session but it gave Null Pointer exception.

The same application has been successfully deployed and was running without any issues on the AdminServer.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms