Jdbc-statement execute method

in java documentation
it is given
............., a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
what is that procedure that return multiple result sets
please some body clarify or place where i can get more details

See if out parameters are used i can call CallableStatement's getter methods to retrieve value
after execution .
but the api is telling writing a dynamic procedure execution where procedure returns more than
ResultSet(DQL) or updateCount(DML) . iam lokking for a procedure in oracle where this is possible

Similar Messages

  • JDBC 2.0 method not supported Error occuring in WL 6.1 sp1

    Hi ,
    When I connect to a mssqlserver 2000 using a session bean and execute the following
    statement
    "stmDataAccess=conDataAccess.createStatement(ResultSet.CONCUR_UPDATABLE,ResultSet.TYPE_SCROLL_INSENSITIVE);"
    i get the following error at the client and server side
    what can be wrong?.Support for Jdbc 2.0 is inherent in WL 6.1 isn't it?
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented]
    Start server side stack trace:
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented]
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented]
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    ; nested exception is:
    javax.ejb.EJBException:
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented]
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
            at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
            at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
            at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
            at java.lang.reflect.Method.invoke(Native Method)
            at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
            at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
            at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
            at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
            at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
            at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End  server side stack trace
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    --------------- nested within: ------------------
    javax.ejb.EJBException:
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented]
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method is not implemented
            at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
            at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
            at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
            at java.lang.reflect.Method.invoke(Native Method)
            at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
            at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
            at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
            at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
            at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
            at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
            at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
            at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End  server side stack trace
    <<no stack trace available>>

    Hi
    As I know, not all mehtods are supported by WebLogic. For Example for Oracle only
    a SubSet of the JDBC methods are supported (see the link http://e-docs.bea.com/wls/docs61///////oracle/API_joci.html#1070961).
    I can imagine that for Microsoft Products this is even worse.
    Regards Patrick
    "Thomas" <[email protected]> wrote:
    >
    Hi,
    I'm using the driver that comes along with the application server ie
    weblogic.jdbc.mssqlserver4.Driver.If
    this driver doesn't support JDBC 2.0 where can i find a suitable driver
    as my
    app needs updatable recordsets with updateXXX methods and absolute moves?
    Thanks in advance
    "noone_home" <[email protected]> wrote:
    Hi,
    It looks like your JDBC driver does not support JDBC 2.0. I believethe
    the JDBC
    driver for SQL Server that came with WLS 6.x supports only JDBC 1.1.
    I'm making
    the assumption that that is the driver which you are using.
    hth.
    "Thomas" <[email protected]> wrote:
    Hi ,
    When I connect to a mssqlserver 2000 using a session bean and execute
    the following
    statement
    "stmDataAccess=conDataAccess.createStatement(ResultSet.CONCUR_UPDATABLE,ResultSet.TYPE_SCROLL_INSENSITIVE);"
    i get the following error at the client and server side
    what can be wrong?.Support for Jdbc 2.0 is inherent in WL 6.1 isn't
    it?
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented
    Start server side stack trace:
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is
    not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    ; nested exception is:
    javax.ejb.EJBException:
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 methodis
    not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented>>> >>>Start server side stack trace:>>>java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method>is>>>not implemented>>>        at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)>>>        at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)>>>        at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)>>>        at java.lang.reflect.Method.invoke(Native Method)>>>        at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)>>>        at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)>>>        at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown>>>Source)>>>        at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)>>>        at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)>>>        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)>>>        at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)>>>        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)>>>        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)>>>End  server side stack trace>>>
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 methodis
    not implemented
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 methodis
    not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    --------------- nested within: ------------------
    javax.ejb.EJBException:
    Start server side stack trace:
    java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 methodis
    not implemented
    at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented
    at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:271)
    at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)
    at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)
    at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)
    at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    - with nested exception:
    [java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method
    is>>>not implemented>>> >>>Start server side stack trace:>>>java.sql.SQLException: java.sql.SQLException: This JDBC 2.0 method>is>>>not implemented>>>        at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)>>>        at packbss.javatranslator.dataaccess.ComDataBean.subLoadResultset(ComDataBean.java:264)>>>        at packbss.javatranslator.dataaccess.ComDataBean.ejbCreate(ComDataBean.java:50)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_Impl.ejbCreate(ComDataBean_vzmqkb_Impl.java:112)>>>        at java.lang.reflect.Method.invoke(Native Method)>>>        at weblogic.ejb20.manager.StatefulSessionManager.create(StatefulSessionManager.java:657)>>>        at weblogic.ejb20.manager.StatefulSessionManager.remoteCreate(StatefulSessionManager.java:705)>>>        at weblogic.ejb20.internal.StatefulEJBHome.create(StatefulEJBHome.java:142)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl.create(ComDataBean_vzmqkb_HomeImpl.java:80)>>>        at packbss.javatranslator.dataaccess.ComDataBean_vzmqkb_HomeImpl_WLSkel.invoke(Unknown>>>Source)>>>        at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)>>>        at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)>>>        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)>>>        at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)>>>        at weblogic.kernel.ExecuteThread.execute>>(ExecuteThread.java:139)>>>        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)>>>End  server side stack trace>>>
    <<no stack trace available>>

  • Jdbc statement in case of an unknown database operation

    hi,
    in an application in java, which makes connection to the database using JDBC,
    if for eg, i am not sure if the statement is going to be a select or update or insert, which method of Statement i should be using. ?
    Thanx.

    try execute() method of java.sql.Statement object.
    hi,
    in an application in java, which makes connection to the database using JDBC,
    if for eg, i am not sure if the statement is going to be a select or update or insert, which method of Statement i should be using. ?
    Thanx.

  • How to insert an image file as blob using JDBC Statement

    Hi,
    I'm new on java.
    I want the code to insert an image file in Oracle database whose data type is blob.
    i want to use JDBC statement not the prepared statement.
    Please help me out.

    user8739226 wrote:
    thanks for the solution.
    I want to ask one thing
    let say i've created a method in a bean in which i'm passing three parameters.
    One is tablename as String, Second is Name of tablefields as Object, Third is Values as Object
    Like:
    public synchronized int insert(String table,Object[] fields, Object[] values)Ah now we're getting somewhere. I was trying to come up with a situation where using a regular Statement over PreparedStatement would be viable and came up with practically nothing.
    In the method body i'm accessing the table fields and values and combining them into the insert sql query.
    how can i do this using preparedstatment.
    how do i come to know here in this bean that this value is int or string or date at runtime to use setInt, setString, setdate or setBlob respectively.That's your problem. Bad design. You want to make some sort of universal insert method that can insert anything anywhere. But it doesn't really make sense, because whenever you're trying to insert something, you know exactly what you want to insert and where. You could use a PreparedStatement at that point (although encapsulate it in its own method). Now you're trying to create your own poorly designed framework over JDBC that doesn't solve problems, only increases them.
    Above was the only reason i saw, i was using statement instead of preparedstatment as statement was looking easy in this situation.
    please, give me the solution of above using preparedstatment.No, rather you should reconsider your design. What advantage does your insert() method give you over, let's say using a regular PreparedStatement. Granted, you can put your connection opening and other boilerplate code in the method. But if that's your only problem, then your insert method isn't gonna be much use. You could always switch to JPA for example and work with that.

  • How to get the jdbc statement profile in 8.1

    the wls 8.1 api does not have the methods in the wls 7 api for jdbc statement profiling...
    in 7, the connection pool mbean has
    setSqlStmtProfilingEnabled()
    and the connection pool runtime mbean has
    getStatementProfiles(int index, int count)
    but in 8, i don't see these. i see the JDBCStatementProfile object in the api, but i don't see how to enable it or retrieve it.
    is this feature removed? or moved?
    thanks

    Thanks for your response. But I need Process ID
    not Product ID.
    GetCurrentProcessID
    Function should return you Process ID.
    Gaurav Khanna | Microsoft .NET MVP | Microsoft Community Contributor

  • SAP Cash Flow statement - Direct Method

    Dear Experts
    We are working on Cash flow statement - Direct method. We observed there is report for cash flow direct method i.e T.Code S_ALR_87012271. In this report we have  changed the form as per the client cash flow format and assign the FSV to this form.
    We done all the steps and executed the report .  But we observed the values which we are getting in this report are "Accured based values" (Cumulative balances  of  that GL Account).  
    But as per our business requirement the values should be triggered in this report based on  payment made and collection received during the period in the respective category as per the Cash flow format.
    Ex: In cash flow statement Under Revenue head (Revenue GL Accounts  are assigned) we need  to capture actual revenue received for that particular period. But we are getting Cumulative balances  of  that GL Account.  
    Please suggest how we can get the values as per the payment and receipts basis for a particular peirod.
    Thanks in advance
    Rao V

    Hi Waza
    Thanks for the quick support,
    I have already done the same process as you suggested, but my question is I want the values in this report (cash flow direct method) based on the "payment made and collection received during the period".
    But as of now I am getting the Cumulative balances of  relevant GL Accounts. It meanse the values should be based on cash receipts and payments made. In this report I am getting overall values (not Pyament/Revenue reciept wise).
    Please suggest how we can achieve this ?.
    Thanks once agian
    Rao M

  • JDBC 2.0 method not implemented error using bea jDriver for MS-SQLServer 2000

    I'm trying to reconfigure WebLogic Portal 7.0 (Platform 7.0 SP2) to run on MS SQLServer
    2000. According to the supported platform docs, the MS JDBC driver is not supported
    by Portal, hence I'm using the BEA jDriver for SQLServer.
    I'm now getting the following error when starting up Weblogic Portal which requires
    a re-sync with the EBCC before the applications will work.
    <28-Aug-03 09:28:30 BST> <Error> <Data Synchronization> <000000> <Application:
    portalApp; Corrupted data encountered in the persistent store; PLEASE RE-SYNCHRONIZE
    YOUR APPLICATION DATA WITH MODE "refresh-from-client" BEFORE CONTINUING! Failure
    to do so may result in incomplete or otherwise corrupted server state.
    Exception[com.bea.p13n.management.data.repository.PersistenceException: Failed
    to refresh JDBC Persistence Manager.] - with embedded exception: [java.sql.SQLException:
    java.sql.SQLException: This JDBC 2.0 method is not implemented] at com.bea.p13n.management.data.repository.persistence.JdbcDataSource.refresh(JdbcDataSource.java:506)
    Has anyone else come across this problem and know how to resolve it. I have tried
    using the MS JDBC Driver on the off chance that it would work, but this also produced
    SQL Exceptions with the persistance store and would not work at all even after
    syncing with the EBCC

    Jim,
    Thanks, I'm awaiting for my account to be enabled with customer contract support.
    When this is done I will raise a case and send files as requested.
    In the mean time it's worth noting that these settings have been made. Connection
    to the DB is fine, the createDB, loadads, loaddocs and sync etc all worked fine.
    The problem only exists when restarting the server and the portal persistance
    store is trying to be refereshed. Once EBCC is re-synced all the DB access works
    fine.
    Steve
    Jim Litton <reply@newsgroup> wrote:
    Please open a support case and send in your set-environment.bat,
    db_settings.properties, and config.xml from your domain directory after
    trying the following.
    Given that your operating system is Windows for performing all database
    operations like create_db, loaddocs, sync. (because you should not
    bother trying to run them on with UNIX).
    Restore your set-environment.bat to it's original state. It does not
    need to be touched.
    Uncomment the MSSQL section in db_settings.properties.
    database=MSSQL
    db_version=2000
    jdbcdriver=weblogic.jdbc.mssqlserver4.Driver
    server=@MSSQL_SERVER@
    port=@MSSQL_PORT@
    dblogin=@MSSQL_USER@
    dbpassword=@MSSQL_PASSWORD@
    connection=jdbc:weblogic:mssqlserver4:@MSSQL_SERVER@:@MSSQL_PORT@
    The dataSyncPool entry in config.xml should appear as:
    <JDBCConnectionPool
    Name="dataSyncPool"
    DriverName="weblogic.jdbc.mssqlserver4.Driver"
    URL="jdbc:weblogic:mssqlserver4:@MSSQL_SERVER@:@MSSQL_PORT@"
    Properties="user=@MSSQL_USER@;password=@MSSQL_PASSWORD@"
    Password="@MSSQL_PASSWORD@"
    InitialCapacity="1"
    MaxCapacity="5"
    CapacityIncrement="1"
    RefreshMinutes="99999"
    ShrinkingEnabled="false"
    Targets="sampleportalServer"
    TestConnectionsOnReserve="false"
    TestTableName="WEBLOGIC_IS_ALIVE"
    />
    -- Jim

  • Execute Method must not return a resultSet

    Hi.
    I am using DataModifyQuery to insert a record in MS SQL. On that Table there is one trigger defined whcih in turn insert data into some other table. in case there is any error the trigger return a error message.
    When i execute the Sql with DataModifyQuery and there is a error return from the trigger then Toplink gives me a error message.
    Execute Method must not return a resultSet
    how can i over come this sistuation.
    Thanks.

    Nadir wrote:
    I was lost. Right, there was no return statement. Below works now
    public String getIPAddress(){
    String hostip = "";
    try {
    hostip = InetAddress.getLocalHost().getHostAddress();
    System.out.println("ip is "+hostip);
    } catch (UnknownHostException e) {
    hostip = e.getMessage();
    return hostip;
    -----It compiles. I wouldn't say it works. If I call a method getIPAddress(), I expect the String I get back to be an IP address. I don't want to have to parse it to determine that it's not an error message. That defeats the whole purpose of the exception mechanism. If that method can't get the IP address, it should throw an exception. In this case, there's no reason to catch the exception; just let it propagate up out of that method.
    Beginners often seem to think that exceptions are something that just arose on their own out of the language, and the designers had to add try/catch in order to be able to stop them from preventing our code executing. That's not the case. They were deliberately added to the language as a better way of indicating an error than checking return values at every step.

  • JDBC 2.0 method is not implemented : weblogic.jdbc.mssqlserver4.TdsResultS

    Hey Guys,
    We are running our application on weblogic8.1 server (AIX box). Our application keeps throwing this error. Has anyone of you come across this error before.
    java.sql.SQLException: This JDBC 2.0 method is not implemented at weblogic.jdbc.mssqlserver4.TdsResultSet.getType(TdsResultSet.java:684) at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_mssqlserver4_TdsResultSet.getType(Unknown Source) at weblogic.jdbc.rmi.internal.ResultSetImpl.isResultSetCacheable(ResultSetImpl.java:140) at weblogic.jdbc.rmi.internal.ResultSetImpl.isRowCaching(ResultSetImpl.java:109) at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_weblogic_jdbc_mssqlserver4_TdsResultSet_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code)) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Thanks Regards Richi

    Rachith Srinivas wrote:
    Hey Guys,
    We are running our application on weblogic8.1 server (AIX box).
    Our application keeps throwing this error. Has anyone of you come across
    this error before.
    java.sql.SQLException: This JDBC 2.0 method is not implemented
    at weblogic.jdbc.mssqlserver4.TdsResultSet.getType(TdsResultSet.java:684)
    ...Hi. That old driver is telling you the truth. That JDBC 2.0 method is not implemented.
    There has been no development of that driver since soon after the JDBC 2.0 spec was
    finalized. We provide the weblogic.jdbc.sqlserver.SQLServerDriver in the 8.1 server,
    and heartily recommend you switch to it. It's a much superior driver, and has the
    considerable benefit if being fully supported and updated. The old ms4 driver is
    strongly deprecated and won't exist in the next release of WebLogic.
    Joe

  • JDBC Statement Profiling

    Hi,
    I have turned on JDBC Statement Profiling on my server. I can
    get the statements being executed, but the Start & Stop times or
    all Statements is the same. The relevant code and output follows.
    Anybody see what I am doing wrong.
    thanks,
    Harish.
    public static void printJDBCStatement(JDBCStatementProfile mb) {
    System.out.println("\tStatement: " + mb.getStatementText());
    System.out.println("\t\ttime = " + mb.getTimeTaken());
    System.out.println("\t\tstarttime = " + mb.getStartTime());
    System.out.println("\t\tendtime = " + mb.getStopTime());
    System.out.println("\t\tthread = " + mb.getThreadId());
    System.out.println("\t\tParams:");
    int cnt = mb.getParameterCount();
    for(int i=0; i<cnt;i++) {
    System.out.println("\t\t\tParam " + (i+1) + mb.getParameter(i+1));
         Statements:
         Statement: INSERT INTO QUERY (ID, TYPE, OWNER, OBJVERSION) VALUES (?, ?, ?,
    0)
              time = 0
              starttime = 1033591935157
              endtime = 1033591935157
              thread = Thread-15
              Params:
                   Param 132397
                   Param 212650
                   Param 399999999
         Statement: SELECT OBJVERSION FROM QUERY WHERE ID = ? FOR UPDATE NOWAIT
              time = 0
              starttime = 1033591935167
              endtime = 1033591935167
              thread = Thread-15
              Params:
                   Param 132397
         Statement: DELETE FROM SELECT_LIST WHERE QUERY_ID = ?
              time = 0
              starttime = 1033591935177
              endtime = 1033591935177
              thread = Thread-15
              Params:
                   Param 132397
         Statement: SELECT 5, OBJVERSION, 0 FROM QUERY WHERE ID = ?
              time = 0
              starttime = 1033591935187
              endtime = 1033591935187
              thread = Thread-15
              Params:
                   Param 132397

    "Harish" <[email protected]> wrote in message
    news:[email protected]..
    >
    I know for a fact that the statements take more than a 1ms.Could you try to run this code and tell what it prints?
    public class test {
    public static void main(String args[]) throws Throwable {
    long previousTime = 0;
    long currentTime = 0;
    for (int i = 1; i < 1000000; i++) {
    previousTime = System.currentTimeMillis();
    // Thread.sleep(20);
    currentTime = System.currentTimeMillis();
    if (currentTime != previousTime) {
    System.out.println("Difference: " + (currentTime - previousTime));
    Regards,
    SlavaImeshev
    >
    thanks,
    Harish.
    "Slava Imeshev" <[email protected]> wrote:
    Hi Harish,
    AFAIR this fact means that execution time is
    less than 1ms. It's because java timer is not
    very good at measuring precise periods of time.
    So these digits are pretty good :)
    Regards,
    Slava Imeshev
    "Harish" <[email protected]> wrote in message
    news:3d9b6cfd$[email protected]..
    Hi,
    I have turned on JDBC Statement Profiling on my server. I can
    get the statements being executed, but the Start & Stop times or
    all Statements is the same. The relevant code and output follows.
    Anybody see what I am doing wrong.
    thanks,
    Harish.
    public static void printJDBCStatement(JDBCStatementProfile mb){>
    Statements:
    Statement: INSERT INTO QUERY (ID, TYPE, OWNER, OBJVERSION) VALUES
    0)
    time = 0
    starttime = 1033591935157
    endtime = 1033591935157
    thread = Thread-15
    Params:
    Param 132397
    Param 212650
    Param 399999999
    Statement: SELECT OBJVERSION FROM QUERY WHERE ID = ? FOR UPDATE NOWAIT
    time = 0
    starttime = 1033591935167
    endtime = 1033591935167
    thread = Thread-15
    Params:
    Param 132397
    Statement: DELETE FROM SELECT_LIST WHERE QUERY_ID = ?
    time = 0
    starttime = 1033591935177
    endtime = 1033591935177
    thread = Thread-15
    Params:
    Param 132397
    Statement: SELECT 5, OBJVERSION, 0 FROM QUERY WHERE ID = ?
    time = 0
    starttime = 1033591935187
    endtime = 1033591935187
    thread = Thread-15
    Params:
    Param 132397

  • Tracking SQL statements executed

    Hi,
    After obtaining a connection to my Oracle 10g database using JDBC, I would like to know if there is a way to track all SQL statements executed since the connection was made.
    This must be pretty easy, I'm just stumped.
    Thank you
    Tom

    Hi, and it's not that easy. The driver certainly doesn't
    keep track of what's been done, but look at the documentation
    regarding the logging the driver can be configured to do. It can
    print out everything it does, so some level of detail and degree,
    and that can be collected in a file and examined externally.
    That can be voluminous too... It might be more (or just as)
    practical to examine the DBMS-side session-auditing/logging
    features the DBMS may have to collect everything the session
    has done.
    HTH,
    Joe Weinstein at BEA Systems

  • Log for all the sql statement executed

    Hi,
    I would like to know how to see the log for all the sql statement executed starting from connection to all the database related actions.
    Is it something that i need to set it up in the driver?
    I'm using Tomcat and JDBC driver.
    Please reply.
    Thanks,
    Anjana

    Make your own.
    Calendar cal = new GregorianCalendar();
    int year = cal.get(Calendar.YEAR);
    int month = cal.get(Calendar.MONTH) + 1;
    int day = cal.get(Calendar.DAY_OF_MONTH);
    //use calendar object to get other infos such as time of query
    //append your query string
    File f  =new File ("c:\\jakarta-tomcat-3.2.4\\webapps\\ASD\\LOGS\\log" + df.format(day) + df.format(month) + year + ".txt");
                   if (! f.exists())
                        f.createNewFile();
                   FileWriter fw = new FileWriter (f, true);
                   // append new log to end of file
                   fw.write(buf.toString());
                   fw.write("\n");
                   fw.flush();
                   fw.close();
              catch (IOException ioe)
                   System.out.println(ioe.toString());

  • MDMJavaAPI: Execute() method is not running.

    Hi Gurus,
    I am trying to delete the repository using MDMJavaAPI.
    Here is the whole code for deleting repository.
    =============================================import com.sap.mdm.commands.AuthenticateRepositorySessionCommand;
    import com.sap.mdm.commands.CommandException;
    import com.sap.mdm.commands.CreateRepositorySessionCommand;
    import com.sap.mdm.commands.DestroySessionCommand;
    import com.sap.mdm.net.ConnectionException;
    import com.sap.mdm.net.ConnectionPool;
    import com.sap.mdm.net.ConnectionPoolFactory;
    import com.sap.mdm.repository.RepositoryStatus;
    import com.sap.mdm.repository.commands.DeleteRepositoryCommand;
    import com.sap.mdm.repository.commands.GetRepositoryStatusCommand;
    import com.sap.mdm.server.DBMSType;
    import com.sap.mdm.server.RepositoryIdentifier;
    @author tarunsha
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class TestDeleteRepository {
                        public static final int STATE_NOT_CONNECTED = 0;
                        public static final int STATE_CONNECTED = 1;
                        public static int state = STATE_NOT_CONNECTED;
                        public static ConnectionPool simpleConnection;
                        public static RepositoryIdentifier repIdentifier;
                        public static String session;
                        public static String connection = "ntbomsap14";
                        public static String repository = "Test_JavaMDMapi_Tarun";
                        public static DBMSType dbmsType = DBMSType.MS_SQL;
                       public static void main(String[] args)throws CommandException, ConnectionException {
                       //Creating Connection.
                       simpleConnection = ConnectionPoolFactory.getInstance(connection);     
                       //Establishing connection with Repository.
                       repIdentifier = new RepositoryIdentifier("Test_JavaMDMapi_Tarun", connection, dbmsType);
                       //Creation Repository Session.
                       CreateRepositorySessionCommand createRepositorySessionCmd = new CreateRepositorySessionCommand(simpleConnection);
                       createRepositorySessionCmd.setRepositoryIdentifier(repIdentifier);
                       createRepositorySessionCmd.execute();
                       System.out.println("Create Repository Session Cmd is Executed.......");
                       session = createRepositorySessionCmd.getRepositorySession();
                       System.out.println("STATE_CONNECTION_ESTABLISHED.....");
                       AuthenticateRepositorySessionCommand authenticateRepositorySessionCmd = new AuthenticateRepositorySessionCommand(simpleConnection);
                       authenticateRepositorySessionCmd.setSession(session);
                       authenticateRepositorySessionCmd.setUserName("Admin");
                       authenticateRepositorySessionCmd.setUserPassword("");
                       authenticateRepositorySessionCmd.execute();
                        session = authenticateRepositorySessionCmd.getSession();
                        GetRepositoryStatusCommand getRepStatusCmd = new GetRepositoryStatusCommand(simpleConnection);
                        getRepStatusCmd.setSession(session);
                       getRepStatusCmd.execute();
                        RepositoryStatus repStatus = getRepStatusCmd.getStatus();  
                        if(repStatus.getStatus() == RepositoryStatus.RUNNING) {
                        System.out.println("Cannot delete a repository with status running! Canceling deletion process...");
                        destroy(session);     
                      DeleteRepositoryCommand deleteRepCmd = new DeleteRepositoryCommand(simpleConnection); deleteRepCmd.setRepositoryIdentifier(repIdentifier);     
                      deleteRepCmd.setSession(session);
                      // Excute the command...
                      System.out.println("Running");//Just for checking wheather control is reaching here or not.
                    deleteRepCmd.execute();
         System.out.println("Execution of DeleteRepositoryCommand successful.");
                      destroy(session);
                      public static void destroy(String session) throws CommandException{
                                  DestroySessionCommand destroySessionCmd = new DestroySessionCommand(simpleConnection);
                                  destroySessionCmd.setSession(session);
                                  destroySessionCmd.execute();
                                  session = null;
                                  System.out.println("STATE CONNECTION is DESTROYED......");
    =============================================
    When control reaches at execute method of DeleteRepositoryCommand class, it displays the following error msg.
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: The current Protocol operation is not supported for the session specified.
    *     at com.sap.mdm.repository.commands.DeleteRepositoryCommand.execute(DeleteRepositoryCommand.java:69)*
    *     at Test_Package.TestDeleteRepository.main(TestDeleteRepository.java:85)*
    Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The current Protocol operation is not supported for the session specified.
    *     at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:112)*
    *     at com.sap.mdm.repository.commands.DeleteRepositoryCommand.execute(DeleteRepositoryCommand.java:64)*
    *     ... 1 more*
    Exception in thread "main"
    Could you suggest me, what i have to do in this situation.
    I need your help.
    Edited by: Tarun Sharma on Jan 2, 2008 5:46 PM
    Edited by: Tarun Sharma on Jan 2, 2008 5:50 PM
    Edited by: Tarun Sharma on Jan 3, 2008 11:32 AM

    Hi Namrata,
    If we are deleting an repository, it means we are making connection with repository that's why we have to createRepositorySession rather than serverSession.
    According to this JavaDoc note:
    "NOTE: This command used to take in a repository session. This command had be changed to take in a server session. The setRepositoryIdentifier is also required."
    the method setRepositoryIdentifier is defined in CreateRepositorySessionCommand not in ServerSessionCommand. That's why we have to use RepositorySessionCmd.
    According to your advice I changed CreateRepositorySessionCommand and AuthenticateRepositorySessionCommand with ServerSessionCommand and AuthenticateServerSessionCommand but getting Same Error "The current Protocol operation is not supported for the session specified."
    Thanks
    Tarun
    Edited by: Tarun Sharma on Jan 3, 2008 10:44 AM

  • Batching disparate JDBC statements

    I am trying to batch execute a bunch of JDBC statements which are disparate - ie. insert , update. Is there a way to do this via Oracle's Thin JDBC driver? Someone mentioned that it might be possible using Oracle JDBC Callable statement interface to bunch together a bunch of SQL statements(not stored procedures) - but i could not find any information on this.
    Thanks

    Seems like you are making it harder than it needs to be. What is wrong with JDBC batching or even Oracle Style batching?
    PreparedStatement psIns = con.prepareStatement( <some insert statement> );
    PreparedStatemetn psUpd = con.prepareStatement( <some update statement> );
    for ( int at = 0; at < numRecsToInserAndUpdate; ++at )
        psIns.setLong( 1, uids[at] );
        psIns.setBlah( 2, ... );
        psIns.addBatch();
        psUpd.setString( 1, updateStrings[at] );
        psUpd.addBatch();
    psIns.executeBatch();
    psUpd.executeBatch();The above example uses JDBC style batching, you can as easily do this with Oracle style batching.
    R.

  • Using value selected in selectOneChoice as variable for execute method

    I have already created data controls for the session bean method so I can drag and drop on to the jsp. This works fine when entering the data into the input text fields but I really need the first value to come from an initial page and the second value to come from the dropdown. I just don't know how to get the value or how to connect it to the button for execution.
    The method takes two values
    value 1, org is passed in (how do I pass from another page? I will actually have the render for this input field set to false so it does not display)
    value 2, typeId from a selectonechoice drop-down list (how do I manipulate the soc to pass the information? Currently it looks as if it is just passing the elementAt number, I need get the actual value for the item selected. Where can I retrieve it?)
    I have a button ready to execute the method on the session bean which should take these values. (of course the inputvalue for the soc was not typeId but I changed it. The values for the soc are actually coming from another method performed earlier.)
    This is what I have so far:
    I have my input text field waiting on info to be populated from the previous page (currently I manually entered it)
    I have my selectonechoice populated
    A button with the execute method already set (b/c I initially used the drag-drop functionality to test my method)
    Forgive me for repeating myself so much.
    Thanks!

    Passing a value between pages:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#BABIHDAA
    Getting a value from a list item:
    http://www.oracle.com/technology/products/jdev/tips/mills/listvalue/listbindingvalue.html
    http://blogs.oracle.com/shay/2009/11/getting_the_value_from_a_selec.html

Maybe you are looking for