ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools - Weblogic

This is a discussion on ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools - Weblogic ; I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver and also created a Data Source. Each time I execute a stored procedure, I am only able to do a ResultSet.next(). I get an Unsupported Method exception when trying to do ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools

  1. ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools


    I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver
    and also created a Data Source. Each time I execute a stored procedure, I am
    only able to do a ResultSet.next(). I get an Unsupported Method exception when
    trying to do a ResultSet.beforeFirst, or ResultSet.absolute. Using Weblogic 8.1
    & SQL Server 2000

    Here is how I'm preparing the call:

    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");

    t.put(Context.PROVIDER_URL,"t3://server:7001");
    ctx = new InitialContext(ht);
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("DataSource");

    Connection connection = ds.getConnection();
    stmt = connection.createStatement(ResultSet.TYPE_SCROLL_I NSENSITIVE,ResultSet.CONCUR_UPDATABLE
    );
    cs = connection.prepareCall("{call spa_get_priorityRules()}");
    rs = cs.executeQuery();

    Thanks!




  2. Re: ResultSet is not scrollable using WL8.1 and MS SQL Server ConnectionPools



    Mark wrote:

    > I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver
    > and also created a Data Source. Each time I execute a stored procedure, I am
    > only able to do a ResultSet.next(). I get an Unsupported Method exception when
    > trying to do a ResultSet.beforeFirst, or ResultSet.absolute. Using Weblogic 8.1
    > & SQL Server 2000
    >
    > Here is how I'm preparing the call:
    >
    > Context ctx = null;
    > Hashtable ht = new Hashtable();
    > ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    >
    > t.put(Context.PROVIDER_URL,"t3://server:7001");
    > ctx = new InitialContext(ht);
    > javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("DataSource");
    >
    > Connection connection = ds.getConnection();
    > stmt = connection.createStatement(ResultSet.TYPE_SCROLL_I NSENSITIVE,ResultSet.CONCUR_UPDATABLE
    > );
    > cs = connection.prepareCall("{call spa_get_priorityRules()}");
    > rs = cs.executeQuery();


    Hi. Can you show me the text of the procedure? I wil try to duplicate this
    issue to test the driver.
    Joe

    > Thanks!
    >
    >
    >



  3. Re: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection


    -------------------------------------------------------------
    Here is the stored procedure:

    SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
    GO

    if exists (select * from sysobjects where id = object_id(N'[dbo].[spa_get_priorityRules]')
    and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    drop procedure [dbo].[spa_get_priorityRules]
    GO
    CREATE PROCEDURE spa_get_priorityRules
    AS
    SELECT * FROM PriorityRules
    GO

    SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
    GO

    GRANT EXECUTE ON [dbo].[spa_get_priorityRules] TO [AppGrp]
    GO

    Thanks Joe!

    ------------------------------------------------------------
    Joe Weinstein wrote:
    >
    >
    >Mark wrote:
    >
    >> I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver
    >> and also created a Data Source. Each time I execute a stored procedure,

    >I am
    >> only able to do a ResultSet.next(). I get an Unsupported Method exception

    >when
    >> trying to do a ResultSet.beforeFirst, or ResultSet.absolute. Using

    >Weblogic 8.1
    >> & SQL Server 2000
    >>
    >> Here is how I'm preparing the call:
    >>
    >> Context ctx = null;
    >> Hashtable ht = new Hashtable();
    >> ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    >>
    >> t.put(Context.PROVIDER_URL,"t3://server:7001");
    >> ctx = new InitialContext(ht);
    >> javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("DataSource");

    >
    >>
    >> Connection connection = ds.getConnection();
    >> stmt = connection.createStatement(ResultSet.TYPE_SCROLL_I NSENSITIVE,ResultSet.CONCUR_UPDATABLE
    >> );
    >> cs = connection.prepareCall("{call spa_get_priorityRules()}");
    >> rs = cs.executeQuery();

    >
    >Hi. Can you show me the text of the procedure? I wil try to duplicate
    >this
    >issue to test the driver.
    >Joe
    >
    >> Thanks!
    >>
    >>
    >>

    >





  4. Got it - Re: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection


    It was a mistake, I set the Scroll type for the Statement, but was not using it.
    I should have been doing this:

    CallableStatement cs = connection.prepareCall("{call spa_get_priorityRules()}",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCU R_UPDATABLE);


    Thanks
    "Mark" wrote:
    >
    >-------------------------------------------------------------
    >Here is the stored procedure:
    >
    >SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
    >GO
    >
    >if exists (select * from sysobjects where id = object_id(N'[dbo].[spa_get_priorityRules]')
    >and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    >drop procedure [dbo].[spa_get_priorityRules]
    >GO
    >CREATE PROCEDURE spa_get_priorityRules
    >AS
    >SELECT * FROM PriorityRules
    >GO
    >
    >SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
    >GO
    >
    >GRANT EXECUTE ON [dbo].[spa_get_priorityRules] TO [AppGrp]
    >GO
    >
    >Thanks Joe!
    >
    >------------------------------------------------------------
    >Joe Weinstein wrote:
    >>
    >>
    >>Mark wrote:
    >>
    >>> I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver
    >>> and also created a Data Source. Each time I execute a stored procedure,

    >>I am
    >>> only able to do a ResultSet.next(). I get an Unsupported Method exception

    >>when
    >>> trying to do a ResultSet.beforeFirst, or ResultSet.absolute. Using

    >>Weblogic 8.1
    >>> & SQL Server 2000
    >>>
    >>> Here is how I'm preparing the call:
    >>>
    >>> Context ctx = null;
    >>> Hashtable ht = new Hashtable();
    >>> ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    >>>
    >>> t.put(Context.PROVIDER_URL,"t3://server:7001");
    >>> ctx = new InitialContext(ht);
    >>> javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("DataSource");

    >>
    >>>
    >>> Connection connection = ds.getConnection();
    >>> stmt = connection.createStatement(ResultSet.TYPE_SCROLL_I NSENSITIVE,ResultSet.CONCUR_UPDATABLE
    >>> );
    >>> cs = connection.prepareCall("{call spa_get_priorityRules()}");
    >>> rs = cs.executeQuery();

    >>
    >>Hi. Can you show me the text of the procedure? I wil try to duplicate
    >>this
    >>issue to test the driver.
    >>Joe
    >>
    >>> Thanks!
    >>>
    >>>
    >>>

    >>

    >
    >
    >



  5. Re: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools


    Hi,

    I just wanna ask how u make a connection to mysql using weblogic8.1, because i'm
    facing problem to do so. An exception thrown whenever i create connection to mysql
    through server. I can lookup the datasource but exception thrown after that.
    The exception is "java.lang.NoClassDefFoundError: weblogic/jdbc/wrapper/PoolConnection"

    Can you please help me? Thanks a lot!

    Best Regards,
    Siau Wea



    "Mark" wrote:
    >
    >I've created a JDBC connection pool using the weblogic.jdbc.sqlserver.SQLServerDriver
    >and also created a Data Source. Each time I execute a stored procedure,
    >I am
    >only able to do a ResultSet.next(). I get an Unsupported Method exception
    >when
    >trying to do a ResultSet.beforeFirst, or ResultSet.absolute. Using Weblogic
    >8.1
    >& SQL Server 2000
    >
    >Here is how I'm preparing the call:
    >
    >Context ctx = null;
    >Hashtable ht = new Hashtable();
    >ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    >
    >t.put(Context.PROVIDER_URL,"t3://server:7001");
    >ctx = new InitialContext(ht);
    >javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("DataSource");
    >
    >
    >Connection connection = ds.getConnection();
    >stmt = connection.createStatement(ResultSet.TYPE_SCROLL_I NSENSITIVE,ResultSet.CONCUR_UPDATABLE
    >);
    >cs = connection.prepareCall("{call spa_get_priorityRules()}");
    >rs = cs.executeQuery();
    >
    >Thanks!
    >
    >
    >



  6. Re: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools

    "siauwea" wrote in message news:40984e5f@newsgroups.bea.com...
    > I just wanna ask how u make a connection to mysql using weblogic8.1, because i'm
    > facing problem to do so. An exception thrown whenever i create connection to mysql
    > through server. I can lookup the datasource but exception thrown after that.
    > The exception is "java.lang.NoClassDefFoundError: weblogic/jdbc/wrapper/PoolConnection"
    >
    > Can you please help me? Thanks a lot!


    Please check this:
    http://www.viewtier.com/newsgroups/t...ID=16&tstart=0

    Regards,

    Slava Imeshev



  7. Re: ResultSet is not scrollable using WL8.1 and MS SQL Server Connection Pools


    Hi,

    My Connection pool setting is as below:

    Name: MySQLConnectionPool
    URL : jdbc:mysql://localhost/mysql
    Driver Classname: org.gjt.mm.mysql.Driver
    Properties: user=root
    Password: ku
    Target: myserver

    And my classpath is:
    ""set CLASSPATH=C:\mysql\lib\mysql-connector-java-3.0.11-stable-bin.jar;%WEBLOGIC_CLASSPATH%;%JAVA_HOME%\jre\lib\r t.jar;%WL_HOME%server\lib\webservices.jar;%CLASSPA TH%"

    Is there something i missing in my setting??
    Why the exception always happen?

    Any help will be appreciated!!

    Best Regards,
    Siau Wea







    "Slava Imeshev" wrote:
    >"siauwea" wrote in message news:40984e5f@newsgroups.bea.com...
    >> I just wanna ask how u make a connection to mysql using weblogic8.1,

    >because i'm
    >> facing problem to do so. An exception thrown whenever i create connection

    >to mysql
    >> through server. I can lookup the datasource but exception thrown after

    >that.
    >> The exception is "java.lang.NoClassDefFoundError: weblogic/jdbc/wrapper/PoolConnection"
    >>
    >> Can you please help me? Thanks a lot!

    >
    >Please check this:
    > http://www.viewtier.com/newsgroups/t...ID=16&tstart=0
    >
    >Regards,
    >
    >Slava Imeshev
    >
    >



+ Reply to Thread