日期:2014-05-18  浏览次数:20746 次

weblogic9 运行连接池 问题
Properties   h   =   new   Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory ");
h.put(Context.PROVIDER_URL,   "t3://localhost:7001 ");
InitialContext   ic   =   new   InitialContext(h);
DataSource   ds   =   (DataSource)ic.lookup( "hbodatasource ");
ds.getConnection();

出现以下问题       请教各位
Exception   in   thread   "main "   Exception   in   thread   "main "java.lang.ClassCastException:weblogic.jdbc.common.internal.ConnectionEnvweblogic.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)



------解决方案--------------------
因为非法的类型转换引起的..
只要根据Exception的trace信息找出错误发生的地方..
然后检查并更改