-->
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.  [ 1 post ] 
Author Message
 Post subject: unable to get session using connection.datasource | WL 9.1
PostPosted: Thu Oct 12, 2006 11:19 am 
Newbie

Joined: Thu Oct 12, 2006 7:36 am
Posts: 1
Hi:
this is a basic question around obtaining a session with connection.datasource. I am having trouble getting session factory object for a connection datasource which is deployed on Weblogic 9.1

hibernate version: 3.1.3

Environment info:
Weblogic 9.1
Oracle 9.2
JDK 1.5


exact line of code where the exception is occuring:

SessionFactory mOTSSessionFactory = mOTSConfiguration.configure("hibernate.cfg.xml").buildSessionFactory();

Snippet of hibernate.cfg.xml:

<property name="connection.datasource">DS_NAME</property>
<property name="hibernate.jndi.weblogic.jndi.replicateBindings"> false</property>
<property name="hibernate.dialect"> org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.jdbc.batch_size">200</property>
<property name="jndi.url">t3://localhost:7001</property>
<property name="jndi.class"> weblogic.jndi.WLInitialContextFactory</property>
<property name="connection.pool_size">1</property>
<property name="current_session_context_class">thread</property>

Exception trace:
HibernateUtil :: Failed to build session factory

java.lang.ClassCastException: java.lang.Object

at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1534)

at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2172)

at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:396)

at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)

at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:225)

at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)

at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1907)

at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1942)

at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2203)

at weblogic.jdbc.common.internal.RmiDataSource_WLSkel.invoke(Unknown Source)

at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)

at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)

at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)

at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)

at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)

at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)

Any other information:

If we happen to use oracle thin driver url, we are able to build a session factory.



Relevant information:
In the weblogic startup console, I see this stack trace all the time
This is the relevant exception that we see in the weblogic startup console:

<Oct 12, 2006 3:14:02 PM IST> <Warning> <RMI> <BEA-080003> <RuntimeException thr

own by rmi server: weblogic.jdbc.common.internal.RmiDataSource.getConnection()

java.lang.ClassCastException: java.lang.Object.

java.lang.ClassCastException: java.lang.Object

at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1534)

at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2172

)

at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.jav

a:396)

at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl

.java:235)

at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl

.java:225)

Truncated. see log file for complete stacktrace

>

Any pointers would be appreciated. Thanks for your time!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.