Problem opening 2 result sets

Hi we are having problems with leaking database connections. We are using the jdbc debug features of oc4j (9.0.2).
Basically we connect to database 1, do a query and open a result set, then create a connection to database 2 and try to execute a query on it. The problem is that if the first's resultset is open, the debugging complains that there are multiple open result sets. This is leading to database connections not getting release when they should be.
Here's an example of the code we are using (which is in a stateless session bean):
public void test(){
try {
Connection connection;
DataSource dataSource;
Context context = new InitialContext();
dataSource = (DataSource) context.lookup(Constants.NHHDC_DATABASE);
connection = dataSource.getConnection();
PreparedStatement statement = null;
ResultSet resultSet = null;
statement = connection.prepareStatement(" SELECT 'X' FROM DUAL");
resultSet = statement.executeQuery();
resultSet.next();
DataSource reamsDataSource;
Context reamsContext = new InitialContext();
reamsDataSource = (DataSource) reamsContext.lookup(Constants.REAMS_DATABASE);
Connection reamsConnection = reamsDataSource.getConnection();
PreparedStatement reamsStatement = null;
ResultSet reamsResultSet = null;
reamsStatement = reamsConnection.prepareStatement("SELECT 'X' FROM DUAL");
System.out.println("LAST STATEMENT");
reamsResultSet = reamsStatement.executeQuery();
System.out.println("FINISHED");
reamsResultSet.close();
reamsStatement.close();
reamsConnection.close();
resultSet.close();
statement.close();
connection.close();
} catch (NamingException e) {
System.out.println("naming error " + e.getMessage());
} catch (SQLException e) {
System.out.println("sql error " + e.getMessage());
The error coming from the debug is:
*********** OPEN SETS: ************
java.lang.Exception: com.evermind.sql.DebugPreparedResultSet@5e9f1
Is it not possible to have 1 resultset open on one database and a separate one on a different database? I know the example above could be written to close the result set first, but this is a simplified example of something we are doing just to hightlight the problem.
Any ideas appricated on why this complains.
Thanks
Andrew Moore

hi Andrew,
Just a hint: we are using more than 1 database connections at the same time. but in this case all datasources have to be non-emulated.
check this, maybe its the prob @ yours.
4 non-emulated datasources check the server guide of oc4j ..
http://technet.oracle.com/tech/java/oc4j/doc_library/902/servicesjun02/ds3.htm#1005742
cu
ed

Similar Messages

  • 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

  • Cauld i open a result set and open another before ending the first?

    in this code  i have an opened ResultSet and i want another one to b opened durring the action of the first  ..............can i do such a thing without opening a new connection? :_*<br /</strong>  <table width="100%" border="1">
    <%
    while(boolVar3)
    %> <tr>
    <td><%=res3.getString("patient_id")%></td>
    <td><%=res3.getString("patient_name")%></td>
    <td><%=res3.getString("patient_address")%></td>
    <td><%=res3.getString("patient_tel")%></td>
    <td><%=res3.getString("patient_dob")%></td>
    <td><%=res3.getString("patient_email")%> </td>
    <%
    user_id= res3.getInt("username_id");
    sataus_id=res3.getInt("patient_status_id");
    } res9=state.executeQuery("select * from patient_data join username on patient_data.username_id=username.username_id where patient_data.username_id='"+user_id+"'");
    if(res9.next())
    %>
    <td><%=res9.getString("username")%></td>
    <td><%=res9.getString("password")%>
    <%}
    res10=state.executeQuery("select * from patient_data join status_patient on patient_data.patient_status_id=status_patient.status_id where patient_data.patient_status_id='"+sataus_id+"'");
    if(res10.next())
    {%></td><td>
    <%=res10.getString("status_name")%></td></tr><%}} %>
    </table>

    yes u r right they r collection.
    try this java code pattern and reply.
    public class classname{
    ArrayList test1 = new ArrayList();
    ArrayList test2 = new ArrayList();
    String rsValue = "";
    test1.clear();
    ResultSet rs1 = st.executeQuery('....");
    while(rs1.next())
    rsValue = rs1.getString(1);
    test1.add(rsValue);
    ResultSet rs2 = st.executeQuery('....");
    while(rs2.next())
    rsValue = rs2.getString(1);
    test2.add(rsValue);
    }//end of class
    You shud know abt collections also mainly util package that helps in more ways try learning that

  • Problem of getting Result Set from Oracle 9iDB

    I have Oracle 9i DB installed on Win NT system. I created a SCHEMA called SCHATTOP and created a TABLE TEAM. From Oracle SQL*Plus screen, I signed on with userID "SCHATTOP", and my password "ANU1SAL". Then at SQL> Connect SCHATTOP/ANU1SAL .. Getting msg Connected. Then I am doing Select * from SCHATTOP.TEAM; It shows the contents of the table. But when I wrote a small program like this .. when I am calling the program I am getting this msg
    java DBLookup
    Connection Successful to Oracle DataBase .. !!!!
    SQLException caughtORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
    $
    This is my program :
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DBLookup {
    public static void main(String[] args) throws Exception {
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String url= "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=9.5.185.229)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=SAL400)))";
    con = DriverManager.getConnection(url,"SCHATTOP","ANU1SAL");
    System.out.println("Connection Successful to Oracle DataBase .. !!!!");
    stmt = con.createStatement( );
    rs = stmt.executeQuery("SELECT * FROM SCHATTOP.TEAM");
    while (rs.next()) {
    System.out.println(rs.getString("FN") + " " + rs.getString("LN"));
    catch (SQLException e) {
    System.out.println("SQLException caught" + e.getMessage( ));
    finally {
    try {
    if (con != null) con.close( );
    catch (SQLException ignored) { }
    Any help will be appreciated.

    Typically this error happens if a client tries to access a 9.0.1 database with an old 8.1.7 jdbc driver.
    This should be fixed in the jdbc driver of the 8.1.7.2.1 Patchset for Windows.
    Cheers
    Stefan

  • How to handle large result sets?

    Hi All,
    I have a large result set to be displayed to user using jsp's. Problem is that result set is too big, so I can't display all the records in a single push. I want to show the results page by page say 25 per page. Now for every page I have to fetch data from database, means there are going to be many database calls which is not advisable. Or i can cache data in a CachedRowSet to reduce database calls, but in this case you have to store all the data in memory which is not a good solution in case you have very large data sets. Can anybody suggest me a solution to this problem?

    The best thing for you to do is to implmeneting paging logic in conjunction with a scrollable resultset (JDBC 2.0+).
    The logic would go like this assuming 30 rows per page:
    - keep track of which page the user is on (e.g. page 3)
    - issue the full sql
    - scroll thru only the rows in the current page (e.g. rows 90-120)
    - copy the page's rows to value objects
    - close the resultset, statement, and connection
    In the above example, you would scroll to row 90 using rs.absolute(90).
    The efficiency comes from the fact that you're using a scrollable resultset. By using this, only the rows that you scroll thru are extracted out from the database. I performed some simple testing and with my data, and the scrollable resultset was about 10x in performance.
    Good luck!

  • 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

  • Problem in Retrive values from result set

    I have a class where i do all database operation .First i fire select query and take values from result set and based on that value i fire update query.
    Problem is that i am not getting all values from result set . i get only last value and when i fire update query i get error as :Resultset is closed.
    I am using acess and java.

    You probably are using the same Statement object for both queries? Try creating separate Statement objects for each query. (My guess is this a problem with the way you're using JDBC, not a Servlet issue.)

  • Problem in creating Saved Result Set (SRS) in OBIEE 10.1.3.4

    Hi,
    We have migrated Siebel Analytincs 7.8.5 to OBIEE 10.1.3.4, and we are now unable to create any SRS from OBIEE though we can create Segment and marketing cache for the segment.
    We did the following steps -
    1. Unisntall Siebel Analytincs 7.8.5
    2. Install OBIEE 10.1.3.4
    3. Use MIGRATE tool (sawmigrate) to migrate RPD & WEBCAT
    4. We have ALTERed the SRS tables - M_SR_HEADER, M_SR_ACCOUNT (as in OBIEE version there are many new columns have been added)
    5. We passed GLOBAL CONSISTENCY in the RPD
    6. We followed the steps in the document *"Oracle®Marketing Segmentation Guide Version 10.1.3.4 July 2008"*
    7. We created a Saved Result Set Format as instructed in the document - here we are very confused to select the list of columns - we don't know what should be the excat source / format
    8. Then we click the SRS create button
    9. We got the below error -
    Error Codes: QS2QOLYY:GDL67CY9:IHVF6OM7:OPR4ONWY:U9IM8TAC
    Error in getting cursor for WorkNode (Id:0)
    Authentication Failure.
    Odbc driver returned an error (SQLDriverConnectW).
    *State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused. [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)*
    Can anyone help us to resolve the issue ?
    A quick response is much much appreciated.
    Many Thanks,
    Prasanta

    Hi,
    It seems like you didnt setup the Administrator user for Saved Result Sets as it mentioned in the Marketing Segmentation Guide.
    Here is an extract from the guide:
    Setting Up the Web Administrator for Managing Cache and Saved Result Sets
    Some queries issued by the segmentation engine require the use of the Execute Physical stored
    procedure. These queries include delete statements on the cache, delete statements on the saved
    result sets, and insert statements for the cache and saved result set. The Execute Physical stored
    procedure must be run by a user with administrator privileges. The administrator user is set up in
    the instanceconfig.xml file.
    NOTE: The BI Administrator password and login parameters are case sensitive.
    To set up the administrative user in the instanceconfig.xml file
    1 Open a command shell and navigate to the <OracleBI>/web/bin, where <OracleBI> represents
    the root directory of the installation.
    2 Execute the following command:
    cryptotools credstore -add -infile <OracleBIData>/web/config/credentialstore.xml
    3 When prompted, enter the following values:
    Credential Alias: admin
    Username: Administrator
    Password: <enter Admin password here>
    Do you want to encrypt the password? y
    Passphrase for encryption: <password >
    Do you want to write the passphrase to the xml? n
    File "<OracleBIData>/web/config/credentialstore.xml" exists. Do you want to overwrite it? y
    4 Open the credentialstore.xml file and verify that the following section has been created:
    <sawcs:credential type="usernamePassword" alias=“admin">
    <sawcs:username> Administrator </sawcs:username>
    <sawcs:password>
    <xenc:EncryptedData>

  • Hi I have adobe CC for teams, a team member is having problems opening indesign we are being asked for a serial number, ive checked on our admin account and he is one our our registered 'members'. I wasnt the person who set this up originally so I'm a bit

    Hi I have adobe CC for teams, a team member is having problems opening indesign we are being asked for a serial number, ive checked on our admin account and he is one our our registered 'members'. I wasn't the person who set this up originally so I'm a bit lost, i cant seem to find any serial numbers on the my account section and it seems we have no registered products? can you help?

    Hi There,
    We have checked the details of your team, all seat are assigned properly.
    Now there are few details that we would need in a Private Message so that I can assist you appropriately.
    Name of the user:
    Email of the user:
    Meanwhile, try the below mentioned links.
    Creative Cloud applications ask for serial number
    Sign in, activation, or connection errors | CS5.5 and later, Acrobat DC
    [Note: Details that we need is critical, make sure you send them in via Private Message only.]
    Thanks,
    Atul Saini

  • 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.

  • 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.

  • Result set problems

    I am trying to comparing two tables(assuming they both have the same columns) records by records in two differnet schemas and print out their discrepancy.
    I am using jdbc oracle connection to my database. In main, I'm creating two new tables object and call getTableRecords(schema, tableName)
    and then do the comparsion: table1.compare(table2)
    public Table getTableRecordss(DatabaseInfo dbInfo, Table table)
    String sql = ("Select * from " + table.getName() ");
    try
    Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = stmt.executeQuery(sql);
    rs.setFetchSize(1000);
    String tempString;
    while (rs.next())
    Record record = new Record();
    tempString = rs.getString(i+1);
    if(tempString == null)
    tempString = "";
    record.addValue(tempString);
    table.addRecord(record);
    stmt.close();
    }catch (Exception e)
    e.printStackTrace();
    System.exit(1);
    closeConnection();
    This proram ran okay if the row sizes of a table is less than 200,000, but it will get heap space size Outof Memory error if it is more than that.
    I did try to increase the heap size by -Xmx1024m and still didn't work. Is there any other ways to get this to work? Thanks in advance.

    simcha wrote:
    I need this because I wanted to make sure the table from db1 get streams over to db2What are you doing? Specifically? Are you trying replicate or implement your own RAID? Java is not the way to go for that.
    Is there a way i can get result set by batches?Sure, but nobody can tell you how to do that. You need to figure that out for yourself because we have no idea what your data looks like. But for example, if your data contained a bunch of cars, you could do it in batches like Toyota first, then Ford, then Yugo (probably a small batch)

  • Problem in Final Result in PL/SQL

    Dear All,
    I have a problem in the final output of PL/SQL. I am using cursor and one SQL statement. Following is the complete procedure. First select after BEGIN inserts values in one table and that is fine. When second SQL is called by CURSOR while updating the table again I am having overlapped values. There seems some logical error. Would appreciate if some one help in this regard where is the issue and how to resolve that?
    Thanks
    CREATE OR REPLACE PROCEDURE P_PhotoCap_Report
                                               IS
      Local variable declaration.
          v_locationcode  VARCHAR2(4);
          v_day_0         Number(10):=0;
          v_day_1         Number(10):=0;
          v_day_2         Number(10):=0;
          v_day_3         Number(10):=0;
          v_day_4         Number(10):=0;
          v_day_5         Number(10):=0;
          v_day_6         Number(10):=0;
          v_day_7         Number(10):=0;
          v_day_8         Number(10):=0;
          v_day_9         Number(10):=0;
          v_day_10        Number(10):=0;
          v_day_11        Number(10):=0;
          v_day_12        Number(10):=0;
          v_day_13        Number(10):=0;
          v_moredays      Number(10):=0;
          v_diff          VARCHAR2(5);
          v_daily_enrol   Number(10):=0;
          v_sum           Number(10);
          v_average       Float(10);
          CURSOR c_insert_values IS
                 SELECT locationcode
                 ,decode(length(to_char(TRUNC(enrol_date) - TRUNC(photo_date))),1,to_char(TRUNC(enrol_date) - TRUNC(photo_date)),'>13')
                 , COUNT(*)
                 FROM track_id
                 WHERE TRUNC(enrol_date) = TRUNC(SYSDATE-1)
                 GROUP BY LOCATIONCODE, decode(length(to_char(TRUNC(enrol_date) - TRUNC(photo_date))),1,to_char(TRUNC(enrol_date) - TRUNC(photo_date)),'>13');
       BEGIN
             INSERT INTO reporting.photodate_report (locationcode, locationname, total_enrol)
                SELECT a.locationcode, (trim(b.locationname)||' '||b.DESCRIPTION),  count (*)
                FROM track_id a, location b
                WHERE  to_date(a.enrol_date,'DD/MM/rrrr') = trunc(sysdate-1) AND a.locationcode = b.locationcode
                GROUP BY a.locationcode, (trim(b.locationname)||' '||b.DESCRIPTION);
             commit;
       OPEN  c_insert_values;
       LOOP
             FETCH c_insert_values into v_locationcode, v_diff, v_daily_enrol;
             EXIT WHEN c_insert_values%notfound;
             CASE
                WHEN v_diff = '0'   THEN v_day_0 := v_daily_enrol;
                WHEN v_diff = '1'   THEN v_day_1 := v_daily_enrol;
                WHEN v_diff = '2'   THEN v_day_2 := v_daily_enrol;
                WHEN v_diff = '3'   THEN v_day_3 := v_daily_enrol;
                WHEN v_diff = '4'   THEN v_day_4 := v_daily_enrol;
                WHEN v_diff = '5'   THEN v_day_5 := v_daily_enrol;
                WHEN v_diff = '6'   THEN v_day_6 := v_daily_enrol;
                WHEN v_diff = '7'   THEN v_day_7 := v_daily_enrol;
                WHEN v_diff = '8'   THEN v_day_8 := v_daily_enrol;
                WHEN v_diff = '9'   THEN v_day_9 := v_daily_enrol;
                WHEN v_diff = '10'  THEN v_day_10 := v_daily_enrol;
                WHEN v_diff = '11'  THEN v_day_11 := v_daily_enrol;
                WHEN v_diff = '12'  THEN v_day_12 := v_daily_enrol;
                WHEN v_diff = '13'  THEN v_day_13 := v_daily_enrol;
                ELSE v_moredays := v_daily_enrol;
             END CASE;
              v_sum := (v_day_0)+(v_day_1)+(v_day_2)+(v_day_3)+(v_day_4)+(v_day_5)+(v_day_6)+(v_day_7)+(v_day_8)+
                          (v_day_9)+(v_day_10)+(v_day_11)+(v_day_12)+(v_day_13);
           v_average := ((0*v_day_0)+(1*v_day_1)+(2*v_day_2)+(3*v_day_3)+(4*v_day_4)+(5*v_day_5)+(6*v_day_6)+(7*v_day_7)+(8*v_day_8)+
                              (9*v_day_9)+(10*v_day_10)+(11*v_day_11)+(12*v_day_12)+(13*v_day_13))/v_sum;
             UPDATE PHOTODATE_REPORT a
             SET    a.day_0 = v_day_0,
                    a.day_1 = v_day_1,
                    a.day_2 = v_day_2,
                    a.day_3 = v_day_3,
                    a.day_4 = v_day_4,
                    a.day_5 = v_day_5,
                    a.day_6 = v_day_6,
                    a.day_7 = v_day_7,
                    a.day_8 = v_day_8,
                    a.day_9 = v_day_9,
                    a.day_10 = v_day_10,
                    a.day_11 = v_day_11,
                    a.day_12 = v_day_12,
                    a.day_13 = v_day_13,
                    a.moredays = v_moredays,
                    a.avg = v_average
              WHERE a.locationcode = v_locationcode;
          END LOOP;
          commit;
          CLOSE c_insert_values;
      END;Edited by: BluShadow on 15-Mar-2011 09:44
    added {noformat}{noformat} tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    tis is a douplication of Problem in Final Result in PL/SQL

  • Using Answers result set as source for BIP

    Hi, I'm running into a strange issue that I think is related to a configuration problem. I'm trying to use an OBIEE Answers result set as the source of data for a BI Publisher report. On the data model I choose Oracle BI Answers, but then when I click on the icon to select the answers result set - a blank window opens. It doesn't show either the USERS or SHARED directories for me to start drilling to find the answers result.
    Here's some details:
    1. BI Publisher security is set to use OBIEE server security. This appears to work properly, if I instead choose to write SQL directly against the OBIEE server, everything is working fine.
    2. I am able to integrate BIP reports onto OBIEE dashboards with no issues, so the integration is at least working in that direction
    3. I see this problem in DEV and STAGE, but it works fine in PRODUCTION
    Obviously some sort of config issue, but I'd like to point our server admin group in the right direction. Any idea what could be hosed up?
    Thanks!
    Scott

    Hi ,
    Check the settings in
    Admin>Oracle BI Presentation Services is configured or not..
    Thanks,
    Ananth

  • Getting the record count from result set

    i'm retreiving the result set using the executeQuery method, now i want to know how many records are there in the result set, that is the record count of the result set.
    one solution to that is to first use the executeUpdate and then use the executeQuery but i think that is not the right way.
    so please tell me is there any method in jdbc to get that thing done
    Tanx

    Hi
    Do you know if your DB supports "insensitive scrolling"?
    SQL generally do, but some don't - I had the same problem with the
    open source version of Interbase from Phoenix...
    Anyway - try creating your statement this way:
    public Statement createStatement(int resultSetType, int resultSetConcurrency)
    throws SQLException
    ...where resultset type should be:
    ResultSet.TYPE_SCROLL_INSENSITIVE
    Then you can do this:
    ResultSet rs = stm.executeQuery(q);
    int size = rs.last(); //this what you looking for?
    rs.beforeFirst();
    while(rs.next()){
    }

Maybe you are looking for

  • Hi want to convert a number in crore, e.g. 10000000 to 1.00 Can anybody help on this?

    Hi All, I want to convert a number in crore format. My basic problem is, I am using a custome format: #,##0.00,,,%; Here main task is done by ,,,%. Each comma (,) is dividing a number by 1000. Thus three commas are dividing a number by 10^9 digits. B

  • Compressor 2 16:9 Web - HELP!

    I have a 16:9 Anamorphic segment that I need to render to a h264 preview for a client urgently. However, when I export to compressor, select my preset and let it render it comes out as a 4:3 squished movie. How do I make the rendered output a 16:9 fr

  • Sort photos by name

    Not sure what I'm missing here. Basically I had a project full of photos imported from a camera, and also some others added from photostream from my iPhone. I have now added the photostream in iyts entirity, thinking I would be able to order the phot

  • I want to know the tables in FI for my report requirement

    I have a requirement to develop a report which contains selection-screen as Company code --- G/L Account     o 305400                        o 305500 Period              --- to --- 305400 is stock-excess 305500 is stock-shortage if user enters compan

  • Help! New Computer, trying to sync

    So, I downloaded I Tunes to my new computer, no problem. Authorized it with the ITunes Store, no problem, the problem is, (Sorry if this is a stupid question), I am trying to sync and put all my music currently on my I Phone on to the ITunes in my ne