Result Set fetch agonisingly slow

I am having sporadic trouble retrieving data from a ResultSet. I do not know how to tell if it is an Oracle problem or a JDBC problem.
In a while( results.next() ) loop, for some result sets it pauses for several seconds after every 10 iterations. This usually causes a webserver time-out and the results never get to the browser. It is NOT volume related, as some LARGER result sets from almost identical queries (i.e. with just one value in the where clause changed) run fine. We are using Oracle 8i, and the "problem" query always runs fine in SQLPlus (i.e. less than ten seconds for the execution and display of ~700 rows).
some relevant evidence:
a) Usually the PreparedStatement.execute() itself is pretty quick - just a few seconds at worst
b) All result sets from this query pause every 10 iterations, but most pause for just a fraction of a second
c) With a certain value in the where clause, the pauses are 4-30 seconds, which, even when only ~700 rows are returned, results in a response time of several minutes.
d) The pauses are in the results.next() statement itself (I have output timestamps at the very beginning and the very end of the loop to show this).
e) the query is a join of six tables
f) the part of the where clause that changes is: AND FULFILLER.NAME IN (...) , where the IN clause can contain single or multiple names (but I am using a single value in the "problem" query)
g) The FULFILLER.NAME column IS an indexed field, and that index IS being used (according to "EXPLAIN PLAN") in both the fast queries and the slow queries.
What confuses me (amongst several things) is this: I would have thought that the values in the where clause would only affect the creation of the ResultSet, and not the reading of that result set. Am I wrong? Any ideas anyone?
Thanks,
Martin Reynolds (renozu)

I am having sporadic trouble retrieving data from a
ResultSet. I do not know how to tell if it is an
Oracle problem or a JDBC problem.
In a while( results.next() ) loop, for some
result sets it pauses for several seconds after every
10 iterations. This usually causes a webserver
time-out and the results never get to the browser. It
is NOT volume related, as some LARGER result sets from
almost identical queries (i.e. with just one value in
the where clause changed) run fine. We are using
Oracle 8i, and the "problem" query always runs fine in
SQLPlus (i.e. less than ten seconds for the execution
and display of ~700 rows).
some relevant evidence:
a) Usually the PreparedStatement.execute() itself is
pretty quick - just a few seconds at worst
b) All result sets from this query pause every
10 iterations, but most pause for just a fraction of a
second
c) With a certain value in the where clause, the
pauses are 4-30 seconds, which, even when only ~700
rows are returned, results in a response time of
several minutes.
d) The pauses are in the results.next() statement
itself (I have output timestamps at the very beginning
and the very end of the loop to show this).
e) the query is a join of six tables
f) the part of the where clause that changes is:
AND FULFILLER.NAME IN (...) , where the IN
clause can contain single or multiple names (but I am
using a single value in the "problem" query)
g) The FULFILLER.NAME column IS an indexed field, and
that index IS being used (according to "EXPLAIN PLAN")
in both the fast queries and the slow queries.
What confuses me (amongst several things) is this: I
would have thought that the values in the where clause
would only affect the creation of the
ResultSet, and not the reading of that result
set. Am I wrong? Any ideas anyone?
this honestly doesn't HAVE to be the case... depending on the cursor.
i think if one has a forward only cursor the database could figure it out as it scans along the table. it should be fater in fact because if it does like this you only do one table scan and not two. this theory seems to fall apart when you say it is using the index BUT if I was writing a database and you had a forward only cursor AND the distribution of keys in the index indicated that there were many rows that would match your query I might ignore the index and do it as described.
so call me crazy but here is my suggestion...
if the cursor you are using is a forward only cursor then try a scrollable cursor.
if it is already a scrollable cursor or changing it didn't help then try this...
rs.last();
rs.beforeFirst();
// now process normally using next()i would think that this would force the database to find all the rows.... so it should help.
also the server timeout issue will sort of need to be addressed also if the query still takes a long time to run...
Thanks,
Martin Reynolds (renozu)

Similar Messages

  • Result Set fetching data not sequentially?

    The result set I am using to fetch data from a table in MS-Access following the query "select * from fun",is fetching the recors but not sequentially from data base? How do I fix that?
    Thanx in adv
    Amit

    If you want your data in a particular order then you must include an ORDER BY clause in your SQL. Otherwise the database may return the data in any order it finds convenient.

  • Result set fetching

    I'm pretty sure this is basic stuff, and I should probably know this already, but here goes:
    when you execute a query through EntityManager, are results eagerly fetched, or are they being loaded as the result set is iterated through?
    I was wondering if when I iterate through only the first 5 results, is the whole result set still being populated?
    I've been learning this stuff for a while but, to make matters worse, I was required to learn some LINQ in the mean time, so similar concepts got messed up in my mind... thus this question.
    Thanks for the time!

    It would depend on the implementation of the JDBC driver what it does, but generally you're going to get eager fetching of at least the first level records.
    Linked records (non-primitive fields fetched from other tables) may be eagerly or lazily fetched depending on the configuration set. by default however those are eagerly fetched (and that's what JPA means when it talks about eager fetching).
    If your dependency tree is deep and the child records are needed relatively rarely (for example you're not going to display them initially after a fetch, but only when explicitly drilling down), lazy fetching of those can improve performance. If they are required to be fetched as the norm, lazy fetching there can cost performance, so it's a design decision that requires some thought.

  • Urgent!  Slow Result Set -- temp table slowing me??

    -- Running BC4J/JHeadstart/UIX
    Description:
    I have a uix page that calls a Servlet and passes a TABLE_NAME. The Servlet gets the TABLE_NAME and calls a class that extends oracle.jheadstart.persistence.bc4j.handler.DataSourceHandlerImpl to create a ViewObject and get the data we need. Once the ViewObject is passed back to the servlet, the servlet loops through the VIewObject and builds a report. See the problem below and the code at the bottom.
    Problem:
    I am running a query that returns approx 5000 records to my ViewObject. I then loop through the rows and construct a report. The view object will return the first 1085 records quickly, however, the following 4000 come back very slowly. I read online that BC4J creates temp tables to store large resultsets and then streams the data to the user as you need it. Is this our potential bottleneck?
    Questions:
    Is there a way to have it return all the rows? What can I do to speed this up?
    Code:
    --- Begin Servlet Snippet ---
    private ByteArrayOutputStream createReport(HttpServletRequest request)
    try{
    // PARM_REPORT = table name
    String reportName = request.getParameter(PARM_REPORT);
    System.out.println(">> calling getReport for " + reportName);
    RdmUserHandlerImpl handler = new RdmUserHandlerImpl();
    ViewObject vo = handler.getReportView2(reportName, request.getSession().getId());
    System.out.println(">> back from get report");
    // loop through report and print every 100
    while(vo.hasNext())
    curRow++;
    if (curRow % 100 == 0 )
    System.out.println(curRow + "");
    --- End Servlet Snippet ---
    --- Begin RdmUserHandlerImpl Snippet ---
    public ViewObject getReportView2(String tableName, Object sessionId) throws Exception {
    System.out.println("IN GET REPORT VIEW");
    ApplicationModule appMod = (ApplicationModule)getConnection("classpath...resource.MyUser", sessionId);
    // First see if we already created the view definition
    ViewObject vo = appMod.findViewObject(tableName);
    // If it was already created then refresh it, else lets try to create it
    if(vo != null) {
    System.out.println("found existing view");
    vo.reset();
    else {
    System.out.println("view not found, making new view");
    String query="SELECT * FROM " + tableName;
    System.out.println("QUERY = " + query);
    vo = appMod.createViewObjectFromQueryStmt(tableName, query);
    // max fetch returns -1
    System.out.println("MAX Fetch Size = " + vo.getMaxFetchSize());
    return vo;
    --- End RdmUserHandlerImpl Snippet ---
    Please reply asap! Deadline is coming fast!
    -Matt

    Matt,
    I think that you are right, the temporary tables created by BC4J are the reason for making it slow after a certain number of records. One of Steve Muench's articles includes the text:
    One of the most frequent performance-related questions we get on the Oracle Technet discussion forum is a question like, "After I query about a 1000 rows in a view object, my application gets very, very slow. What's happening?"
    It explains how you can turn off this feature, see the full article at http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html.
    The following article gives a lot of helpful information about the temporary tables:
    http://www.oracle.com/technology/products/jdev/htdocs/bc4j/bc4j_temp_tables.html
    The next article gives general tips for performance tuning of BC4J:
    http://www.oracle.com/technology/products/jdev/howtos/10g/adfbc_perf_and_tuning.html
    Hope this helps,
    Sandra Muller
    JHeadstart Team

  • Performance to fetch result set from stored procedure.

    I read some of related threads, but couldn't find any good suggestions about the performance issue to fetch the result set from a stored procedure.
    Here is my case:
    I have a stored procedure which will return 2,030,000 rows. When I run the select part only in the dbartisan, it takes about 3 minutes, so I know it's not query problem. But when I call the stored procedure in DBArtisan in following way:
    declare cr SYS_REFCURSOR;
    firstname char(20);
    lastname char(20);
    street char(40);
    city char(20);
    STATE varchar2(2);
    begin DISPLAY_ADDRESS(cr);
    DBMS_OUTPUT.ENABLE(null);
    LOOP
    FETCH cr INTO firstname,lastname,street, city, state;
    EXIT WHEN cr%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE( firstname||','|| lastname||','|| street||',' ||city||',' ||STATE);
    END LOOP;
    CLOSE cr;
    end;
    It will take about 100 minutes. When I used DBI fetchrow_array in perl code, it took about same amount of time. However, same stored procedure in sybase without using cursor, and same perl code, it only takes 12 minutes to display all results. We assume oracle has better performance. So what could be the problem here?
    The perl code:
    my $dbh = DBI->connect($databaseserver, $dbuser, $dbpassword,
    { 'AutoCommit' => 0,'RaiseError' => 1, 'PrintError' => 0 })
    or die "couldn't connect to database: " . DBI->errstr;
    open OUTPUTFILE, ">$temp_output_path";
    my $rc;
    my $sql="BEGIN DISPLAY_ADDRESS(:rc); END;";
    my $sth = $dbh->prepare($sql) or die "Couldn't prepare statement: " . $dbh->errstr;
    $sth->bind_param_inout(':rc', \$rc, 0, { ora_type=> ORA_RSET });
    $sth->execute() or die "Couldn't execute statement: " . $sth->errstr;
    while($address_info=$rc->fetchrow_arrayref()){
    my ($firstname, $lastname, $street, $city, $STATE) = @$address_info;
    print OUTPUTFILE $firstname."|".$lastname."|".$street."|".$city."|".$STATE;
    $dbh->commit();
    $dbh->disconnect();
    close OUTPUTFILE;
    Thanks!
    rulin

    Thanks for you reply!
    1) The stored procedure has head
    CREATE OR REPLACE PROCEDURE X_OWNER.DISPLAY_ADDRESS
    cv_1 IN OUT SYS_REFCURSOR
    AS
    err_msg VARCHAR2(100);
    BEGIN
    --Adaptive Server has expanded all '*' elements in the following statement
    OPEN cv_1 FOR
    Select ...
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    err_msg := SQLERRM;
    dbms_output.put_line (err_msg);
    ROLLBACK;
    END;
    If I only run select .. in DBArtisan, it display all 2030,000 rows in 3:44 minutes
    2) But when call stored procedure, it will take 80-100 minutes .
    3) The stored procedure is translated from sybase using migration tools, it's very simple, in sybase it just
    CREATE PROCEDURE X_OWNER.DISPLAY_ADDRESS
    AS
    BEGIN
    select ..
    The select part is exact same.
    4) The perl code is almost exact same, except the query sql:
    sybase verson: my $sql ="exec DISPLAY_ADDRESS";
    and no need bind the cursor parameter.
    This is batch job, we create a file with all information, and ftp to clients everynight.
    Thanks!
    Rulin

  • Large query result set

    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for search in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It results in
    too much memory consumtion in our ejb application. What is the best way to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

    you can think of following options
    1) paging: read only few thousands at a time and maintain a index to page
    through complete dataset
    2) caching!
    a) you can create a serialized data file in server to cache the result set
    and can use that to browse through. you may do on the fly
    compression/uncompression while sending data to client.
    b) applet based solution where caching could be in client side. Look in
    http://www.sitraka.com/software/jclass/cs_ims.html
    thanks,
    Srinivas
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Slava Imeshev,
    We already have search criteria and a limit. When records exceeds thatlimit
    then we prompt user that it may take sometime, do you want to proceed? If
    he clicks yes then we retrieve those records. This results in lot ofmemory
    consumtion.
    I was thinking if there is some way that from database I can retrieve some
    block of records at a time rather the all records of a query. I wander how
    internet search sites work, where thousnds of sites/pages match criteriaand
    client can move back & front on any page.
    Regards,
    Parvez
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi chauhan,
    You may want to narrow search criteria along with processing a
    limited number of resulting records. I.e. if the size of the result
    is bigger than a limit, you stop fetching results and notify the client
    that search criteria should be narrowed.
    HTH.
    Regards,
    Slava Imeshev
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for
    search
    in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It
    results
    in
    too much memory consumtion in our ejb application. What is the best
    way
    to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

  • Getting Result set close error while updating row

    Hi,
    Working on jdev 11.1.1.3.0, ADF BC with rich faces.
    I am updating on the selected rows, the selected rows are updating but here my problem after updating the rows when i scroll down the table then i am getting error like Result Set is already close, can any one help me how to resolve this.
    Java Code:
    RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.embossTB.getValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    oracle.jbo.domain.Date dt =
    new oracle.jbo.domain.Date(new java.sql.Timestamp(System.currentTimeMillis()));
    rowData.setAttribute("EmbossingState", "PRINTED");
    rowData.setAttribute("EmbossingDate", dt);
    embossIter.getViewObject().getApplicationModule().getTransaction().commit();
    AdfFacesContext.getCurrentInstance().addPartialTarget(embossTB);
    Error:
    oracle.jbo.AttributeLoadException: JBO-27022: Failed to load value at index 1 with java object of type java.lang.String due to java.sql.SQLException.
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2327)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3622)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2203)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:5325)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5174)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3304)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3164)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2154)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4853)
         at oracle.jbo.server.ViewRowSetIteratorImpl.scrollRange(ViewRowSetIteratorImpl.java:1350)
         at oracle.jbo.server.ViewRowSetIteratorImpl.setRangeStartWithRefresh(ViewRowSetIteratorImpl.java:2708)
         at oracle.jbo.server.ViewRowSetIteratorImpl.setRangeStart(ViewRowSetIteratorImpl.java:2693)
         at oracle.jbo.server.ViewRowSetImpl.setRangeStart(ViewRowSetImpl.java:2895)
         at oracle.jbo.server.ViewObjectImpl.setRangeStart(ViewObjectImpl.java:9457)
         at oracle.adf.model.binding.DCIteratorBinding.setRangeStart(DCIteratorBinding.java:3378)
         at oracle.adfinternal.view.faces.model.binding.RowDataManager._bringInToRange(RowDataManager.java:105)
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowIndex(RowDataManager.java:63)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowIndex(FacesCtrlHierBinding.java:603)
         at org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex(UIXCollection.java:442)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.renderDataBlockRows(TableRenderer.java:1837)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderSingleDataBlock(TableRenderer.java:1601)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:968)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:504)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:529)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1330)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:339)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.access$100(ShowDetailItemRenderer.java:31)
         at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:492)
         at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:465)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer._encodeChildren(ShowDetailItemRenderer.java:407)
         at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.encodeAll(ShowDetailItemRenderer.java:114)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1963)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.access$500(PanelTabbedRenderer.java:39)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:1059)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:1010)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer._renderTabBody(PanelTabbedRenderer.java:606)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.encodeAll(PanelTabbedRenderer.java:262)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:405)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:654)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:573)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:330)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:176)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:289)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1515)
         at org.apache.myfaces.trinidad.component.UIXGroup.encodeChildren(UIXGroup.java:138)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:402)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:574)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:241)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:574)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:241)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1963)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1044)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderSecondPane(PanelSplitterRenderer.java:943)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:197)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:289)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:442)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:258)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1963)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1044)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderSecondPane(PanelSplitterRenderer.java:943)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:197)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:289)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:442)
         at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:258)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:574)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:241)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1963)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1044)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderSecondPane(PanelSplitterRenderer.java:943)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:197)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:69)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.encodeEnd(ContextSwitchingComponent.java:153)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1071)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1515)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:785)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.sql.SQLException: Result set already closed
         at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:110)
         at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:65)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown Source)
         at oracle.jbo.common.StringTypeSQLNativeImpl.getDataFromResultSet(JboTypeMapEntries.java:480)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2318)
         ... 222 more
    Edited by: user5802014 on Aug 12, 2010 10:48 AM

    You are calling commit on every row inside your for loop. I would avoid this because it's time consuming.
    Next thing I noticed is that you call the commit directly on the application module bypassing all binding layer stuff.
    Try putting the commit operation into the bindings and call it there. This will give the framework the chance to do its stuff.
    If this does not help you can re execute the query of the VO in question after updating the selected rows.
    Timo

  • Just in time creation of Result Set

    I have this problem which is bugging me a lot. Actually I want to display some data on the browser by fetching it from the database. Now this result set could be quite big. So i would like to display on multiple pages like if there are 100 rows then 25 rows per page, so in total 4 pages. One way to do this load all data in memory and then display it moving your cursor down, but in this technique u have to keep large amount of data in memory. I want to fetch these rows as required like first time top 25 rows, next time next 25 rows and so on. I am stuck.. Please help me!!

    //you could use a Select bean:
    private com.ibm.ivj.db.uibeans.Select getSelectSQL() {
         if (ivjSelectSQL == null) {
              try {
                   ivjSelectSQL = new com.ibm.ivj.db.uibeans.Select();
                   ivjSelectSQL.setReadOnly(true);
                   ivjSelectSQL.setQuery(new com.ibm.ivj.db.uibeans.Query               ivjSelectSQL.setQuery(new com.ibm.ivj.db.uibeans.Query(getMyCon(), sqlGeneral()));
              } catch (java.lang.Throwable ivjExc) {
                   handleException(ivjExc);
         return ivjSelectSQL;
              ivjScrollPaneTableGen.setModel(getSelectSQL());
              ivjScrollPaneTableGen.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    ivjScrollPaneTableGen.setAutoCreateColumnsFromModel(true);
              getSelectSQL().execute();
    // after this your table will contain automatically all the rows.
    how the NextPage should work I haven't done yet, but I saw there is a setViewport(JViewport) function in JScrollPane class which seems to do the thing that you want.

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

  • JDBC-ODBC Bridge to SPSS data files - Result Set Type is not supported

    Hello,
    As mentioned in the subject I am trying to read SPSS data files using the SPSS 32-Bit data driver, ODBC and the JDBC-ODBC Bridge.
    Using this SPSS Driver I manged to read the data directly into an MS-SQL Server using:
    SELECT [...] FROM
    OPENROWSET(''MSDASQL.1'',''DRIVER={SPSS 32-BIT Data Driver (*.sav)};DBQ=' SomePathWhereTheFilesAre';SERVER=NotTheServer'', ''SELECT 'SomeSPSSColumn' FROM "'SomeSPSSFileNameWithoutExt'"'') AS a
    This works fine!
    Using Access and an ODBC System DNS works for IMPORTING but NOT for LINKING.
    It is even possible to read the data using the very slow SPSS API.
    However, when it comes to JDBC-ODBC the below code does only work in part. The driver is loaded successfully, but when it comes to transferring data into the resultset object the error
    SQLState: null
    Result Set Type is not supported
    Vendor: 0
    occurs.
    The official answer from SPSS is to use .Net or to use their implementation with Python in their new version 14.0. But this is obviously not an option when you want to use only Java.
    Does anybody have experience with SPSS and JDBC-ODBC??? I have tried the possible ResultSet Types, which I took from:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvdsprp.htm
    and none of them worked.
    Thank you in advance for your ideas and input & stay happy!
    Here the code without all the rest of the class arround it:
    // Module:  SimpleSelect.java
    // Description: Test program for ODBC API interface.  This java application
    // will connect to a JDBC driver, issue a select statement
    // and display all result columns and rows
    // Product: JDBC to ODBC Bridge
    // Author:  Karl Moss
    // Date:  February, 1996
    // Copyright: 1990-1996 INTERSOLV, Inc.
    // This software contains confidential and proprietary
    // information of INTERSOLV, Inc.
    public static void main1() {
      String url   = "jdbc:odbc:SomeSystemDNS";
      String query = "SELECT SomeSPSSColumn FROM 'SomeSPSSFileName'";
      try {
        // Load the jdbc-odbc bridge driver
        Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
        DriverManager.setLogStream(System.out);
        // Attempt to connect to a driver.  Each one
        // of the registered drivers will be loaded until
        // one is found that can process this URL
        Connection con = DriverManager.getConnection (url);
        // If we were unable to connect, an exception
        // would have been thrown.  So, if we get here,
        // we are successfully connected to the URL
        // Check for, and display and warnings generated
        // by the connect.
        checkForWarning (con.getWarnings ());
        // Get the DatabaseMetaData object and display
        // some information about the connection
        DatabaseMetaData dma = con.getMetaData ();
        System.out.println("\nConnected to " + dma.getURL());
        System.out.println("Driver       " +
          dma.getDriverName());
        System.out.println("Version      " +
          dma.getDriverVersion());
        System.out.println("");
        // Create a Statement object so we can submit
        // SQL statements to the driver
        Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.CONCUR_READ_ONLY);
        // Submit a query, creating a ResultSet object
        ResultSet rs = stmt.executeQuery (query);
        // Display all columns and rows from the result set
        dispResultSet (rs);
        // Close the result set
        rs.close();
        // Close the statement
        stmt.close();
        // Close the connection
        con.close();
      }

    Thank you for your reply StuDerby!
    Actually the above script was before, as you suggested, leaving the ResultSetTeype default. This did not work...
    I am getting gray hair with SPSS - in terms of connectivity and "integratebility" none of their solutions offered is sufficient from my point of view.
    Variable definitions can only be read by the slow API, data can only be read by Python or Microsoft Products... and if you want to combine both you are in big trouble. I can only assume that this is a company strategy to sell their Dimensions Platform to companies versus having companies developping their applications according to business needs.
    Thanks again for any furthur suggestions and I hope, that some SPSS Developper will see this post!
    Cheers!!

  • How should i use the two results sets in one single report data region?

    Hi frnz,
     I have to create a report using the below condition...
    Here my given data  set query gives you the two result sets ,so how should i use that two result sets information in single report....when i accessing that data set query it will take the values off the first result set not for the second result set.
    without using sub report and look up functionality..... if possible
    is there any way to achieve this.....Please let me know..
    Thanks!

    You cant get both resultsets in SSRS. SSRS dataset will only take the first resultset
    you need to either create them as separate queries or merge them into a single resultset and return with ad additional hardcoded field which indicates resultset (ie resultset1,resultset2 etc)
    Then inside SSRS report you can filter on the field to fetch individual resultsets at required places. While merging you need to make sure metadata of two resultsets are made consistent ie number of columns and correcponding column data types should be same.
    In absence of required number of columns just put some placeholders using NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Result set already closed

    Hi everyone,
    I know that there are already several threats on this issue, but none of them seems to sovle my issue.
    Hence, I'll try it again.
    JDeveloper: 11.1.1.3.0
    Action: Doing a delete of a row in an entity-based view object, doing a commit. Doing the exact same thing again, but now with an error : java.sql.SQLException: Result set already closed
    I'm unable to reproduce in a simple case.
    I tried to remove the commit statement, without success.
    I tried the following code:
          Map sessionMap;
          BindingContext context;
          String currentFrameName;
          DataControlFrame dcFrame;
          sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
          context = (BindingContext)sessionMap.get(BindingContext.CONTEXT_ID);
          currentFrameName = context.getCurrentDataControlFrame();
          dcFrame = context.findDataControlFrame(currentFrameName);
          dcFrame.commit();
          dcFrame.beginTransaction(null); Also without success.
    This is my original java code:
            OperationBinding deleteOper =
                ADFUtils.findOperation(OPERATION_DELETEINVOICE);
            deleteOper.execute();
            List errors = deleteOper.getErrors();
            if (errors != null && !errors.isEmpty()) {
                for (Object o : errors) {
                    logger.severe("Error during delete invoice : " + o + "-----" +
                                  o.getClass());
            //Committing the transaction
            OperationBinding commitOper = ADFUtils.findOperation(OPERATION_COMMIT);
            commitOper.execute();
            errors = commitOper.getErrors();
            if (errors != null && !errors.isEmpty()) {
                for (Object o : errors) {
                    logger.severe("Error during commit delete invoice : " + o +
                                  "-----" + o.getClass());
            }Does anyone have any idea's to tackle this problem?
    Thank you in advance.
    Filip Huysmans.
    <InvoiceFlowManagedBean><removeInvoice> Error during delete invoice : oracle.jbo.AttributeLoadException: JBO-27022: Kan waarde niet laden bij index 1 met Java-object van type java.lang.Integer vanwege java.sql.SQLException.-----class oracle.jbo.AttributeLoadException
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: Result set already closed
    java.sql.SQLException: Result set already closed
         at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:110)
         at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:65)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getInt(Unknown Source)
         at oracle.jbo.common.IntegerTypeSQLNativeImpl.getDataFromResultSet(JboTypeMapEntries.java:506)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2318)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3622)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2203)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:5325)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5174)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3304)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3164)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2154)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4853)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2914)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyRowDeleted(ViewRowSetIteratorImpl.java:3141)
         at oracle.jbo.server.ViewRowSetImpl.notifyRowDeleted(ViewRowSetImpl.java:1964)
         at oracle.jbo.server.ViewObjectImpl.notifyRowDeleted(ViewObjectImpl.java:10729)
         at oracle.jbo.server.ViewObjectImpl.notifyRowDeleted(ViewObjectImpl.java:10767)
         at oracle.jbo.server.QueryCollection.removeRow(QueryCollection.java:4038)
         at oracle.jbo.server.QueryCollection.afterRemove(QueryCollection.java:4003)
         at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:12662)
         at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:1354)
         at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:1370)
         at oracle.jbo.server.EntityCache.notifyStateChange(EntityCache.java:1499)
         at oracle.jbo.server.EntityImpl.setState(EntityImpl.java:4895)
         at oracle.jbo.server.EntityImpl.remove(EntityImpl.java:8477)
         at oracle.jbo.server.ViewRowImpl.doRemove(ViewRowImpl.java:3196)
         at oracle.jbo.server.ViewRowImpl.remove(ViewRowImpl.java:3241)
         at oracle.jbo.server.QueryCollection.doRemove(QueryCollection.java:2425)
         at oracle.jbo.server.QueryCollection.remove(QueryCollection.java:2448)
         at oracle.jbo.server.ViewRowSetImpl.removeRowAt(ViewRowSetImpl.java:2396)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doRemoveCurrentRow(ViewRowSetIteratorImpl.java:2448)
         at oracle.jbo.server.ViewRowSetIteratorImpl.removeCurrentRow(ViewRowSetIteratorImpl.java:2473)
         at oracle.jbo.server.ViewRowSetImpl.removeCurrentRow(ViewRowSetImpl.java:3252)
         at oracle.jbo.server.ViewObjectImpl.removeCurrentRow(ViewObjectImpl.java:9965)
         at oracle.adf.model.binding.DCIteratorBinding.removeCurrentRow(DCIteratorBinding.java:2675)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1283)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2141)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:730)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
         at be.fgov.health.mediflow.medicalcosts.view.bean.InvoiceFlowManagedBean.removeInvoice(InvoiceFlowManagedBean.java:957)
         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:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at be.fgov.health.mediflow.medicalcosts.view.util.JSFUtils.resolveMethodExpression(JSFUtils.java:96)
         at be.fgov.health.mediflow.medicalcosts.components.bean.RemoveConfirmationManagedBean.performRemove(RemoveConfirmationManagedBean.java:59)
         

    hi Filip
    Filip Huysmans wrote:
    ... Doing the exact same thing again, but now with an error : java.sql.SQLException: Result set already closed ...Maybe My Oracle Support note 1077305.1, "Random JBO-27122 and 'Closed Statement' Errors when Running ADF 11g App With XA Datasources", can help.
    Its "Solution" says
    "Don't use XA Datasources with ADF. So when creating a datasource in the WebLogic server make sure to change the Datasource JDBC driver from “Oracle’s Driver (Thin XA)” to “Oracle’s Driver (Thin)”. "
    success
    Jan Vervecken

  • How to get the result set in batches

    I have a query which results into large data. This data i want to display in a group of 20. After every 20 records i want to add header and footer to it.
    Is it possible to get the result set data into batch of 20 ? means can i specify start and end index of query ?
    regards
    Manisha

    What I am saying is that a big query with lots of
    joins will probably be slow, and as such would be a
    ripe candidate for batching the responses, if it were
    not possible to speed/optimize it. Batching is nice
    to look at for the user, but is not a solution for
    performance problems. In essence it is irrelevant
    that it adds a little performance deficit, as it
    appears to be running a lot quicker, and gives more
    feedback to the user.Then let me say it again....
    - "Join" is a term that applies to a method of doing queries in the database....
    - Query 1 which uses a join and returns 15 rows
    - Query 2 which does not use a join and returns 1500 rows.
    Given the above then Query 1 will provide better overall performance for the system than Query 2 in a properly configured database.
    If it doesn't then the database is not set up correctly.
    And again this will be irrespective of whether the query is scrollable or not.

  • How to get the number of records of a streaming result set

    Hi guys.
    So if it wasn't a streaming result set, I would have done this:
    {noformat}myResultSet<code class="jive-code jive-java">.last();
    {color:navy}*int*{color} numResults = </code>myResultSet<code class="jive-code jive-java">.getRow();
    </code>myResultSet<code class="jive-code jive-java">.beforeFirst();
    </code>{noformat}
    but being a streaming result set, beforeFirst() throws an exception...
    So how do you get the number of records in that result set? I wanna avoid an extra count(*) query, so I would appreciate other solutions than that.

    JoachimSauer wrote:
    vanwil wrote:
    you see, for now I just use a count(*) query to get the number of records, but that's adding a lot of extra waiting time...Iterating over the result twice will surely be slower then doing the count(*).great! so what I got now is actually the fastest way there is... awesome...
    If you get an exception, then you surely have a stack trace. That should tell you what happens, or at least where.com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:2066)
    Why do you need to know the number of elements beforehand, anyway?I need to know the number of elements because the incoming data goes into a table. Now of course, I could use ArrayList<String[]> or something, but wouldn't that require more memory resources than Object[][] ?
    No one can tell you that, at least not without more information (say, the stack trace for example).Here's the exception message:
    java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@10c0ef2 is still active. Only one streaming result set may be open and in use per-connection. Ensure that you have called .close() on  any active result sets before attempting more queries.

  • Partial result set in LOV

    I am working with BO XI R3 and back end as DB2.
    I am facing a partial LOV results set:
    From my analysis I have the following:
    1)This error occurs with a particular table
    2)The number of rows that are being fetched from the database are 44,018,911 rows (nearly 44 million) out of which 178,940 rows are unique ones
    3)These rows are not cached/stored daily. Hence each and everytime the report is run it has to fetch from the DB and bring it to the report.
    4)On the Universe front, checked with the Universe File-->Parameters tab and "Limit size and time" are unchecked
    5)On the report front there is no limiter for the number of rows.
    I am not sure but where the tuning has to be done? At the DB front (DB2 is my back end) or on the Universe front (BO XIR3). 1 ) Which would better 2) In case the tuning has to be done on the Universe front how does it need to be done?

    Are you getting this one on the Webi report Lovis or Deski Report
    If its a webi report you need to change in the Webintelligence Processing server Properties.
    The Default vales fro the Maximum List of values size entries is 50000 Lovs

Maybe you are looking for

  • VGA Adapter Not Working in Windows 7 (64 bit)

    I was running Win7 (64 bit) through bootcamp and could not get the VGA adapter to work.  I've tested it and it worked fine while under OS X.  In Windows 7, it could detect the secondary display, but my monitor no has signal.  I was re-install windows

  • Increased Slide Size resolution and everything shrunk

    after I set it back to 800x600 (the res I want). Is there a way to get it all to show at the original size that I had prior to the change? Thanks, John iMac 24"   Mac OS X (10.4.9)  

  • Play Count Wrong

    Reset my play count on iTunes 11.4, after listening to a couple songs, played once each and syncing iPhone to iTunes, play count says those songs have been played nearly 10 times each. Why is iTunes multiplying my play counts and how can I fix this?

  • How to fix xcodebuild error: The directory /Users/SmilingTornado/ does not contain an Xcode Project

    I am trying to fix my bash but the error: "xcodebuild error: The directory /Users/SmilingTornado/ does not contain an Xcode Project" means that I cant continue to recompile my bash so I have not started the process of patching yet

  • Classes in BW

    Dear Friends What are the steps to create classes in SAP-BW Cheers