Sybase jdbc jconnect 6

Hello,
When I am using a java main and I try to use a connection pool with jconnect 6 it failed , it do not failed using the weblogic one. Why ? How can I get it worked?
Thank you !
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:812)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 58
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.ensureInitialized(Unknown Source)
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.<init>(Unknown Source)
     ... 33 more
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub ] - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[java.lang.ArrayIndexOutOfBoundsException: 58]]
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:814)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:812)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 58
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.ensureInitialized(Unknown Source)
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.<init>(Unknown Source)
     ... 33 more
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub ] - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[java.lang.ArrayIndexOutOfBoundsException: 58]]
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:814)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Exception in thread "main"

skj sssssss wrote:
Hello,
When I am using a java main and I try to use a connection pool with jconnect 6 it failed , it do not failed using the weblogic one. Why ? How can I get it worked?
Thank you !
Hi. There is no SQLExeption below, so it's not a JDBC
problem as such. I suspect that you have a different
version of the sybase driver in your client classpath
than in in the server classpath. You should edit the
script you use to start the WebLogic server, by adding
the sybase driver you want to use to the classpath
for the server. Add it ahead of weblogic stuff.
Otherwise we will use the jConnect driver we ship.
Joe
>
>
>
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:812)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 58
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.ensureInitialized(Unknown Source)
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.<init>(Unknown Source)
     ... 33 more
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub ] - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[java.lang.ArrayIndexOutOfBoundsException: 58]]
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:814)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:812)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 58
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.ensureInitialized(Unknown Source)
     at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub.<init>(Unknown Source)
     ... 33 more
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate class for weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_com_sybase_jdbc3_jdbc_SybConnection_813_WLStub ] - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[java.lang.ArrayIndexOutOfBoundsException: 58]]
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:814)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
     at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:237)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)
     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 java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:159)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:285)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
     at weblogic.jdbc.common.internal.RmiDataSource_813_WLStub.getConnection(Unknown Source)
     at com.genesys.util.db.GenUtilSPU.getConnectionFromDataSource(GenUtilSPU.java:480)
     at com.genesys.util.db.GenUtilSPU.getMapListFromStoredProcedureCall(GenUtilSPU.java:231)
     at com.genesys.subscriber.rtm.RTMEventListener.getRTMBridgeInfo(RTMEventListener.java:247)
     at com.genesys.subscriber.rtm.RTMEventListener.onEvent(RTMEventListener.java:109)
     at com.genesys.subscriber.rtm.RTMEventListener.main(RTMEventListener.java:217)
Exception in thread "main"

Similar Messages

  • Sybase JDBC driver & Invalid column name error

    I submitted a note a year ago concerning JDBC-ODBC bridge and SQL Server db. Same Invalid column name error. The resolution was a bug in the XSU code.
    This time the error is with a jconnect5 JDBC driver from Sybase to a Sybase ASA db. ASA is Adaptive Server Anywhere.
    <ERROR xsql-timing="140">oracle.xml.sql.OracleXMLSQLException: S0022: Invalid column name 'name'.</ERROR>
    However if I use a Sybase JDBC driver from INet Software of Germany, I get the desired result of my query.
    Below are sample XSQLConfig.xml definitions.
    INet Software Sybase JDBC driver definition:
    - <connection name="deasa">
    <username>dba</username>
    <password>sql</password>
    <dburl>jdbc:inetsyb:LEMKAU:2638?database=asademo</dburl>
    <driver>com.inet.syb.SybDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    Sybase jconnect5 Sybase JDBC driver definition:
    - <connection name="asa">
    <username>dba</username>
    <password>sql</password>
    <dburl>jdbc:sybase:Tds:lemkau:2638?ServiceName=asademo</dburl>
    <driver>com.sybase.jdbc.SybDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    I believe the bug has to do with the numeric codes that the drivers use to determine data types are not properly interpreted.
    See XML General note title "insert-request, xsu 2.1.0 beta & SQL Server" for reference.
    Steve.

    Thanks for the notification. We will look into this issue...

  • [Sybase JDBC Driver]Object has been closed

    Hi,
    I am getting the following error when accessing a datasource in an EJB on Weblogic using the Data Direct Drivers.
    java.sql.SQLException: [DataDirect][Sybase JDBC Driver]Object has been closed.
    The code works every other time. the first time through it works the second time I get the error.
    Any insite would be appricated.
    Here is my code
    public String test(String id)
    System.out.println ("test1");
    DataSource ds = null;
    Connection conn = null;
    PreparedStatement stmt = null;
    PreparedStatement stmt2 = null;
    String ret = "?????";
    try
    System.out.println ("read data - prepare");
    InitialContext ic = new InitialContext();
    ds = (DataSource)ic.lookup("java:comp/env/jdbc/dataconn");
    conn = ds.getConnection();
    String sql = "SELECT * FROM myTable WHERE ID = ?";
    System.out.println ("read data - conn.prepareStatement(sql);");
    stmt = conn.prepareStatement(sql);
    stmt.setString(1, id);
    // stmt.setMaxRows(1000);
    System.out.println ("read data - stmt.executeQuery();");
    ResultSet rs = stmt.executeQuery();
    System.out.println ("read data - read");
    if(!rs.next())
    ret = "Not found";
    else
    ret = "found";
    sql = "UPDATE myTable SET column1 = column1 + 1 WHERE ID = ?";
    System.out.println ("update data - prepare");
    stmt2 = conn.prepareStatement(sql);
    stmt2.setString(1, id);
    ret = ret + stmt2.executeUpdate();
    System.out.println ("update data - update");
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    stmt.close();
    catch(Exception exception1) { }
    try
    stmt2.close();
    catch(Exception exception1) { }
    try
    conn.close();
    catch(Exception exception1) { }
    stmt = null;
    stmt2 = null;
    conn = null;
    return ret;
    }

    Hi. What version of weblogic, and can you print the whole stacktrace?
    That way I'll know which object is already closed. This hints at an
    already-fixed bug, but I'm not sure yet... And tell me what happens
    if you close your result set after you do your call to next(). Lastly,
    you can save some DBMS traffic if you change the query to:
    "SELECT 1 FROM myTable WHERE ID = ?"
    Then regardless of how wide the table is, and whether the table data
    is in DBMS memory, as long as there's an index on ID, the query only
    needs to use the index, not the data page to answer. If there's an
    index entry for your ID value, you'll get one row with 1 in it, else
    nothing.
    thanks
    Joe
    Scot McReynolds wrote:
    Hi,
    I am getting the following error when accessing a datasource in an EJB on Weblogic using the Data Direct Drivers.
    java.sql.SQLException: [DataDirect][Sybase JDBC Driver]Object has been closed.
    The code works every other time. the first time through it works the second time I get the error.
    Any insite would be appricated.
    Here is my code
    public String test(String id)
    System.out.println ("test1");
    DataSource ds = null;
    Connection conn = null;
    PreparedStatement stmt = null;
    PreparedStatement stmt2 = null;
    String ret = "?????";
    try
    System.out.println ("read data - prepare");
    InitialContext ic = new InitialContext();
    ds = (DataSource)ic.lookup("java:comp/env/jdbc/dataconn");
    conn = ds.getConnection();
    String sql = "SELECT * FROM myTable WHERE ID = ?";
    System.out.println ("read data - conn.prepareStatement(sql);");
    stmt = conn.prepareStatement(sql);
    stmt.setString(1, id);
    // stmt.setMaxRows(1000);
    System.out.println ("read data - stmt.executeQuery();");
    ResultSet rs = stmt.executeQuery();
    System.out.println ("read data - read");
    if(!rs.next())
    ret = "Not found";
    else
    ret = "found";
    sql = "UPDATE myTable SET column1 = column1 + 1 WHERE ID = ?";
    System.out.println ("update data - prepare");
    stmt2 = conn.prepareStatement(sql);
    stmt2.setString(1, id);
    ret = ret + stmt2.executeUpdate();
    System.out.println ("update data - update");
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    stmt.close();
    catch(Exception exception1) { }
    try
    stmt2.close();
    catch(Exception exception1) { }
    try
    conn.close();
    catch(Exception exception1) { }
    stmt = null;
    stmt2 = null;
    conn = null;
    return ret;

  • CachedRowSet with sybase JDBC driver

    In previous postings you mentioned the solution to using CachedRowSets with Sybase
    JDBC involves setting certain properties. My question is WHERE and WHEN do you
    set these properties?

    Peter Wu wrote:
    Hello,
    Does anyone know if there is any way to use CachedRowSet with sybase JDBC
    driver?
    I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
    PeterYes there is, but it involves some driver-specific properties, and I know this from
    a discussion I read on their jdbc support newsgroup. That would be the best place
    for an answer about their driver. Try news://forums.sybase.com, in the sybase.public.jconnect50
    group.
    Joe

  • Using CachedRowSet with sybase JDBC driver

    Hello,
    Does anyone know if there is any way to use CachedRowSet with sybase JDBC
    driver?
    I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
    Peter

    Peter Wu wrote:
    Hello,
    Does anyone know if there is any way to use CachedRowSet with sybase JDBC
    driver?
    I knew there was posting regarding this in the year 2000. And now it 2003. Thanks!
    PeterYes there is, but it involves some driver-specific properties, and I know this from
    a discussion I read on their jdbc support newsgroup. That would be the best place
    for an answer about their driver. Try news://forums.sybase.com, in the sybase.public.jconnect50
    group.
    Joe

  • Character encoding and Sybase JDBC driver

    Hi,
    I have an issue with the Sybase JDBC driver we are using. We have characters in our database, e.g., canon with a ~ over the n. When I do a getString from the ResultSet, I see a ? instead of the character. I'm specifying utf8 as the encoding in the properties in the WLS console. I tried utf16 or ucs2, but I got exceptions from the Sybase JDBC driver at start up.
    Any help would be greatly appreciated.

    Pat Bumpus wrote:
    Hi,
    I have an issue with the Sybase JDBC driver we are using. We have characters in our database, e.g., canon with a ~ over the n. When I do a getString from the ResultSet, I see a ? instead of the character. I'm specifying utf8 as the encoding in the properties in the WLS console. I tried utf16 or ucs2, but I got exceptions from the Sybase JDBC driver at start up.
    Any help would be greatly appreciated.Which Sybase driver are you using?
    Joe

  • Sybase JDBC Connection - OWB11gr2 Issue

    Hi All,
    We are uning OWB11gr2 on 64-bit linux box. Database is Oracle 11.1.0.6. We are trying to connect to Sybase database is ASA 9.0.
    Added the JAR files "jconn2.jar" and "jodbc.jar" under OWB_HOME/owb/lib/ext.
    Restarted Control Centre Agent and OWB client.
    Created a new platform for Sybase database connection.
    Under location Details -
    I entered Username and Password.
    Port Number of the database.
    I kept Schema option Blank.
    Driver Class - com.sybase.jdbc2.jdbc.SysDriver
    Url - jdbc:sybase:Tds:machine-name:port-number/databasename
    When I hit the test connection button it returns as Successful.
    But When i try to import database objects , I cannot see any database objects.
    After testing connection(successfully) when i hit the browse button to get schema names i get the following error -
    Failed: java.sql.SQLException:jZ0sj:Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jconnect documentation.
    What could be the issue ?? I am not sure whether this problem is related to OWB or Sybase.
    When I use the ODBC connection on windows box with same username and password for the same database i see few views and tables.
    Any help is appreciated.
    Regards,
    Samurai.

    Hi David,
    I just edited the script. Since there are no tables( user just has read rights over few views) for the user I am trying to run , i modified the script to run against the views.
    The following is the output for the view which had the text column -
    DataType : varchar Column : nfsExportName Table : nfsExportView
    DataType : varchar Column : nfsExportActualPath Table : nfsExportView
    DataType : varchar Column : nfsExportAnonymousUserID Table : nfsExportView
    DataType : varchar Column : nfsExportNoSUID Table : nfsExportView
    DataType : long varchar Column : nfsExportReadOnlyAccess Table : nfsExportView
    DataType : long varchar Column : nfsExportReadWriteAccess Table : nfsExportView
    DataType : long varchar Column : nfsExportRootAccess Table : nfsExportView
    DataType : long varchar Column : nfsExportSecurity Table : nfsExportView
    DataType : unsigned int Column : nfsExportHostId Table : nfsExportView
    DataType : unsigned int Column : nfsExportVolId Table : nfsExportView
    DataType : unsigned int Column : nfsExportQtreeId Table : nfsExportView
    If you need the entire output please let me know , i will paste it.
    It looks like text is subsititued by long varchar. What can be done to overcome this situation ?
    Thanks,
    Samurai.

  • Sybase jdbc throws Resource PermissionsException wls8.1 sp2

    HI,
    I just upgraded from wls 6.1 to wls 8.1 sp2. My Connection pools are not working
    anymore.
    I am using sybase server 11.5.1 with the jconnect 5. I am making database calls
    (that
    used to work). Here's the strange thing, I have a startup class that runs an
    sql query when weblogic server comes up (in the main thread i am assuming) and
    it works. But calling the same exact sql query fails when i click on my webapp
    that leads to the same query (it is called from a different thread).
    Any ideas? I am assuming it's a security issue where the main thread uses the
    correct username and password and the other threads don't. Heres my config file
    and my exception trace:
    <JDBCTxDataSource JNDIName="FOO" Name="MyJDBC Data Source"
    PoolName="MyJDBC Connection Pool-1" Targets="portal"/>
    <JDBCConnectionPool DriverName="com.sybase.jdbc2.jdbc.SybDriver"
    Name="MyJDBC Connection Pool-1" Password="xxx"
    Properties="user=vwap;url=jdbc:sybase:Tds:myhost:9501/vwap;networkProtocol=Tds;portNumber=9501;userName=vwap;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:sybase:Tds:myhost:9501/vwap"/>
    I also tried it with weblogic sybase driver and same results:
    <JDBCConnectionPool DriverName="weblogic.jdbc.sybase.SybaseDriver"
    Name="MyJDBC Connection Pool" Password="xxx"
    Properties="user=vwap;url=jdbc:bea:sybase://myhost:9501;portNumber=9501;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:bea:sybase://myhost:9501"/>
    error.weblogic.common.resourcepool.ResourcePermissionsException: User "<anonymous>"
    does not have permission to perform operation "reserve" on resource "MyJDBC Connection
    Pool-1" of application "null" of type "ConnectionPool"
    weblogic.jdbc.extensions.PoolPermissionsSQLException: weblogic.common.resourcepool.ResourcePermissionsException:
    User "<anonymous>" does not have permission to perform operation "reserve" on
    resource "MyJDBC Connection Pool-1" of application "null" of type "ConnectionPool"
         at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:157)
         at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at com.itginc.strategyServers.common.database.Database.initializeUserCache(Database.java:729)
         at com.itginc.strategyServers.common.database.Database.connect(Database.java:104)
         at com.itginc.strategyServers.common.database.Database.getClients(Database.java:157)
         at com.itginc.strategyServers.common.servlets.ClientsServlet.doPost(ClientsServlet.java:41)
         at com.itginc.strategyServers.common.servlets.BaseServlet.doGet(BaseServlet.java:110)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.itginc.strategyServers.common.servlets.BaseServlet.service(BaseServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doPost(LoginServlet.java:230)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doGet(LoginServlet.java:242)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    farnaz wrote:
    I changed the following line in my fileRealm.properties and fixed the problem.
    Is this the correct thing to do?
    acl.reserve.weblogic.jdbc.connectionPool=system
    changed to
    acl.reserve.weblogic.jdbc.connectionPool=everyoneyes.
    Joe
    >
    >
    >
    >
    "farnaz" <[email protected]> wrote:
    A few issues, i've been stuck on this problem for 2 days now, please
    HELP!
    1. My acl settings (i looked at them via the console) seems to have "everyone"
    permission for all jdbc operations: reserve, shrink, etc.
    2. If acl is not the way to set security policies why is it shown in
    the console?
    3. I cannot find anywhere in the wls8.1 documentation on how to set security
    policies
    for jdbc.
    Can i see an example?
    4. I was not using any java securtiy when i got that error, so then I
    added the
    -Djava.security.manager to my startup cmd line for starting weblogic
    using the
    default weblogic policy in $WLSHOME/server/lib/weblogic policy (unmodified)
    and
    got the following exception on startup, help!
    The Horizon Portal could not be started, because the Application Manager
    failed
    to initialize. access denied (java.lang.RuntimePermission weblogic.kernelPermission)
    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    weblogic.kernelPermission)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at weblogic.security.service.SubjectManagerImpl.checkKernelPermission(SubjectManagerImpl.java:202)
         at weblogic.security.service.SubjectManagerImpl.getKernelIdentity(SubjectManagerImpl.java:181)
         at weblogic.security.subject.SubjectManager.isKernelIdentity(SubjectManager.java:102)
         at weblogic.security.service.SubjectManagerImpl.checkKernelIdentity(SubjectManagerImpl.java:214)
         at weblogic.security.subject.DelegatingSubjectStack.getCurrentSubject(DelegatingSubjectStack.java:31)
         at weblogic.security.service.SubjectManagerImpl.getCurrentSubject(SubjectManagerImpl.java:61)
         at weblogic.security.service.SecurityManager.getCurrentSubject(SecurityManager.java:43)
         at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:330)
         at weblogic.jndi.internal.ServerNamingNode.checkModify(ServerNamingNode.java:306)
         at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.java:166)
         at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:382)
         at weblogic.jndi.internal.WLEventContextImpl.rebind(WLEventContextImpl.java:118)
         at javax.naming.InitialContext.rebind(InitialContext.java:363)
         at com.itginc.strategyServers.common.database.DatabaseLookup.bind(DatabaseLookup.java:45)
         at com.itginc.strategyServers.horizon.services.AppManager.Initialize(AppManager.java:66)
         at com.itginc.strategyServers.horizon.services.AppManager.<init>(AppManager.java:44)
         at com.itginc.strategyServers.horizon.services.AppManager.makeClass(AppManager.java:22)
         at com.itginc.strategyServers.horizon.services.Startup.startup(Startup.java:27)
         at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:177)
         at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:158)
         at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
         at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
         at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:22)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
         at weblogic.Server.main(Server.java:32)
    Joe Weinstein <[email protected]> wrote:
    Hi. Two things:
    Your test table SQL is wasteful. sysobjects is a big table. No needto
    count everything
    in it every time to check the connections. Try "SQL select 1" for abetter
    one.
    The problem isn't in the pool definition. It's a security issue. You
    should edit your
    weblogic.policy file to allow jdbc access to everyone.
    Joe
    farnaz wrote:
    HI,
    I just upgraded from wls 6.1 to wls 8.1 sp2. My Connection pools
    are
    not working
    anymore.
    I am using sybase server 11.5.1 with the jconnect 5. I am making
    database
    calls
    (that
    used to work). Here's the strange thing, I have a startup class thatruns an
    sql query when weblogic server comes up (in the main thread i am assuming)and
    it works. But calling the same exact sql query fails when i clickon my webapp
    that leads to the same query (it is called from a different thread).
    Any ideas? I am assuming it's a security issue where the main threaduses the
    correct username and password and the other threads don't. Heres
    my
    config file
    and my exception trace:
    <JDBCTxDataSource JNDIName="FOO" Name="MyJDBC Data Source"
    PoolName="MyJDBC Connection Pool-1" Targets="portal"/>
    <JDBCConnectionPool DriverName="com.sybase.jdbc2.jdbc.SybDriver"
    Name="MyJDBC Connection Pool-1" Password="xxx"
    Properties="user=vwap;url=jdbc:sybase:Tds:myhost:9501/vwap;networkProtocol=Tds;portNumber=9501;userName=vwap;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:sybase:Tds:myhost:9501/vwap"/>
    I also tried it with weblogic sybase driver and same results:
    <JDBCConnectionPool DriverName="weblogic.jdbc.sybase.SybaseDriver"
    Name="MyJDBC Connection Pool" Password="xxx"
    Properties="user=vwap;url=jdbc:bea:sybase://myhost:9501;portNumber=9501;databaseName=vwap;serverName=myhost"
    Targets="portal"
    TestTableName="SQL SELECT COUNT(*) FROM sysobjects" URL="jdbc:bea:sybase://myhost:9501"/>
    error.weblogic.common.resourcepool.ResourcePermissionsException: User"<anonymous>"
    does not have permission to perform operation "reserve" on resource"MyJDBC Connection
    Pool-1" of application "null" of type "ConnectionPool"
    weblogic.jdbc.extensions.PoolPermissionsSQLException: weblogic.common.resourcepool.ResourcePermissionsException:
    User "<anonymous>" does not have permission to perform operation "reserve"on
    resource "MyJDBC Connection Pool-1" of application "null" of type
    "ConnectionPool"
         at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:157)
         at weblogic.jdbc.pool.Driver.connect(Driver.java:156)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at com.itginc.strategyServers.common.database.Database.initializeUserCache(Database.java:729)
         at com.itginc.strategyServers.common.database.Database.connect(Database.java:104)
         at com.itginc.strategyServers.common.database.Database.getClients(Database.java:157)
         at com.itginc.strategyServers.common.servlets.ClientsServlet.doPost(ClientsServlet.java:41)
         at com.itginc.strategyServers.common.servlets.BaseServlet.doGet(BaseServlet.java:110)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.itginc.strategyServers.common.servlets.BaseServlet.service(BaseServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doPost(LoginServlet.java:230)
         at com.itginc.strategyServers.common.servlets.LoginServlet.doGet(LoginServlet.java:242)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

  • Sybase JDBC driver

    Hi,
    We have recently upgraded our weblogic server from 6.0 to 6.1 sp5 on our testing
    environment.
    Our application runs fine for a few hours until our sybase db shuts down for some
    reason. Thus rendering all connections to the db to fail.
    Anyone know if the current JDBC driver has any comptiability issues with weblogic
    6.1 sp5. Current version is "jConnect (TM) for JDBC(TM)/5.2(Build 21136)/P/EBF9747/JDK12/"
    Our application connects to the db via a connection pool.
    Here's the current settings for the connection pool:
    <JDBCConnectionPool CapacityIncrement="10"
    DriverName="com.sybase.jdbc2.jdbc.SybDriver" InitialCapacity="1"
    MaxCapacity="200" Name="biaSybaseConnectionPool"
    Properties="user=XXXXX;password=XXXXX" RefreshMinutes="0"
    ShrinkPeriodMinutes="10" ShrinkingEnabled="true" Targets="as1"
    TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
    TestTableName="systypes" URL="jdbc:sybase:Tds:x.x.x.x:xxxx"/>
    Here's some error log from weblgoic:
    java.sql.SQLException: weblogic.common.ConnectDeadException: failed to make new
    pool connection: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings
    chained to this exception for the reason(s).
    weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to
    this exception for the reason(s).
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:480)
    at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:2938)
    at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:419)
    at com.sybase.jdbc2.tds.Tds.login(Tds.java:341)
    Thanks for your help
    Regards,
    Raymond

    R Fung wrote:
    Hi,
    We have recently upgraded our weblogic server from 6.0 to 6.1 sp5 on our testing
    environment.
    Our application runs fine for a few hours until our sybase db shuts down for some
    reason. Thus rendering all connections to the db to fail.
    Anyone know if the current JDBC driver has any comptiability issues with weblogic
    6.1 sp5. Current version is "jConnect (TM) for JDBC(TM)/5.2(Build 21136)/P/EBF9747/JDK12/"
    Our application connects to the db via a connection pool.
    Here's the current settings for the connection pool:
    <JDBCConnectionPool CapacityIncrement="10"
    DriverName="com.sybase.jdbc2.jdbc.SybDriver" InitialCapacity="1"
    MaxCapacity="200" Name="biaSybaseConnectionPool"
    Properties="user=XXXXX;password=XXXXX" RefreshMinutes="0"
    ShrinkPeriodMinutes="10" ShrinkingEnabled="true" Targets="as1"
    TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
    TestTableName="systypes" URL="jdbc:sybase:Tds:x.x.x.x:xxxx"/>Hi. A few things: I would set the initial capacity = max capacity = 50 or less.
    I would set TestConnectionsOnRelease="false".
    See below for more....
    Here's some error log from weblgoic:
    java.sql.SQLException: weblogic.common.ConnectDeadException: failed to make new
    pool connection: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings
    chained to this exception for the reason(s).
    *******************************************I would expect to see this sort of exception in the logs during the time the DBMS was
    down. Are you saying that the pool never recovers after the DBMS comes back up?
    Lastly, I recommend that you download Sybase's latest appropriate driver and get it ahead
    of weblogic stuff in the classpath the statup script builds for the server.
    Joe
    >
    weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to
    this exception for the reason(s).
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:480)
    at com.sybase.jdbc2.tds.Tds.processLoginAckToken(Tds.java:2938)
    at com.sybase.jdbc2.tds.Tds.doLogin(Tds.java:419)
    at com.sybase.jdbc2.tds.Tds.login(Tds.java:341)
    Thanks for your help
    Regards,
    Raymond

  • Sybase - JDBC Persistent Store

    Hi
    I'm trying to setup Glassfish JMS to utilise a JDBC store (using Sybase)
    I have set the required parameters in config.properties for the imqBroker instance. (including creating the Sybase DDL)
    When I invoke imqdbmgr create tbl - all tables and indexes are created - but the process exits with an error. No details are displayed (even when using the -debug option) as to what the reason for failure is.
    [11/Sep/2008:12:07:52 BST] Using plugged-in persistent store:
         version=410
         brokerid=imqBroker
         database connection url=jdbc:sybase:Tds:localhost:5000/openmq_store
         database user=jms_user
    [11/Sep/2008:12:07:52 BST] Creating database table MQVER41SimqBroker ...
    [11/Sep/2008:12:07:52 BST] Creating database table MQBKR41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQSES41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQPROP41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQCREC41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQCON41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQCONSTATE41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table index MQCONSTATE41SimqBrokerIDX1 ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQDST41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table index MQDST41SimqBrokerIDX1 ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQMSG41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table index MQMSG41SimqBrokerIDX1 ...
    [11/Sep/2008:12:07:53 BST] Creating database table MQTXN41SimqBroker ...
    [11/Sep/2008:12:07:53 BST] Creating database table index MQTXN41SimqBrokerIDX1 ...
    [11/Sep/2008:12:07:53 BST] ERROR [B3073]: Failed to create database tables - jdbc:sybase:Tds:localhost:5000/openmq_store
    com.sun.messaging.jmq.jmsserver.util.BrokerException: [B3073]: Failed to create
    database tables - jdbc:sybase:Tds:localhost:5000/openmq_store
    at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBTool.doCreate(DBTool.j
    ava:200)
    at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBTool.doCommand(DBTool.
    java:1700)
    at com.sun.messaging.jmq.jmsserver.persist.jdbc.DBTool.main(DBTool.java:
    1749)
    Any ideas on how I can troubleshoot further?
    Thanks
    Edited by: chivz on Sep 11, 2008 4:12 AM

    Are there any errors in Sybase log ? From the error looks like it's failing while creating txn table which I think is using blobs.
    Tom

  • Creating new Connections/Statements/ResultSets

    Hi,
    RDMS = Sybase
    JDBC = Jconnect 5.5 obtained from Sybase website
    Purpose:
    To loop through the program below with different queries and produce
    a resultset.
    Details:
    I have a program that creates a query stores it in a static setter.
    The program calls the program below. The program below:
    (1) obtains the query from a static getter
    (2) creates a connection/statement/resultset
    (3) returns to the calling program where
    (a) resultset is displayed
    (b) calls close() in the program below which closes the
    connection/statement/resultset
    Problem:
    I thought that creating a new connection/statement/resultset
    each time the program below is called would work.
    The program below returns the correct resultset for the first query
    but when called with a different query returns the first resultset that
    was generated.
    Question:
    Do I have to use different objects for the connection/statement/resultset each time the program is called
    even though the existing connection/statement/resultset is closed
    before a new connection/statement/resultset is created ?
    if yes,
    I don't how to change the object for connection/statement/resultset
    dynamically each time the program below is called.
    Any assistance provided would be greatly appreciated !!
    Thanks for your time,
    YAM-SSM
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         public class DbConnect implements Runnable {     
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password =     EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public static String query = EcmUtlLogicals.getQuery();
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;
                 public static int SybaseReturnCode; 
              void Connect() {               
                        try {                              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                           conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);     
                   catch (SQLException exc) {
                        sqlstate = exc.getSQLState();          
                        message = exc.getMessage();
                        SybaseReturnCode = exc.getErrorCode();
                   catch (InstantiationException iste) {
                   catch (ClassNotFoundException cnfe) {
                   catch (IllegalAccessException iae) {
                   if (queryThread == null) {
                        queryThread = new Thread(this, "Query");
                        queryThread.start();               
                   } // close if                 
              } // close Connect method
              public void run() {               
                  try {                             
                                     stmt = DbConnect.conn.createStatement();                 
                        rs = stmt.executeQuery(query); 
                        queryThread = null;     
                   } // close try
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                                    queryThread = null;
                            } // close catch
                            catch (java.lang.Exception ex) {
                          ex.printStackTrace ();
                   } // close catch
                   queryThreadDone = "true";
              } // close run method
              static void close() {     
                   try {
                         if ( rs != null){
                              rs.close();          
                         if ( stmt != null){
                              stmt.close();
                         if ( conn !=  null){
                              conn.close();     
                   } // close try
                   catch (SQLException error){     
              }// close close()          
    } // close DbConnect class     

    Then I'd say you should write a QueryThread object
    that extends Thread and takes an SQL statement in its
    constructor. In the run method, create a connection,
    statement, and result set to run that query, close
    them in reverse order when you're done, and provide a
    getter to give access to the results. Don't return a
    reference to the result set; put the results in a data
    structure or CachedRowSet and close out the result set
    as soon as you're done with it. ResultSets are
    database cursors, which are scarce resources.
    With this design, every thread has its own connection
    and resources. They can't conflict with each other. -
    MODHi MOD,
    I finished coding a QueryThread object exactly as you instructed
    and IT WORKS !!!!! The calling program calls QueryThread by:
    QueryThread qt = new QueryThread(query);
    qt.start();
    QueryThread code:
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         import java.util.List;
         import java.util.*;
         public class QueryThread extends Thread {
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password = EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public String query;
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;     
              public static int SybaseReturnCode;
              public QueryThread(String query) {
                   this.query = query;                 
              public void run() {               
                   try {              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                        conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);                                                                                                         
                        stmt = conn.createStatement();                 
                        rs = stmt.executeQuery(query);
                        List resultSetArray = new LinkedList();
                        resultSetArray = new ArrayList(); 
                        if (rs != null) {     
                             int i;
                             ResultSetMetaData rsmd = rs.getMetaData ();
                             int numCols = rsmd.getColumnCount ();
                             for (i=1; i<=numCols; i++) {
                                  if (i > 1) resultSetArray.add(",");
                                  resultSetArray.add(rsmd.getColumnLabel(i));
                             resultSetArray.add(newline);
                             boolean more = rs.next ();
                             while (more) {
                                  for (i=1; i<=numCols; i++) {
                                       if (i > 1) resultSetArray.add(",");
                                       resultSetArray.add(rs.getString(i)); 
                                  resultSetArray.add(newline);
                                  more = rs.next ();
                             EcmUtlLogicals.setResultSetArray(resultSetArray);
                             if (rs != null){
                                  rs.close();
                             if (stmt != null) {
                                  stmt.close();
                             if (conn != null) {
                                  conn.close();
                        queryThread = null;                                            
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                        queryThread = null;
                   catch (java.lang.Exception ex) {
                                     ex.printStackTrace ();
                   queryThreadDone = "true";
         }I have only be using Java for three months. Sometimes one needs a teacher to go along with the APIs.
    Thanks for your patience/help/time
    YAM-SSM

  • Sybase expired password changed via JDBC ...

    hi,
    please help me in this matter : i can't figure out how to change an already expired password via Sybase JDBC implementation ( jConnect ).
    i read the postings about Oracle having passed a custom value for this kind of change but i just don't seem to find a similar Sybase approach.
    thank you very much,
    -ionut-

    I've never used Sybase, but here's a suggestion. I'm guessing you are already trying to call the sp_password stored procedure.
    Try to call it using con.executeQuery(). Something along the lines of
    con.executeQWuery("execute sp_password 'old','new';");
    A lot of drivers make extra database calls when you use prepareCall() and prepareStatement().

  • Using Sybase JConnect on Websphere

    I am trying to create a datasource in WAS 5.1 using Sybase JConnect Driver 5.5. I seem to be having problems with the setup of the driver in the datasource. Anybody here knows of a website or tutorial that explains how to use Sybase JConnect Driver in WAS?
    Thank you in advance.

    1. Open WAS' Server perspective.
    2. Create a new embedded server, assign it a name and port number (or reuse the local server that may already be running).
    3. Double click on the server.
    4. In the right panel, you would see various tabs for configuring the server.
    5. Click on Environment tab, open Class Path. Click on "Add External JARs" button, and add jconn2.jar from your local filesystem, wherever it is located.
    6. Click on Data Source tab, select and remove any JDBC providers, and related data sources.
    7. Click on "Add..." next to JDBC Provider list. In the ensuing dialog box, select "Sybase" and "Sybase JDBC Driver" from below. Click "Next>".
    8. Give this provider a name. In the Implementation Class Name (combo-box), select "com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource". Remove the existing item in the Class Path panel, and add ("Add External JARs") jconn2.jar from your local filesystem. Click on Finish.
    9. Now, add a data source to the above defined JDBC provider. Click on "Add...". Select the type of JDBC provider as "Sybase JDBC driver". Click on "Next>".
    10. Leave the name, usually "Data Source 1" (or similar) as is. Set the JNDI name to something like "jdbc/sybDB". Leave all the other fields as is. Click on "Next>".
    11. "databaseName", "serverName" and "portNumber" must be highlighted and the respective values must be set. Click on "Finish".
    Now, your data source is available from your code by creating an initial context as follows:
          Context ctx = new InitialContext();
          if (ctx == null)
            throw new Exception("Boom! No Context");
          DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/sybDB");
          if (ds != null)
            conn = ds.getConnection();
            conn.close();
            conn = null;
          }Hope this helps.

  • Weblogic 8.1 Type 4 JDBC Drivers for Sybase

    Hi Everyone,
    I get the following exception when I switch from the Sybase JConnect driver to the Weblogic type 4 driver. The exception disappears when I remove the "sdaahadr.." from the stored procedure call. However, the stored procedure executes a raiserror which does not come back to the java code. So there are actually 2 problems.
    Any help would be appreciated.
    Thanks,
    Eddie Baue
    [BEA][Sybase JDBC Driver]The stored procedure call could not be made as a language event, due to the presence of one or more output-only parameters. It is recommended that parameter markers be used for all stored procedure arguments.
    The code follows:
    Driver sybase_driver =
    (Driver)Class.forName("weblogic.jdbc.sybase.SybaseDriver").newInstance();
    Properties prop = new Properties();
    prop.put("DatabaseName", "***");
    prop.setProperty("User","***");
    prop.setProperty("Password","***");
    prop.setProperty("SelectMethod","cursor");
    conn = sybase_driver.connect("jdbc:bea:sybase://xsd00z09:3035", prop);
    String sql = "{call sdaahadr..pr_adr_wh_get_issuer_name (?, ?, ?, ?)}";
    long issuer_id = 753211710;
    Statement stmt = null;
    ResultSet rs = null;
    CallableStatement call_stmt = null;
    call_stmt = conn.prepareCall(sql);
    call_stmt.setLong(1, issuer_id);
    call_stmt.registerOutParameter(2, Types.VARCHAR);
    call_stmt.registerOutParameter(3, Types.VARCHAR);
    call_stmt.registerOutParameter(4, Types.VARCHAR);
    call_stmt.execute();

    Chandra Sekhar Ghosh Dastidar wrote:
    I am having similar problem with SQL Server 2000 on WL 8.1 SP3, which does not recognise RAISERROR thrown from the Stored Procedure.
    Any help in this regard?
    Do I need to pass error code through the OUT parameter?Hi. Could you show me the procedure and the jdbc code to process it?
    thanks
    Joe

  • Sybase stored procedure call

    I have a strange behavior when call a sybase stored procedure.
    Basically, I need to call it three times, each time with different first parameter
    value. The first two times are ok, but the last time I got the following error
    -------------- error --------------------------------------
    ------> ap_etsp_insert_deal_component WORKED!!!!!!
    ------> ap_etsp_upd_price_def WORKED!!!!!!
    ------> ap_etsp_upd_price_def 4 WORKED!!!!!!
    java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index:
    0.
    at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
    at com.sybase.tds.TdsParam.prepareForSend(TdsParam.java)
    at com.sybase.jdbc.ParamManager.checkParams(ParamManager.java)
    at com.sybase.tds.Tds.rpc(Tds.java)
    at com.sybase.jdbc.SybCallableStatement.sendRpc(SybCallableStatement.java)
    at com.sybase.jdbc.SybCallableStatement.executeUpdate(SybCallableStatement.java)
    at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
    at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:64)
    at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:58)
    at com.bp.eia.server.adapter.EtPhyGasAdapter.saveDeal(EtPhyGasAdapter.java:248)
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.saveDeal(EtPhyGasDealProcessingControllerBean.java:212
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.processRawDeal(EtPhyGasDealProcessingControllerBean.ja
    va:87)
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.onMessage(EtPhyGasDealProcessingControllerBean.java:29
    3)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:248)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-03-15 04:56:03 PM:NULL:0:Fatal Error:Application:com.bp.eia.server.EiaAppException:
    java.sql.SQLException: JZ0SA: P
    repared Statement: Input parameter not set, index: 0.
    At the last time, if I set the call string to be without the ?=,
    then it is ok.
    If I take out the middle call, then it is ok again.
    here are the related code
    sql = "{? = call etsp.etsp.ap_etde_insert_deal_component(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,dealid);
    stmt.setLong(3,dealcompid);
    stmt.setLong(4,dd.pointID);
    stmt.setLong(5,dd.locCode);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(6,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(7,tempDate);
    stmt.setLong(8,dd.startHour);
    stmt.setLong(9,dd.endHour);
    stmt.setLong(10,dd.minQuantity);
    stmt.setLong(11,dd.maxQuantity);
    stmt.setFloat(12,dd.dealQuantity);
    stmt.setFloat(13,dd.nomQuantity);
    stmt.setInt(14,dd.dealStatusCode);
    stmt.setInt(15,dd.commentID);
    stmt.setString(16,"ACKLGM");
    // stmt.setString(16,dd.createUserID);
    stmt.setFloat(17, dd.price);
    stmt.setLong(18,12354);
    //stmt.setLong(18,dd.bookID);
    stmt.setInt(19,0);
    stmt.setLong(20,dd.contractID);
    tempDate = new Date(dd.commitmentDate.getTime());
    stmt.setDate(21,tempDate);
    //stmt.setString(22,dd.linkedCompID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_insert_deal_component WORKED!!!!!!");
    else
    System.out.println("------> ERROR ap_etsp_insert_deal_component");
    stmt.close();
    sql = "{? = call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,dd.refID);//ref id
    stmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(5,tempDate);
    stmt.setInt(6,dd.tier);
    stmt.setLong(7,dd.currencyCode);
    stmt.setLong(8,dd.unitOfMeasure);
    stmt.setInt(9,dd.tierQuantity);
    stmt.setInt(10,dd.priceType);
    stmt.setString(11,dd.formula);
    stmt.setString(12,dd.deleteHigherTiers);
    stmt.setString(13,dd.userID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    stmt.close();
    sql = "{?=call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,4);
    stmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(5,tempDate);
    stmt.setInt(6,dd.tier);
    stmt.setLong(7,dd.currencyCode);
    stmt.setLong(8,dd.unitOfMeasure);
    stmt.setInt(9,dd.tierQuantity);
    stmt.setInt(10,dd.priceType);
    stmt.setString(11,dd.formula);
    stmt.setString(12,dd.deleteHigherTiers);
    stmt.setString(13,dd.userID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def 4 WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    stmt.close();
    sql = "{?=call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    CallableStatement tmt = conn.prepareCall(sql);
    tmt.setLong(2,5);
    tmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    tmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    tmt.setDate(5,tempDate);
    tmt.setInt(6,dd.tier);
    tmt.setLong(7,dd.currencyCode);
    tmt.setLong(8,dd.unitOfMeasure);
    tmt.setInt(9,dd.tierQuantity);
    tmt.setInt(10,dd.priceType);
    tmt.setString(11,dd.formula);
    tmt.setString(12,dd.deleteHigherTiers);
    tmt.setString(13,dd.userID);
    stmt.setLong(1,5);
    stmt.setInt(2,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(3,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(4,tempDate);
    stmt.setInt(5,dd.tier);
    stmt.setLong(6,dd.currencyCode);
    stmt.setLong(7,dd.unitOfMeasure);
    stmt.setInt(8,dd.tierQuantity);
    stmt.setInt(9,dd.priceType);
    stmt.setString(10,dd.formula);
    stmt.setString(11,dd.deleteHigherTiers);
    stmt.setString(12,dd.userID);
    ret = tmt.executeUpdate();
    // ret = stmt.getInt(1);
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def 5 WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    ------------------------- end of code
    can anybody give some ideas?
    thanks
    I am using jConnect boundled with weblogic 6.1
    BTW, when I make a clearStatement() call on the callable statement, it say the
    driver does not support the call.

    CallableStatement is and interface and a subclass of PreparedStatement, and holds (a part of) the JDBC-specification behind
    which
    Dynamische SQL is called. The question marks are placeholders for the parameters, like you would use them in Dynamic SQL with
    Open
    Client.
    This is not necessarily a jConnect problem, jConnect, as you know just implements the JDBC specificatie for our DB's. The
    question is if
    jConnect does not follow the JDBC specification.
    I started to search with the of Sun of ~all~ paramaters with a java.sql.CallableStatement.executeQuery() have to be set, before
    you
    can call the method. Our implementation (jConnect) apparently thinks so, otherwise it would not give this error message:
    java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not
    set, Index: 2
    Too bad the JDBC documentation did not give enough information if this is indeed.
    (http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html), say that you need to set all parameters first with a XXXset method
    before you can
    call the executeQuery()?
    I think this is the case
    If the you needs to use the invocation "call MY_TEST (?, ?)"
    with two parameters, you must then provide two values. If you does only
    have one, you may use NULL for the second parameter by calling
    cmstmt.setNull(2, Types.INT);
    The second parameter will then be set to NULL explicitly.
    let me also point out that this is behavior of the dataserver which will
    happen with jConnect, OpenClient, and isql. There is a lengthy
    explanation in the Transact-SQL User's Guide:
    http://manuals.sybase.com:80/onlinebooks/group-as/asg1200e/asesqlug/@Generic__BookTextView/48882;pt=48483/*#X
    which begins as follows:
    Default Parameters
    You can assign a default value for the parameter in the create procedure
    statement. This value, which can be any constant, is taken as the argument
    to the procedure if the user does not supply one.
    So if the user wishes that the server uses the default value for the second
    parameter it is imperatively necessary to invoke the procedure with only one
    parameter value:
    cstmt = conn.prepareCall("{call MYTEST(?)}");
    Hope it help, Niclas
    PS: install the latest patch from www.sybase.com is god anyway.
    x zhou wrote:
    I am having the same error when I use the jdbc driver jConnect_5-5 from sybase.
    Thanks
    Joseph Weinstein <[email protected]> wrote:
    Hi. When you call the same stored procedure multiple times you should
    keep and re-use the same prepared statement. Nevertheless, this should
    work. I assume you're getting a connection via our pool. This means the
    repeat prepared statement is being cached, so when you call for a new
    one
    with the same SQL as before, you're actually re-using the first one that
    we cached. This seems to show a bug in the Sybase driver, to do with
    re-using
    prepared statements. Please download the very latest driver from sybase
    and put it ahead of our stuff in the server class path, because this
    may well
    be a bug Sybase fixed after we put their driver in our package.
    Joe
    x zhou wrote:
    I have a strange behavior when call a sybase stored procedure.
    Basically, I need to call it three times, each time with differentfirst parameter
    value. The first two times are ok, but the last time I got the followingerror
    -------------- error --------------------------------------
    ------> ap_etsp_insert_deal_component WORKED!!!!!!
    ------> ap_etsp_upd_price_def WORKED!!!!!!
    ------> ap_etsp_upd_price_def 4 WORKED!!!!!!
    java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter notset, index:
    0.
    at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
    at com.sybase.tds.TdsParam.prepareForSend(TdsParam.java)
    at com.sybase.jdbc.ParamManager.checkParams(ParamManager.java)
    at com.sybase.tds.Tds.rpc(Tds.java)
    at com.sybase.jdbc.SybCallableStatement.sendRpc(SybCallableStatement.java)
    at com.sybase.jdbc.SybCallableStatement.executeUpdate(SybCallableStatement.java)
    at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:293)
    at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:64)
    at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:58)
    at com.bp.eia.server.adapter.EtPhyGasAdapter.saveDeal(EtPhyGasAdapter.java:248)
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.saveDeal(EtPhyGasDealProcessingControllerBean.java:212
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.processRawDeal(EtPhyGasDealProcessingControllerBean.ja
    va:87)
    at com.bp.eia.server.EtPhyGasDealProcessingControllerBean.onMessage(EtPhyGasDealProcessingControllerBean.java:29
    3)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:248)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-03-15 04:56:03 PM:NULL:0:Fatal Error:Application:com.bp.eia.server.EiaAppException:
    java.sql.SQLException: JZ0SA: P
    repared Statement: Input parameter not set, index: 0.
    At the last time, if I set the call string to be without the ?=,
    then it is ok.
    If I take out the middle call, then it is ok again.
    here are the related code
    sql = "{? = call etsp.etsp.ap_etde_insert_deal_component(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,dealid);
    stmt.setLong(3,dealcompid);
    stmt.setLong(4,dd.pointID);
    stmt.setLong(5,dd.locCode);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(6,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(7,tempDate);
    stmt.setLong(8,dd.startHour);
    stmt.setLong(9,dd.endHour);
    stmt.setLong(10,dd.minQuantity);
    stmt.setLong(11,dd.maxQuantity);
    stmt.setFloat(12,dd.dealQuantity);
    stmt.setFloat(13,dd.nomQuantity);
    stmt.setInt(14,dd.dealStatusCode);
    stmt.setInt(15,dd.commentID);
    stmt.setString(16,"ACKLGM");
    // stmt.setString(16,dd.createUserID);
    stmt.setFloat(17, dd.price);
    stmt.setLong(18,12354);
    //stmt.setLong(18,dd.bookID);
    stmt.setInt(19,0);
    stmt.setLong(20,dd.contractID);
    tempDate = new Date(dd.commitmentDate.getTime());
    stmt.setDate(21,tempDate);
    //stmt.setString(22,dd.linkedCompID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_insert_deal_componentWORKED!!!!!!");
    else
    System.out.println("------> ERROR ap_etsp_insert_deal_component");
    stmt.close();
    sql = "{? = call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,dd.refID);//ref id
    stmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(5,tempDate);
    stmt.setInt(6,dd.tier);
    stmt.setLong(7,dd.currencyCode);
    stmt.setLong(8,dd.unitOfMeasure);
    stmt.setInt(9,dd.tierQuantity);
    stmt.setInt(10,dd.priceType);
    stmt.setString(11,dd.formula);
    stmt.setString(12,dd.deleteHigherTiers);
    stmt.setString(13,dd.userID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    stmt.close();
    sql = "{?=call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    stmt = conn.prepareCall(sql);
    stmt.setLong(2,4);
    stmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(5,tempDate);
    stmt.setInt(6,dd.tier);
    stmt.setLong(7,dd.currencyCode);
    stmt.setLong(8,dd.unitOfMeasure);
    stmt.setInt(9,dd.tierQuantity);
    stmt.setInt(10,dd.priceType);
    stmt.setString(11,dd.formula);
    stmt.setString(12,dd.deleteHigherTiers);
    stmt.setString(13,dd.userID);
    ret = stmt.executeUpdate();
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def 4WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    stmt.close();
    sql = "{?=call etsp.etsp.ap_etsp_upd_price_def(?,?,?,?,?,?,?,?,?,?,?,?)}";
    CallableStatement tmt = conn.prepareCall(sql);
    tmt.setLong(2,5);
    tmt.setInt(3,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    tmt.setDate(4,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    tmt.setDate(5,tempDate);
    tmt.setInt(6,dd.tier);
    tmt.setLong(7,dd.currencyCode);
    tmt.setLong(8,dd.unitOfMeasure);
    tmt.setInt(9,dd.tierQuantity);
    tmt.setInt(10,dd.priceType);
    tmt.setString(11,dd.formula);
    tmt.setString(12,dd.deleteHigherTiers);
    tmt.setString(13,dd.userID);
    stmt.setLong(1,5);
    stmt.setInt(2,dd.refType);
    tempDate = new Date(dd.effFrom.getTime());
    stmt.setDate(3,tempDate);
    tempDate = new Date(dd.effTo.getTime());
    stmt.setDate(4,tempDate);
    stmt.setInt(5,dd.tier);
    stmt.setLong(6,dd.currencyCode);
    stmt.setLong(7,dd.unitOfMeasure);
    stmt.setInt(8,dd.tierQuantity);
    stmt.setInt(9,dd.priceType);
    stmt.setString(10,dd.formula);
    stmt.setString(11,dd.deleteHigherTiers);
    stmt.setString(12,dd.userID);
    ret = tmt.executeUpdate();
    // ret = stmt.getInt(1);
    if(ret == 1)
    System.out.println("------> ap_etsp_upd_price_def 5WORKED!!!!!!");
    else
    System.out.println("------>ERROR ap_etsp_upd_price_def");
    ------------------------- end of code
    can anybody give some ideas?
    thanks
    I am using jConnect boundled with weblogic 6.1
    BTW, when I make a clearStatement() call on the callable statement,it say the
    driver does not support the call.

Maybe you are looking for

  • Mail_Receiver: Send Mail with attachment

    Hi everybody, I need some help. I want to send a mail with attachment. for this I have imported SAPs xsd for the mail adapter. I wonder how to map the target fields? The following causes five! attachments in SXMB_MONI and the adapter throws java.lang

  • Load balancing on Integrated ITS

    Hi How do I setup load balancing on Integrated ITS. Windows 2003 server. Thanks

  • Convert scan document to adobe acrobat

    how do you covert a scanned document file to adobe acrobat

  • Quadro k5200 vidoe noise in playback

    Hey all, I'm working in Premiere CC 2014 (latest update applied) on a Windows 7 Pro machine with an Nvidia Quadro K5200 card that seems to be introducing very strange noise into my playback. This only happens when Mercury Playback Engine GPU Accelera

  • Problem with 301 redirect

    We moved our site from one domain to another  in the application.cfm on the old domain I analyze incoming CGI.SCRIPT_NAME, divide URL into composite parts and form new links into  tmpRedirectPath variable and after that make redirect to new links usi