I need hibernate with db2 net.sf.hibernate.dialect.DB2390Dialect and COM.ibm.db2.jdbc.app.DB2Driver.
I want to store SessionFactory in JNDI name in weblogic
My Config:
<property name="connection.datasource">weblogic.jdbc.jts.db2Pool/</property>
<property name="show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.DB2390Dialect</property>
<property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="hibernate.session_factory_name">HibernateFactory</property>
<property name="hibernate.jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="hibernate.jndi.url">t3://127.0.0.1:7001</property>
I have ERROR:
2004-11-01 14:11:39,128 [main] INFO net.sf.hibernate.util.NamingHelper - JNDI InitialContext properties:{java.naming.provider.url=t3://127.0.0.1:7001, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory}
2004-11-01 14:11:39,138 [main] DEBUG net.sf.hibernate.util.NamingHelper - binding: HibernateFactory
2004-11-01 14:11:39,148 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,148 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,218 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,218 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,228 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,228 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,238 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,238 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,248 [main] DEBUG net.sf.hibernate.util.NamingHelper - binding: HibernateFactory
2004-11-01 14:11:39,248 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,248 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,258 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,258 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,268 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,268 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,278 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serializing: 8a48b315fff4431a00fff4431b780000
2004-11-01 14:11:39,278 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - serialized
2004-11-01 14:11:39,278 [main] WARN net.sf.hibernate.impl.SessionFactoryObjectFactory - Could not bind factory to JNDI
javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.StreamCorruptedException]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:83)
at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:384)
at weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:135)
at weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:127)
at javax.naming.InitialContext.rebind(InitialContext.java:367)
at net.sf.hibernate.util.NamingHelper.bind(NamingHelper.java:74)
at net.sf.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:171)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:791)
at de.kkh.business.logic.HibernateUtil.<clinit>(HibernateUtil.java:25)
at de.kkh.integration.hibernate.AllgemeineDiensteDAO.sperrenPid(AllgemeineDiensteDAO.java:44)
at de.kkh.integration.hibernate.TestAllgemeineDiensteDAO.testSperren(TestAllgemeineDiensteDAO.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.StreamCorruptedException
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at weblogic.jndi.internal.ServerNamingNode_WLStub.rebind(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.rebind(WLContextImpl.java:133)
... 24 more
Caused by: java.io.StreamCorruptedException
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1506)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:111)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:95)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:407)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:356)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:123)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:351)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
|