Scrollable Result Set Problem With j2sdk1.4.0_01/jakarta-tomcat-4.0.1

Consider the Following Code with j2sdk1.4.0_01/jakarta-tomcat-4.0.1
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
     String sql="select * from <Table Name> ";
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
*************Some Code ******************
catch (Exception ex) {
ex.printStackTrace();
}//End of catch     
}//End of Try
The Tomcat automatically shuts down If I'm using Scrollable
Result Set and the following Error Occurs.
          Error
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D366658
Function=[Unknown.]
Library=c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
     at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
     at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(JdbcOdbc.java:4676)
     at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr(JdbcOdbcResultSet.java:4473)
     at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:171)
     at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:423)
     - locked <02A1FE80> (a sun.jdbc.odbc.JdbcOdbcStatement)
     at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
     at org.apache.jsp.DocumentsPendingReport$jsp._jspService(DocumentsPendingReport$jsp.java:127)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
     at java.lang.Thread.run(Thread.java:536)
Dynamic libraries:
0x00400000 - 0x00406000      c:\j2sdk1.4.0_01\bin\java.exe
0x77F80000 - 0x77FFB000      C:\WINNT\system32\ntdll.dll
0x7C2D0000 - 0x7C332000      C:\WINNT\system32\ADVAPI32.dll
0x7C570000 - 0x7C623000      C:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77D9E000      C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78045000      C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D445000      c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
0x77E10000 - 0x77E6F000      C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F79000      C:\WINNT\system32\GDI32.dll
0x77570000 - 0x775A0000      C:\WINNT\system32\WINMM.dll
0x75E60000 - 0x75E7A000      C:\WINNT\system32\IMM32.DLL
0x6CA60000 - 0x6CA68000      C:\WINNT\system32\LPK.DLL
0x66650000 - 0x666A4000      C:\WINNT\system32\USP10.dll
0x6D1D0000 - 0x6D1D7000      c:\j2sdk1.4.0_01\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000      c:\j2sdk1.4.0_01\jre\bin\verify.dll
0x6D210000 - 0x6D228000      c:\j2sdk1.4.0_01\jre\bin\java.dll
0x6D320000 - 0x6D32D000      c:\j2sdk1.4.0_01\jre\bin\zip.dll
0x6D2D0000 - 0x6D2DD000      C:\j2sdk1.4.0_01\jre\bin\net.dll
0x75050000 - 0x75058000      C:\WINNT\system32\WSOCK32.dll
0x75030000 - 0x75044000      C:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000      C:\WINNT\system32\WS2HELP.DLL
0x74FD0000 - 0x74FEE000      C:\WINNT\system32\msafd.dll
0x75010000 - 0x75017000      C:\WINNT\System32\wshtcpip.dll
0x6D250000 - 0x6D25A000      C:\j2sdk1.4.0_01\jre\bin\JdbcOdbc.dll
0x0BDC0000 - 0x0BDF2000      C:\WINNT\system32\ODBC32.dll
0x71780000 - 0x7180A000      C:\WINNT\system32\COMCTL32.dll
0x782F0000 - 0x78538000      C:\WINNT\system32\SHELL32.dll
0x70BD0000 - 0x70C34000      C:\WINNT\system32\SHLWAPI.DLL
0x76B30000 - 0x76B6E000      C:\WINNT\system32\comdlg32.dll
0x1F850000 - 0x1F866000      C:\WINNT\system32\odbcint.dll
0x0BF00000 - 0x0BF5E000      C:\WINNT\System32\SQLSRV32.dll
0x41090000 - 0x410BD000      C:\WINNT\System32\SQLUNIRL.dll
0x77800000 - 0x7781E000      C:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76631000      C:\WINNT\system32\MPR.DLL
0x77820000 - 0x77827000      C:\WINNT\system32\VERSION.dll
0x759B0000 - 0x759B6000      C:\WINNT\system32\LZ32.DLL
0x779B0000 - 0x77A4B000      C:\WINNT\system32\OLEAUT32.dll
0x77A50000 - 0x77B3C000      C:\WINNT\system32\ole32.dll
0x75170000 - 0x751BF000      C:\WINNT\System32\NETAPI32.dll
0x7C340000 - 0x7C34F000      C:\WINNT\System32\SECUR32.DLL
0x751C0000 - 0x751C6000      C:\WINNT\System32\NETRAP.DLL
0x75150000 - 0x7515F000      C:\WINNT\System32\SAMLIB.DLL
0x77950000 - 0x7797A000      C:\WINNT\system32\WLDAP32.DLL
0x77980000 - 0x779A4000      C:\WINNT\System32\DNSAPI.DLL
0x769A0000 - 0x769A7000      C:\WINNT\system32\NDDEAPI.DLL
0x1FA20000 - 0x1FA36000      C:\WINNT\System32\sqlsrv32.rll
0x0C390000 - 0x0C3A9000      C:\WINNT\system32\odbccp32.dll
0x0C3B0000 - 0x0C3BF000      C:\WINNT\system32\DBNETLIB.DLL
0x75500000 - 0x75504000      C:\WINNT\system32\security.dll
0x782D0000 - 0x782EF000      C:\WINNT\system32\msv1_0.dll
0x77440000 - 0x774B8000      C:\WINNT\system32\CRYPT32.DLL
0x77430000 - 0x77440000      C:\WINNT\system32\MSASN1.DLL
0x77BF0000 - 0x77C01000      C:\WINNT\system32\ntdsapi.dll
0x782C0000 - 0x782CC000      C:\WINNT\System32\rnr20.dll
0x77340000 - 0x77353000      C:\WINNT\system32\iphlpapi.dll
0x77520000 - 0x77525000      C:\WINNT\system32\ICMP.DLL
0x77320000 - 0x77337000      C:\WINNT\system32\MPRAPI.DLL
0x773B0000 - 0x773DF000      C:\WINNT\system32\ACTIVEDS.DLL
0x77380000 - 0x773A3000      C:\WINNT\system32\ADSLDPC.DLL
0x77830000 - 0x7783E000      C:\WINNT\system32\RTUTILS.DLL
0x77880000 - 0x7790E000      C:\WINNT\system32\SETUPAPI.DLL
0x7C0F0000 - 0x7C151000      C:\WINNT\system32\USERENV.DLL
0x774E0000 - 0x77513000      C:\WINNT\system32\RASAPI32.DLL
0x774C0000 - 0x774D1000      C:\WINNT\system32\RASMAN.DLL
0x77530000 - 0x77552000      C:\WINNT\system32\TAPI32.DLL
0x77360000 - 0x77379000      C:\WINNT\system32\DHCPCSVC.DLL
0x777E0000 - 0x777E8000      C:\WINNT\System32\winrnr.dll
0x777F0000 - 0x777F5000      C:\WINNT\system32\rasadhlp.dll
0x77920000 - 0x77943000      C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000      C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000      C:\WINNT\system32\PSAPI.DLL
Local Time = Sat May 01 11:30:40 2004
Elapsed Time = 5
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002D5
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
# Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
Also No Error is Thrown with j2sdk1.4.0
If I'm using Not using Scrollable Result Set, No Error is Thrown.
Error is Thrown only with Scrollable Result set and with j2sdk1.4.0_01

Did you forget to put the SQL statement in when you used createStatement? I added it below:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
String sql="select * from <Table Name> ";
Statement stmt=conn.createStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
Does the JDBC-ODBC bridge driver accomodate any of these settings you're trying?
The problem shouldn't have anything to do with Tomcat. Sounds like a JDBC driver issue to me. Try to reproduce the error without Tomcat, and then see if adding the SQL corrects things at all.
I'd read the docs to see if the bridge driver has these features. I don't think it's up to the full standard.

Similar Messages

  • Result set problem with GROUP BY

    hi there, this should be the simplest of queries but.........
    when run, the list size is 13, this is the number of letting units in the table. it appears not to be grouping by the property id.if it was doing this there should only be 8 rows. having said this, the while loop should output the count of each row, it does this 8 times with the correct counts. it then crashes with a invalid curser error. it appears the query is workig correctly but the resultset thinks its got 13 rows when it only has 8.
    accessing ms access db
    using jdbc:odbc
    heres the code
    searchResults = stmt.executeQuery(
    "SELECT Count(*) AS FreeUnits " +
    "FROM letting_units " +
    "GROUP BY letting_units.property_id");
    searchResults.last();
    listSize = searchResults.getRow();
    searchResults.beforeFirst();
    System.out.println(listSize);
    while (searchResults.next())
    System.out.println(searchResults.getString(1));
    hope someone can help me
    cheers
    andy

    It's not the problem with GROUP BY. You should use scrollable result set to move in both directions (forward and backward).
    In your code
    searchResults.beforeFirst(); line may return false. So you will get the searchResults.next() false. Once you move forward in non-scrollable cursor cannot come back. So when you create the statement object use TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE constants provided in the ResultSet.

  • Scrollable result set fails with doubles

    Hi there,
    i have a strange behaviour using the 10g thin JDBC driver:
    Using a scrollable result set the driver fails reading a BINARY_DOUBLE value from the result set with rs.getDouble(column) as long as the value is not null. The SQLException reports "Conversion to double failed".
    When i use a forward-only result set instead, the value can be retrieved without any error. Can anyone explain this or give a workaround?
    Thanks in advance,
    Thorsten

    ThorstenS,
    ScrollableResultSet stores BINARY_DOUBLE column as oracle.sql.BINARY_DOUBLE & since, oracle.sql.BINARY_DOUBLE does not have method to convert to double you are seeing this error.
    The workaround would be to do,
    rs.getBINARYDOUBLE(1).stringValue()
    & please file an enhancement request against Jdbc.
    =
    Ashok

  • Updateable scrollable result sets with join statement

    I am writing a generic GUI fronend for any database that has a JDBC2.0 driver available.
    I have been using scrollable updateable result sets. These work well for individual tables but as soon as two tables are linked either implicitly or explicitly with a join statement the result set meta data isDefinitelyWriteable is set to false thus preventing the result set from being updated.
    Assuming I am using the JDBC-ODBC driver with java sdk1.4.0 and MS Access (although I have used other databases and JDBCs I assume that the one mentioned will be a common combination and needs to work) is there any way of getting linked tables to be updateable with scollable result sets.
    I am using scrollable result sets since this prevents the necessity of putting the data in a secondary data store.
    I am able to link tables programmatically by requerying the linked table with a new where clause each time the cursor moves in the linked table but this seems rather wasteful. This method is not vey satisfactory when attempting to display data from more than one table which have more than one linked level (i.e. cascaded links).
    Is there a simple solution to this problem or do I have to do a rewrite using an update statement instead of having an updateable result set. I assume this method would also require the result set to be reloaded after the update.
    Any suggestions much appreciated.

    I am trying to make the GUI as flexible as possible by constructing "views" which if necessary link tables on one field in each table. This is fine for two tables but when linking to several tables the information thats produced cannot be read easily because as it stands the information from each table is displayed on a separate tabbed page. This mechanism allows me to keep each record set for each table separate and updateable.
    Since I could see that this was not very user friendly in the way that it displayed the data I decided to try and introduce a join on two or more tables and hence the introduction of the current problem.
    I mentioned that the objective was to be flexible and therefore I also allow queries to be written by the user to facilitate for any shortfalls of the automatic query construction produced by using the "views" mechanism.
    So the answer to your question is yes I do control the SQL selections with one mechanism but ultimately no I do not because I provide a fail safe which allows the user to enter arbitary SQL.
    I only really want a solution for the controlled SQL construction mechanism where I create the link between two or more tables. As mentioned earlier these are linked on one field only but I wish to provide the option of displaying the result in a single table (tabbed page) rather than spread across multiple tabbed pages.

  • Please help - Scrollable result set in sql server 2000

    Hi can some one please help me. I'm trying to create scrollable result set in sql server 2000, but i just can't get it to work. I've been trying to do this for the past 12 hours. I want to go home, but I can't till I get this going! please help!!! My crap code is as follows:
    package transact;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JInternalFrame;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class DummyFrame extends Dummy
    protected String name, surname;
    protected Connection conn;
    protected CallableStatement cstatement;
    public DummyFrame()
    createFrame();
    private void createFrame()
    try
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    conn = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://server:1433;" +
    "user=user;password=pwd;DatabaseName=Northwind");
    catch (Exception e)
    e.getMessage();
    populateFields();
    menuAction();
    show();
    private void menuAction()
    btncontacts.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    getRecords();
    populateFields();
    btncontacts.setText("NEXT");
    btnkeywords.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    // transaction.getRecords();
    nextRecord();
    populateFields();
    btncontacts.setText("NEXT");
    protected void nextRecord()
    try
    // CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    cstatement.getMoreResults();
    catch (Exception e)
    e.getMessage();
    protected void getRecords()
    try
    CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    name = rs.getString("Firstname");
    rs.first();
    // call stored procedure
    catch (Exception e)
    e.getMessage();
    // populate the fields;
    private void populateFields()
    txtfirstname.setText(name);
    txtsurname.setText(surname);
    }

    ummm ok i think the logic in your code is kinda screwy...
    here is what your should be doing.
    create the gui.
    get the resultset...
    have code that looks like this for nextRecord...
    protected void displayNextRecord(){
      // we do not call next here because we already called it last time
      surname = rs.getString("Lastname");
      name = rs.getString("Firstname");
      populateFields();
      if(!rs.next(){
        btncontacts.setEnabled(false);// i'm not sure what btncontacts is but we want to disable next becuase there are no more records...
    // in your intitalization code you need to do this...
    // you old stuff ending with...
    ResultSet rs = cstatement.executeQuery();
    // the new stuff...
    if(rs.first()){
      displayNextRecord();
    }else{
      btncontacts.setEnabled(false);//the result set is empty
    }ok the real problem you are having is that you are trying to display one record at a time but you are scrolling
    through the entire result set using while(rs.next()... what you
    want to do is create the result set once and scroll through
    it one item at a time with your gui.
    the example method i have given displays the data from the current
    row in your gui. then it advances the result set forward one row if possible. this method assumes that the result set will always
    be positioned on a valid row thus the need for calling
    rs.first() before we originally call displayNextRecord()
    well i hope you find this helpful.

  • Org.hibernate.AssertionFailure: scrollable result sets are not enabled

    I am using hibernate with oracle and got the following code snippet:
    ScrollableResults results = criteria.scroll(ScrollMode.SCROLL_SENSITIVE);
    When I run the above snippet I get the following exception:
    org.hibernate.AssertionFailure: scrollable result sets are not enabled
    I'm using hibernate 3.2.2.ga and oracle 10g
    Can someone help me? How can I solve this problem?
    Victor Lindberg
    Edited by: user5745495 on 01/04/2010 14:15

    This is the "Database - General" forum for the Oracle Database.
    Please change the subject to "Please Ignore" and repost your question in a Java / JDeveloper forum.
    Thank you.

  • Database driver that allows scrollable result set

    I attempted to create a scrollable result set with the following create statement.
    s = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    I received the following error at runtime.
    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Driver not capable
    Anyone know of a Foxpro driver that supports scrollable result sets or another solution to this problem.
    Thanks,
    Brian

    I don't know if you just mistyped your original question, but to create a scrollable resultset you have to give it a the statement constructor a ResultSet.TYPE_SCROLL_INSENSITIVE parameter:
    s = c.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);maybe your driver does not support ResultSet.CONCUR_UPDATABLE??
    Jamie

  • Scrollable Result Set in Oracle 8.1.6 ?

    The Oracle8i Release 2 New Features Summary says::
    JDBC 2.0 core support plus connection pooling and distributed transactions.
    My Question is : 8.1.6 provide full JDBC 2.0
    Support or just some features not specified?
    Is there support for an scrollable Result set ?
    I hope somebody can answer
    thanks ITDEVEL

    ITDEVEL,
    Openlink Software provides JDBC 2.0 Core API compliancy in Type-1, Type-2, and Type-3 JDBC driver suites. This includes full support for opening scrollable resultset statements. The Multi-Tier Driver Suite offers a degree of high performance, scalability and security that distinguish it from other JDBC middleware solutions on the market.
    Try a free non-expiring limited seat license at http://www.openlinksw.com. Click on "Software Availability and Download" then "Multi-Tier Download" to select based on your environment.
    Installation help can be found at http://www.openlinksw.com/info/docs/rel3doc/unix/servunix.htm
    Specific information on contructing the URL string with the drivers can be found at:
    http://www.openlinksw.com/info/docs/rel3doc/jdbc/cliclass.htm
    Best regards,
    Stephen Schadt
    Openlink Software, Inc.

  • Scrollable Result Set

    I am trying to use a scrollable result set in Java so that I can page the result set on the client at 150 records at at time. The problem is, when there is lots of rows (200K+) the client running the query runs out of memory. To solve this, I limited the rows using setMaxRows(30000). I would like to not have to limit it in this way, but I can't seem to find a solution. Also, since I want to be able to page through all rows, no matter how many, is it possible that the select statement will crash the server at some point as well (if it is a SELECT * FROM TABLE)? If say there were millions of records? How do people solve these kinds of situations?
    String query = "SELECT * FROM EventDetail";
    Statement stmt = con.createStatement(
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    stmt.setMaxRows(30000);
    rs = stmt.executeQuery(query);

    Hi,
    u can use rowcount for making ur results scrollable. just use one variable for page no. Example
    select position,empno,empname FROM (select rowcount position,empno,empname from employee where rowcount < (pageno*pageno)
    Thanks,
    Harish

  • Java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets

    Hi All,
    I am using Oracle 11g and I am trying to delete some records from database using some GUI. In that case I am getting following error:
    java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets are not enabled. When I restart the application's service, this error is going away and deletion is working fine.
    Other related jars that I am using is as follow:
    ojdbc5.jar
    hibernate-3.0.5.jar
    I am attaching the stack trace as well:
    <log4j:event logger="org.hibernate.AssertionFailure" timestamp="1263964931355" sequenceNumber="24" level="ERROR" thread="SocketListener0-2">
    <log4j:message><![CDATA[an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)]]></log4j:message>
    <log4j:throwable><![CDATA[org.hibernate.AssertionFailure: scrollable result sets are not enabled
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
    at org.hibernate.loader.Loader.scroll(Loader.java:1634)
    at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443)
    at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291)
    at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960)
    at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62)
    at com.sample.persistence.WorklistItemDAO.purge(WorklistItemDAO.java:145)
    at com.sample.server.worklistmanager.WorklistManager.purge(WorklistManager.java:695)
    at com.sample.server.webservices.CCGPIWorklistHandler.purge(CCGPIWorklistHandler.java:329)
    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:585)
    at org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
    at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
    at com.sample.server.webservices.XmlRpcServlet.service(XmlRpcServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    ]]></log4j:throwable>
    </log4j:event>
    Thanks
    Shiv

    Hi All,
    anybody got a chance to look into it?
    --Shiv                                                                                                                                                                                                       

  • Java.sql.Statement.setFetchSize(int) option for non-scrollable result sets

    Hello!
    Our tests indicate that fetch size option mentioned makes visible difference in performance for non-scrollable result sets also. In the same time, it seems there is no way to set this option for such result sets at TopLink level, and default fetch size is always used instead.
    Can somebody propose a solution for this, I mean a way to specify custom fetch size (for results without any scrolling)?
    Thanks,
    Sergey

    To set the JDBC fetch size for a query, use the following APIs:
    int desiredFetchSize = 500;
    ReadAllQuery query = new ReadAllQuery(YourClass.class);
    CallQueryMechanism queryMechanism =
    (CallQueryMechanism) query.getQueryMechanism();
    DatabaseCall call = queryMechanism.getCall();
    call.setResultSetFetchSize(desiredFetchSize);
    If you wish to set the fetch size for all queries, consider using named queries for all queries (see the TopLink documentation for more information on named queries), and then configure them on startup.
    Information taking from Metalink Note:237093.1

  • Problem with scrollable result set

    hi
    can u please tell me how i can get no of rows from a result set..
    i am using thin drivers and connecting to remote database,every thing is working fine if i use fwd only type ,but if u use sensitive type it is giving error
    code:
    stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    i am geting error at this line
    error :
    java.lang.AbstractMethodError:oracle/jdbc/driver/oracleconnection.createStatement
    please help me

    does your jdk include jdbc 2.0? Is your driver updated to support jdbc 2.0 features? have you recently updated either(and forgot to change the classpath)?
    I am running jdk 1.3 and oracle thin(classes12.zip) have not had problems creating/using scrollable resultsets??
    Jamie

  • Result Set problem!!!Plz urgent

    Hi,
    I am using jsp page with database connection.In jsp page i have two button called move next and move previous.
    In database 2 records are there.If i open the jsp page first record will be displayed.If i click next record it showing 2nd record.If i click previous record it showing 1st record.Once again if i click next record it is showing that record not found...........What may be the problem????.
    Note:For each time button click i will pass the result set object in session variable.Whether it is a correct one..
    Plzz help me ya...........

    this is for move next:::
    ResultSet result=null;
    Connection connection=null;
    String candyid="";
    result = (ResultSet)session.getAttribute("resget");
    result.next();
    if(!result.next())
    %>
    <Script>
    alert("Record Not Found");
    </Script>
    <%
    result.previous();
    candyid=result.getString(1);
    session.setAttribute("resget",result);
    %>
    <input type=hidden name="hide" value="yes">
    <input type=hidden name="nextid" value=<%= candyid %>>
    <Script>
    document.AddCandetails2.action="modifyCandidate1.jsp";
    document.AddCandetails2.submit();
    </Script>
    <%
    else
    candyid=result.getString(1);
    System.out.println("candi next id"+candyid);
    session.setAttribute("prevresget1",result);
    System.out.println("resultset for set attar in next"+result);
    %>
    <input type=hidden name="hide" value="yes">
    <input type=hidden name="nextid" value=<%= candyid %>>
    <Script>
    document.AddCandetails2.action="modifyCandidate1.jsp";
    document.AddCandetails2.submit();
    </Script>
    <%
    this is for move previous:::
    ResultSet result=null;
    Connection connection=null;
    String candyid="";
    if(session.getAttribute("prevresget1")==null)
    result = (ResultSet)session.getAttribute("resget");
    else
    result = (ResultSet)session.getAttribute("prevresget1");
    if(!result.previous())
    %>
    <Script>
    alert("Record Not Found");
    </Script>
    <%
    result.next();
    candyid=result.getString(1);
    session.setAttribute("resget",result);
    %>
    <input type=hidden name="hide" value="yes">
    <input type=hidden name="nextid" value=<%= candyid %>>
    <Script>
    document.AddCandetails2.action="modifyCandidate1.jsp";
    document.AddCandetails2.submit();
    </Script>
    <%
    else
    candyid=result.getString(1);
    session.setAttribute("prevresget1",result);
    %>
    <input type=hidden name="hide" value="yes">
    <input type=hidden name="nextid" value=<%= candyid %>>
    <Script>
    document.AddCandetails2.action="modifyCandidate1.jsp";
    document.AddCandetails2.submit();
    </Script>
    <%
    this is the code............... can u give me the solution

  • Oracle JDBC Thin Driver Memory leak in scrollable result set

    Hi,
    I am using oracle 8.1.7 with oracle thin jdbc driver (classes12.zip) with jre 1.2.2. When I try to use the scrollable resultset and fetch records with the default fetch size, I run into memory leaks. When the records fetched are large(10000 records) over a period of access I get "outofmemory" error because of the leak. There is no use increasing the heap size as the leak is anyhow there.
    I tried using optimizeit and found there is a huge amout of memory leak for each execution of scrollable resultsets and this memory leak is propotional to the no of records fetched. This memory leak is not released even when i set the resultset,statement objects to null. Also when i use methods like scrollabelresultset.last() this memory leak increases.
    So is this a problem with the driver or i am doing some wrong.
    If some of you can help me with a solution to solve this it would be of help. If needed i can provide some statistics of these memory leaks using optimize it and share the code.
    Thanks
    Rajesh

    This thread is ancient and the original was about the 8.1.7 drivers. Please start a new thread. Be sure to include driver and database versions, stack traces, sample code and why you think there is a memory leak.
    Douglas

  • Scrollable result sets

    I need a scrollable resultset. I have never had to use one before. I have research this some what. I am usin the following statement which i reference from the Sun site:
    Statement stmt2 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE);
    Problem is, I receive a "cannot resolve symbol"
    message when it tries to compile. Anyone have any ideas?
    Thanks.

    connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,                     ResultSet.CONCUR_READ_ONLY);
    OR.
    connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,                     ResultSet.CONCUR_UPDATABLE );
    make sure your driver(jdbc) supports the Scrollable drivers .
    all drivers can't support this type of result set.
    Oracle ThinDriver class12.zip will support this.
    and also some drivers will support.
    [email protected]

Maybe you are looking for

  • Devnagari/Gujarati Keyboard and eBook distribution

    Hi. I have simple question, which I am not able to find answer . Mavericks comes with inbuilt Devnagari and Gujarati Keyboard layouts. If I make use of that and create an eBook (Pages and than export to ePUB) containing that fonts, am I legally allow

  • ADF Faces + ADF BC : how to pass an url parameter to a backend business ser

    Hi, I'm using latest JDev studio version SU 3. My project is using ADF Faces with BC4J in the service layer. I have a backend application module which exposes a method taking a String parameter as an input (ex: void setUsername(String username)) I ne

  • HT4623 Can you update a 3GS without being connected to a carrier?

    I have an Iphone 3GS that was purchased to operate an ARdrone and needs to be updated to IOS5 to operate, can it be updated without being connected to a carrier? it is unlocked and when I go to settings then general there is no update tab to sellect?

  • Builder and IMAQ 1408

    Can anyone tell me how, using Borland Builder 3, I can acquire images from the IMAQ 1408 card? Melvyn.

  • Double click in tables

    Hi, i would like to get the selected field from a tabel with double clicking on the filed. What kind of action listener, selection listener should i use? Thx in advance: james