-->
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.  [ 5 posts ] 
Author Message
 Post subject: Could not find a SessionFactory
PostPosted: Tue Jan 31, 2006 1:55 pm 
Newbie

Joined: Tue Jan 31, 2006 1:40 pm
Posts: 3
Hit to all!

We are developing a J2EE application using Sun AS and
Hibernate as persistence layer. We are trying to use Hibernate with a Swing user interface but when we try to get the session factory via JNDI we get this exception:


Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: hibernate/SessionFactory
at org.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:622)
... 25 more

This is the Hibernate configuration file:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="session_factory_name">hibernate/SessionFactory</property>
<property name="connection.datasource">jdbc/ItziarDataSource__pm</property>
<property name="connection.release_mode">auto</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="default_batch_fetch_size">16</property>

<property name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.SunONETransactionManagerLookup</property>
<property name="jta.UserTransaction">UserTransaction</property>
<property name="transaction.flush_before_completion">true</property>
<property name="transaction.auto_close_session">true</property>

...

We have created a custom resource into the Sun AS:

JNDI Name: hibernate/SessionFactory

A unique identifier Required Field Resource Type: hibernate.SessionFactory

Required Field Factory Class: org.hibernate.impl.SessionFactoryObjectFactory
Factory class for resource; implements javax.naming.spi.ObjectFactory

Description:

Status: Enabled



...



When we start the server obtain this log:

...

[#|2006-01-31T16:56:21.737+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,736 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
|#]

[#|2006-01-31T16:56:21.739+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,739 DEBUG SessionFactoryObjectFactory:76 - registered: 2c9a80c409212dae0109212dc7660000 (hibernate/SessionFactory)
|#]

[#|2006-01-31T16:56:21.740+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,740 INFO SessionFactoryObjectFactory:86 - Factory name: hibernate/SessionFactory
|#]

[#|2006-01-31T16:56:21.741+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,740 INFO NamingHelper:26 - JNDI InitialContext properties:{}
|#]

[#|2006-01-31T16:56:21.741+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,741 DEBUG NamingHelper:48 - binding: hibernate/SessionFactory
|#]

[#|2006-01-31T16:56:21.867+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,865 DEBUG SessionFactoryImpl:659 - serializing: 2c9a80c409212dae0109212dc7660000
|#]

[#|2006-01-31T16:56:21.949+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,948 DEBUG SessionFactoryImpl:661 - serialized
|#]

[#|2006-01-31T16:56:21.978+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,977 DEBUG SessionFactoryImpl:654 - deserializing
|#]

[#|2006-01-31T16:56:21.984+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,983 DEBUG SessionFactoryImpl:656 - deserialized: 2c9a80c409212dae0109212dc7660000
|#]

[#|2006-01-31T16:56:21.985+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,984 DEBUG SessionFactoryImpl:614 - Resolving serialized SessionFactory
|#]

[#|2006-01-31T16:56:21.985+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,985 DEBUG SessionFactoryObjectFactory:145 - lookup: uid=2c9a80c409212dae0109212dc7660000
|#]

[#|2006-01-31T16:56:21.986+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,986 DEBUG SessionFactoryImpl:629 - resolved SessionFactory by uid
|#]

[#|2006-01-31T16:56:21.987+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,987 DEBUG NamingHelper:76 - Bound name: hibernate/SessionFactory
|#]

[#|2006-01-31T16:56:21.988+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,987 INFO SessionFactoryObjectFactory:91 - Bound factory to JNDI name: hibernate/SessionFactory
|#]

[#|2006-01-31T16:56:21.988+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,988 WARN SessionFactoryObjectFactory:101 - InitialContext did not implement EventContext
|#]

[#|2006-01-31T16:56:21.989+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,989 DEBUG SessionFactoryImpl:262 - instantiated session factory
|#]

[#|2006-01-31T16:56:21.989+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,989 DEBUG SessionFactoryImpl:269 - obtaining JTA TransactionManager
|#]

[#|2006-01-31T16:56:21.990+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:21,990 INFO NamingHelper:26 - JNDI InitialContext properties:{}
|#]

[#|2006-01-31T16:56:22.002+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|16:56:22,001 INFO SessionFactoryImpl:379 - Checking 0 named queries

...


But when we try to obtain the SessionFactory via JNDI with this
code:


if (null == configFile) {
if (null == sessionFactory){

try{

sessionFactory = (SessionFactory) new InitialContext().lookup(SESSION_FACTORY_JNDI);

return sessionFactory;

}catch(NamingException ne){
ne.printStackTrace();
throw new RuntimeException("The session factory has not been initialized (or an error occured during initialization): " + ne.getMessage());
}


....

we obtain:

Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: hibernate/SessionFactory
at org.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:622)
... 25 more
...

What's wrong? Please help us.

Thank you very much


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 2:51 pm 
Beginner
Beginner

Joined: Tue Jun 14, 2005 12:14 pm
Posts: 37
Where you have <session-factory>, add in:

<session-factory name="java:/hibernate/SessionFactory">

That should register the hibernate sessionfactory under the above name in JNDI.

Liem


Top
 Profile  
 
 Post subject: Thank you It doesn't works
PostPosted: Wed Feb 01, 2006 6:35 am 
Newbie

Joined: Tue Jan 31, 2006 1:40 pm
Posts: 3
Thank you for your reply, we change this but it doesn't works. The JNDI names in Sun AS dont start with java:, and if we change the session factory name to java:/hibernate/SessionFactory, the app server responds with:

javax.naming.NamingException: java:comp namespace cannot be modified

Then we change the hibernate configuration file to:


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="hibernate/SessionFactory">
<!--
<property name="session_factory_name">hibernate/SessionFactory</property>
-->
<property name="connection.datasource">jdbc/ItziarDataSource__pm</property>
<property name="connection.release_mode">auto</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="default_batch_fetch_size">16</property>

<property name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.SunONETransactionManagerLookup</property>
<property name="jta.UserTransaction">UserTransaction</property>
<property name="transaction.flush_before_completion">true</property>
<property name="transaction.auto_close_session">true</property>

The SessionFactory bounds to the JNDI fine:



[#|2006-02-01T11:18:33.431+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,430 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
|#]

[#|2006-02-01T11:18:33.434+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,433 DEBUG SessionFactoryObjectFactory:76 - registered: 2c9a80c409251ec60109251ede540000 (hibernate/SessionFactory)
|#]

[#|2006-02-01T11:18:33.435+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,434 INFO SessionFactoryObjectFactory:86 - Factory name: hibernate/SessionFactory
|#]

[#|2006-02-01T11:18:33.435+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,435 INFO NamingHelper:26 - JNDI InitialContext properties:{}
|#]

[#|2006-02-01T11:18:33.436+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,435 DEBUG NamingHelper:48 - binding: hibernate/SessionFactory
|#]

[#|2006-02-01T11:18:33.561+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,559 DEBUG SessionFactoryImpl:659 - serializing: 2c9a80c409251ec60109251ede540000
|#]

[#|2006-02-01T11:18:33.641+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,640 DEBUG SessionFactoryImpl:661 - serialized
|#]

[#|2006-02-01T11:18:33.675+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,674 DEBUG SessionFactoryImpl:654 - deserializing
|#]

[#|2006-02-01T11:18:33.681+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,681 DEBUG SessionFactoryImpl:656 - deserialized: 2c9a80c409251ec60109251ede540000
|#]

[#|2006-02-01T11:18:33.682+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,682 DEBUG SessionFactoryImpl:614 - Resolving serialized SessionFactory
|#]

[#|2006-02-01T11:18:33.683+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,682 DEBUG SessionFactoryObjectFactory:145 - lookup: uid=2c9a80c409251ec60109251ede540000
|#]

[#|2006-02-01T11:18:33.684+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,683 DEBUG SessionFactoryImpl:629 - resolved SessionFactory by uid
|#]

[#|2006-02-01T11:18:33.685+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,684 DEBUG NamingHelper:76 - Bound name: hibernate/SessionFactory
|#]

[#|2006-02-01T11:18:33.685+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,685 INFO SessionFactoryObjectFactory:91 - Bound factory to JNDI name: hibernate/SessionFactory
|#]


[#|2006-02-01T11:18:33.686+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,686 WARN SessionFactoryObjectFactory:101 - InitialContext did not implement EventContext
|#]

[#|2006-02-01T11:18:33.687+0100|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=10;|11:18:33,687 DEBUG SessionFactoryImpl:262 - instantiated session factory
|#]


But when we try to lookup the session factory from outside the applicaction server with this code:



import javax.naming.InitialContext;
import javax.naming.NamingException;

/**
* @author ivan
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Testing {

protected static String SESSION_FACTORY_JNDI = "hibernate/SessionFactory";

public static void main(String[] args) {

try{

Object obj = new InitialContext().lookup(SESSION_FACTORY_JNDI);

}catch(NamingException ne){
ne.printStackTrace();
throw new RuntimeException("The session factory has not been initialized (or an error occured during initialization): " + ne.getMessage());
}
}
}

We obtain:


01-feb-2006 11:21:23 com.sun.corba.ee.spi.logging.LogWrapperBase doLog
INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/2968"
01-feb-2006 11:21:28 org.hibernate.impl.SessionFactoryObjectFactory getInstance
ADVERTENCIA: Not found: 2c9a80c409251ec60109251ede540000
01-feb-2006 11:21:28 org.hibernate.impl.SessionFactoryObjectFactory getNamedInstance
ADVERTENCIA: Not found: hibernate/SessionFactory
01-feb-2006 11:21:28 com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
ADVERTENCIA: "IOP00810211: (MARSHAL) Exception from readValue on ValueHandler in CDRInputStream"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6674)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:559)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:739)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:226)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:422)
at javax.rmi.CORBA.Util.readAny(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:133)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:290)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.sagitel.itziar.presentation.desktop.Testing.main(Testing.java:26)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:321)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:403)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:319)
... 20 more
Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: hibernate/SessionFactory
at org.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:622)
... 25 more
01-feb-2006 11:21:28 com.sun.enterprise.naming.SerialContext lookup
GRAVE: NAM0004: Exception during name lookup : {0}
java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:290)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.sagitel.itziar.presentation.desktop.Testing.main(Testing.java:26)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6674)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:559)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:739)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:226)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:422)
at javax.rmi.CORBA.Util.readAny(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:133)
... 5 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:321)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:403)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:319)
... 20 more
Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: hibernate/SessionFactory
at org.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:622)
... 25 more
javax.naming.CommunicationException: serial context communication ex [Root exception is java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe]
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:328)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.sagitel.itziar.presentation.desktop.Testing.main(Testing.java:26)
Caused by: java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.lookup(_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:290)
... 2 more
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:6674)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1045)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:255)
at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:269)
at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:559)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:739)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:226)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:422)
at javax.rmi.CORBA.Util.readAny(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:251)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:424)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:133)
... 5 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:321)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:403)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.corba.ee.impl.io.ObjectStreamClass.readResolve(ObjectStreamClass.java:319)
... 20 more
Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: hibernate/SessionFactory
at org.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:622)
... 25 more
Exception in thread "main" java.lang.RuntimeException: The session factory has not been initialized (or an error occured during initialization): serial context communication ex
at org.sagitel.itziar.presentation.desktop.Testing.main(Testing.java:30)


and we don't know what is the problem

Than you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 9:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
The thing Hibernate binds into JNDI is not remotable.


Top
 Profile  
 
 Post subject: Then how I can load a lazy entity from outside of the AS
PostPosted: Wed Feb 01, 2006 11:45 am 
Newbie

Joined: Tue Jan 31, 2006 1:40 pm
Posts: 3
Thank you. Then how can a client load a lazy entity from outside of the application server, a Swing Application for example?


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