OracleXML SQL utility out of memory

when selecting from a latge table.
What can I do to fix this:
java.lang.OutOfMemoryError
I would appreciate any input.

You can use the XMLGEN.getXML() to retrieve the XML as a CLOB instead of as an in-memory DOM tree.
The next release of XML SQL Utility supports stream output and SAX2 events as output as well, which are both ways of circumventing the memory usage of a DOM tree for large datasets.

Similar Messages

  • XML PL/SQL Parser Out of memory

    Im parsing a 20M file and recieving the following result.
    I have tried to cut the file size down and have found a small
    version that will parse successfully.
    We have tried adjusting
    the ulimit -d 2097152
    ulimit -s 32768
    and also set java_pool_size = 41943040 in init.ora
    none of these seemed to be enough to enable parsing of the file.
    The following are 2 executions of the parser using 2 different
    file sizes.
    Thanks,
    Steve
    BEGIN
    domsample('/u01/app/oracle/xmlparser/samp','dan55.xml','errors.tx
    t'); END;
    ERROR at line 1:
    ORA-29554: unhandled Java out of memory condition
    BEGIN
    domsample('/u01/app/oracle/xmlparser/samp','dan60.xml','errors.tx
    t'); END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.OutOfMemoryError
    ORA-06512: at "PHASE2.XMLPARSERCOVER", line 0
    ORA-06512: at "PHASE2.XMLPARSER", line 118
    ORA-06512: at "PHASE2.DOMSAMPLE", line 84
    ORA-06512: at line 1
    null

    Steve (guest) wrote:
    : Oracle XML Team wrote:
    : : Steve Coffman (guest) wrote:
    : : : Im parsing a 20M file and recieving the following result.
    : : : I have tried to cut the file size down and have found a
    small
    : : : version that will parse successfully.
    : : : We have tried adjusting
    : : : the ulimit -d 2097152
    : : : ulimit -s 32768
    : : : and also set java_pool_size = 41943040 in init.ora
    : : : none of these seemed to be enough to enable parsing of the
    : : file.
    : : : The following are 2 executions of the parser using 2
    : different
    : : : file sizes.
    : : : Thanks,
    : : : Steve
    : : : BEGIN
    : : : domsample
    : : ('/u01/app/oracle/xmlparser/samp','dan55.xml','errors.tx
    : : : t'); END;
    : : : ERROR at line 1:
    : : : ORA-29554: unhandled Java out of memory condition
    : : : BEGIN
    : : : domsample
    : : ('/u01/app/oracle/xmlparser/samp','dan60.xml','errors.tx
    : : : t'); END;
    : : : ERROR at line 1:
    : : : ORA-29532: Java call terminated by uncaught Java exception:
    : : : java.lang.OutOfMemoryError
    : : : ORA-06512: at "PHASE2.XMLPARSERCOVER", line 0
    : : : ORA-06512: at "PHASE2.XMLPARSER", line 118
    : : : ORA-06512: at "PHASE2.DOMSAMPLE", line 84
    : : : ORA-06512: at line 1
    : : On what OS and with how much installed memory are you
    running?
    : : Oracle XML Team
    : : http://technet.oracle.com
    : : Oracle Technology Network
    : The server is a
    : Digital UNIX V4.0E (Rev. 1091)
    : with 2Gig Ram
    Oracle version 8.1.5
    null

  • HOWTO: Writing Out XML Query Results of Any Size in Java with XML SQL Utility

    A customer mailed me asking for an example of how to use our XML SQL Utility to write out query results for tons of query result rows.
    With tons of data, the getXMLDOM() and getXMLString() methods are not really appropriate due to the size.
    The XML SQL Utility offers a getXMLSAX() method that streams SAX2 events to report the data being queried. This is the approach we can use to handle data of any size.
    It dawned on me today that by putting together the XML SQL Utilities getXMLSAX() routine, and the oracle.xml.parser.v2.XSLSAXPrintDriver SAX2 ContentHandler, we can effectively stream out data of any length to an appropriate writer.
    Here's a code example to get the point across:
    package test;
    import java.io.BufferedOutputStream;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.Properties;
    import javax.xml.transform.OutputKeys;
    import oracle.jdbc.OracleDriver;
    import oracle.xml.parser.v2.XSLException;
    import oracle.xml.parser.v2.XSLOutput;
    import oracle.xml.parser.v2.XSLSAXPrintDriver;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Example  {
      private static final String QUERY = "select * from emp";
      public static void main(String[] args) throws Throwable  {
          Connection conn = getConnection();
          OracleXMLQuery q = new OracleXMLQuery(getConnection(),QUERY);
          // Any printwriter will do. Here's we're output to standard out.
          PrintWriter output = new PrintWriter(new BufferedOutputStream(System.out));
          // This is a SAX2 Content Handler used by the Oracle XSLT Engine
          // to serialize a stream of sax2 events as an XML document
          // We'll use it to serialize the sax2 events from the XML SQL Utility
          // out as an XML document.
          XSLSAXPrintDriver ch = new XSLSAXPrintDriver(output, outputOptions());  
          // This asks XML SQL Utility to fire sax events for the data
          // being fetched instead of creating DOM nodes or returning text.
          // By using the XSLSAXPrintDriver content handler, these events
          // get handled by writing them directly to the output stream
          q.getXMLSAX(ch);
          ch.flush();
          q.close();
          conn.close();     
      private static XSLOutput outputOptions() throws XSLException {
        XSLOutput x = new XSLOutput();
        Properties props = new Properties();
        props.put(OutputKeys.METHOD,"xml");
        props.put(OutputKeys.INDENT,"yes");  // Set to "no" for non-indented
        x.setProps(props);
        return x;
      public static Connection getConnection() throws SQLException {
        String username = "scott";
        String password = "tiger";
        String thinConn = "jdbc:oracle:thin:@localhost:1521:ORCL";
        Driver d = new OracleDriver();
        return DriverManager.getConnection(thinConn,username,password);
    }

    Hi Uber,
    This is a known issue that error occurs when running report "Count of instances of specific software registered with Add or Remove Programs" due to non-printable characters for XML. Based on internal research, the hotfix for this issue will be
    included in the System Center 2012 Configuration Manager Service Pack 1.
    As a workaround, you can remove the nonprintable character populated into the report parameter by referring to the following KB article:
    http://support.microsoft.com/KB/914159
    Hope this helps.
    Regards,
    Mike Yin
    Mike Yin
    TechNet Community Support

  • Connecting through java to HSQLDB: Out of Memory

    Through my java program i am connecting to hsqldb which has .data file of approx 6.5 GB and getting the error java.sql.SqlException: out of memory (am not getting anything else)
    have increased jvm option -Xms256m -Xmx1024m -XX:PermSize=64M -XX:MaxPermSize=2000M
    What else can be tried...??? A complete Stacktrace for the same
    exception in thread HSQL timer
    java.lang.OutofMemoryError: Java Heap Space
    Besides that also got this on netbeans console but seems this is something else... and not an error
    Mar 19, 2009 4:55:36 AM sun.awt.X11.XToolkit processException
    WARNING: Exception on Toolkit thread
    java.lang.OutOfMemoryError: Java heap space
    Edited by: shubham on Mar 19, 2009 1:57 AM
    Edited by: shubham on Mar 19, 2009 3:31 AM

    Well The issue was somewhere else due to it reading too much of data. It ran but my program is very slow (approx 2-3 hrs).
    I am worried about the speed...
    is it because of the large amount of data.. 23,355,459 records..?? or there could be some issue in programming probably memory leak etc..??
    -> reads db
    -> for each record set
    -> perform different operation/ writes to file

  • Out of memory Error while querying SQL Script based Calculation View

    Hi All,
    I wanted to test the performance of Graphical and SQL Script based Calculation views.
    Created Graphical (CA_GRPH) and SQL Script (CA_SQL) Calculation views.
    Analytic View (AN_GRPH) for both Calculation views are the same which is Graphical based (90 Attributes and 5 Measures)
    In Analytic View data foundation I have a Fact table which has 1.5 Billion records and 9 Dimension Tables –collectively 500 million records (7 Attribute Views). 9 Referential joins with cardinality N:1 and 1 Referential join with cardinality N:N.
    I wanted to keep (CA_GRPH) and (CA_SQL) as a base Calculation views and leverage those to create various calculation views (Will be creating different Calc views for respective Business segments)
    In order to test this I have created below calc views on top of base calc views.
    Graphical Based: Created (CA_GRAPH_XYZ) by having CA_GRPH in projection with 30 Calculated Columns. – This retrieves data in 13 secs
    SQL Script Based: Created (CA_GRPH_ABC) by having CA_SQL in projection view with 30 calculated columns – This errors out after 1.50 mins.
    Could not execute 'SELECT "COLUMN_A","COLUMN _B"," COLUMN _C"," COLUMN _D", SUM("COLUMN _REVENUE") AS ...' in 1:50.480 minutes .
    SAP DBTech JDBC: [2048]: column store error:  [2048] column store error: search table error: [1000002] Error executing physical plan: exception 1000002:
    ltt/impl/memory.cpp:63
    Out of memory ; $size$=1507711; $name$=ihm; $type$=pool; $inuse_count$=170104; $allocated_size$=219215007925
    exception 1000002:
    Any suggestion / help in fixing this issue will be greatly appreciated.
    Regards,
    Av

    Hi Raj,
    Thanks for your time, please find edited snap hot of Analytic View (AN_GRPH) below,
    Calculation view(CA_SQL)
            /********* Begin Procedure Script ************/
    BEGIN
           var_out =
         SELECT
                "COLUMN_1"
                "COLUMN_2",
                "COLUMN_84",
                "COLUMN_85;",
                SUM("REVN") AS "REVN",
                SUM("MGN") AS "MGN",
                SUM("ORD_QTY") AS "ORD_QTY",
                SUM("SYS_QTY1") AS "SYS_QTY1",
                SUM("SYS_QTY") AS "SYS_QTY"
    FROM
          "_SYS_BIC"."XYZ/AN_GRPH"
    GROUP BY
                "COLUMN_1"
                "COLUMN_2",
                "COLUMN_84",
                "COLUMN_85";
    END
    /********* End Procedure Script ************/
    Later i have built one more Calculation view(CA_GRPH_ABC) using (CA_SQL)in projection. i have 30 calculated measures in this final calc view. this final calc view is throwing above mentioned error.
    Not sure if i can use SQL script based calc view in graphical based calc views?
    Regards,
    AV

  • How can I solve out of memory error on excell file in PL/SQL

    Hi,
    I'm new on PL/SQL. One of the PL/SQL code which is created excell report got out of Memory error. The first reason of this error, excell file not supported more than 65536 data. So I change the excell file separeted sheets. So that the single sheet size cannot exceed 65536 data.
    All the data are held on system cach and if many user want to take the report the they would get an out of memory error.
    So I want to change the code like that; when out of memory exception raises,
    the old excell file save to disk and new excell file is created,
    and go on to write the new file without exiting the program.
    At the end of the data all the excell file append and show only one file to the user.
    I do know how to save the file and create a new file. But I don't know how can PL/SQL program to turn back to loop again when the exception occurs.
    Is anyone help me on this issue?
    Here is my code
    Thank you
    dworkbook:=hssfworkbook.new;
    dCurrentItem := Get_Block_Property(pCurrentBlock, FIRST_ITEM);     
    while not (name_in('system.last_record')='TRUE') loop
    /* The data would be written to the excell file column order. */
    if (dRow=0) then
              /* Create a new sheet */
    elsif (dRow <= dMaxWorksheetNum) then
         /* Data of the report are written here. The data are written in column order */
    if (dRow > dMaxWorksheetNum) then
         /* give dRow and dColumn intial value */
    /* increase worksheet number */
    end if; /* End of if (dRow=1) */
    if (isWritten) and not name_in('system.last_record')='TRUE'then
         /* if not at the end of the record and the previously read record is written to the file
         , then go to next record */
         next_record;
    end if;
    /* save excell report */
    workbookwriter.save(dworkbook,global.gethome||dFileName);
    web.show_document('/users/'||dFileName,'_BLANK');
    /* when exceptions occurs */
    EXCEPTION
    WHEN ORA_JAVA.EXCEPTION_THROWN THEN
    begin
         javaException := ORA_JAVA.LAST_EXCEPTION;
         -- Print out the Exception by using the toString()
         -- Method of the exception Object
         javaException2 := Exception_.new(javaException);
         mess(27002,Exception_.getMessage(javaException2));
         -- and clean up
         ORA_JAVA.CLEAR_EXCEPTION;
    exception
         WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    mess(27002,ORA_JAVA.LAST_ERROR);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;
    end;
    WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    message(ORA_JAVA.LAST_ERROR);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;

    No need to double-post... most questions are answered pretty quickly...

  • SQL Developer 3.1 out of memory

    I new to SQL developer and I been trying to copy data between servers and i run out of memory a lot of times.
    And i see that it happens with tables with more than 1 mill rec and got clob etc in it.
    I had to write my own program to handle it and i found on the way i got the same problem in the beginning.
    So my question is there a setting where i can tell the source (maybe the master also ) internal cursor to refetch the current position after say 10k records. I found doing that releases the memory of the inserted records so i can can continue to add more.
    Im running a fetch rownumber on master and reset the source every 20k record so i hit maybe 120 meg memory usage and if i did not do that i seen the memory go up to 2 gig and im only running the server and the app at 4 gig so I crashed all the time.
    By using this in my program I have copied 60 tables and 6 gig+ of data and no crash.
    Thanks,
    Roger

    Yes it's helpful so you dont have to use the command prompt to create a dump file.
    I was using the Database Copy to avoid having to move files to other server that i might not have system access to, only DB access.
    I'm pretty new at using Oracle and I have one DB that needs to move data to other DB without having to write a extra program for it. It also seems that DBLinks does not handle blob/clob either and setting up a stream might not be available.
    Thanks,
    Roger

  • DB SQL API for BDB: out of memory

    Hi,
    I posted a related thread here: Report Bug of SQLite-compatible API: Out of Memory Error but it is not answered yet so I am posting it again...Sorry for duplicate.
    Basically, we are evaluating Berkeley DB as a candidate for our database solution. However, we ran into an out-of-memory error when using BDB's SQLite-compatible API to deal with memory databases. Here are some simple steps to repro the issue:
    1. Open a memory database
    2. Insert many records (about 200,000 records) into it
    3. Close the database
    4. Repeat from step 1.
    Expected result: because I already closed the previous memory database, there should be no error.
    Actual result: out of memory.
    Here's the test program I am using:
    int
    testMemoryDatabase()
    db_handle *db;
    const char *sql;
    int i;
    // Setup database
    db = setup(":memory:");
    // Create tables
    sql = "create table Table1 (col1 varchar(32), col2 int);"
    "create table Table2 (col1 varchar(32), col2 varchar(64));"
    "create table Table3 (col1 varchar(32), col2 int);"
    "create table Table4 (col1 varchar(64), col2 int, col3 smallint, col4 int, col5 DateTime);"
    "create table Table5 (col1 varchar(64), col2 varchar(64), col3 varchar(1024));";
    exec_sql(db, sql);
    // Do insert operations
    sql = "insert into Table1 values ('xxxxxxxxxxxxxx', '523620105');insert into Table2 values ('xxxxxxxxxxxxxx', 'xxxxxxxxxxxxxx');insert into Table3 values ('xxxxxxxxxxxxxx', '1688709171');insert into Table4 values ('xxxxxxxxxxxxxx', '844867696', '32671917', '424084999', 'xxxxxxxxxxxxxx');insert into Table5 values ('xxxxxxxxxxxxxx', 'xxxxxxxxxxxxxx', 'xxxxxxxxxxxxxx');insert into Table1 values ('xxxxxxxxxxxxxx', '0');insert into Table2 values ('xxxxxxxxxxxxxx', '0');insert into Table3 values ('xxxxxxxxxxxxxx', '0');insert into Table4 values ('xxxxxxxxxxxxxx', '0', '0', '0', 'xxxxxxxxxxxxxx');insert into Table5 values ('xxxxxxxxxxxxxx', 'xxxxxxxxxxxxxx', '0');";
    for (i = 0; i < 20000; ++i)
    if (i % 1000 == 0) printf("%d\n", i);
    exec_sql(db, sql);
    // Clean up
    cleanup(db);
    int
    main()
    db_handle *db;
    testMemoryDatabase();
    testMemoryDatabase();
    testMemoryDatabase();
    testMemoryDatabase();
    // Add more testMemoryDatabase() calls...
    The out of memory error somewhat blocks us to use BDB memory DB...if it can be solved that will be great. Also, please point out right place if the forum is not the place to report such a bug.
    Thanks a lot!
    - lie

    Hi Lie,
    I have reproduced the issue and we're investigating a fix that will be available in a future release. If you need a solution sooner than that, please let me know.
    Thanks again for the report.
    Best regards,
    Rucong Zhao

  • Large DataTable causes out of memory exception

    Hello Support 
    We have a datatable that returns 112970 records and have 51 columns.
    When we try generate an xls file or display data result in grid view than "System Out of memory exception" is thrown.
    OS : Windows 2003 Enterprise 32 Bit
    HP DL380 G4
    CPU 2x3.6GHZ
    6 GB RAM
    Can you help us to find a resolution to this issue?
    Thank you
    Shrenik
    Maurice

    Thanks for reply.
    1> .XLXS format allows us >= 133000 records in spread sheet some times and some times it throws Exception of type 'System.OutOfMemoryException'.
    2> We are using asp.net gridview.
    Exception:
     ExceptionObject : Message : Exception of type 'System.OutOfMemoryException' was thrown.
    Data : System.Collections.ListDictionaryInternal
    InnerException : Nothing
    TargetSite : System.String ToBase64String(Byte[], Int32, Int32, System.Base64FormattingOptions)
    StackTrace :    at System.Convert.ToBase64String(Byte[] inArray, Int32 offset, Int32 length, Base64FormattingOptions options)
       at System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph, Purpose purpose)
       at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Serialize(Object state, Purpose purpose)
       at System.Web.UI.Util.SerializeWithAssert(IStateFormatter2 formatter, Object stateGraph, Purpose purpose)
       at System.Web.UI.HiddenFieldPageStatePersister.Save()
       at System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state)
       at System.Web.UI.Page.SaveAllState()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) HelpLink : Nothing Source : mscorlib HResult : -2147024882
    Please see below code for more information.
        protected void Button1_Click(object sender, EventArgs e)
            try
                DataTable _dt = GetDataFromDB();
                ViewState["dtQueryResults"] = _dt;
                BindgvQueryResults();
                messageLabel.Text = "";
            catch (Exception ex)
                messageLabel.Text = "Query execute error: " + ex.Message;
        private void BindgvQueryResults()
            if (ViewState["dtQueryResults"] != null)
                DataView _dv = ((DataTable)ViewState["dtQueryResults"]).DefaultView;
                if (ViewState["gvQRSortExpression"] != null && ViewState["gvQRSortDirection"] != null)
                    _dv.Sort = ViewState["gvQRSortExpression"].ToString() + ViewState["gvQRSortDirection"].ToString();
                gvQueryResults.DataSource = _dv;
                gvQueryResults.DataBind();
    private DataTable GetDataFromDB()
            SqlCommand _Cmd = null;
            SqlConnection _Con = null;
            try
                _Con = DBInteraction.InstantiateConnection();
                _Cmd = new SqlCommand();
                _Cmd.Connection = _Con;
                _Cmd.CommandTimeout = 300;
                if (_Con.State != ConnectionState.Open)
                    _Con.Open();
                try
                    _Cmd.CommandText = CriteriaBuilder1.QueryTransformer.Sql;
                catch(NullReferenceException)
                    throw new ApplicationException("Error message.");
                if(string.IsNullOrEmpty(CriteriaBuilder1.QueryTransformer.Sql))
                    throw new ApplicationException("This query does not have any text. Please add views in the query and try again.");
                _Cmd.CommandType = CommandType.Text;
                DataTable _dt = new DataTable();
                SqlDataAdapter adaPTer = new SqlDataAdapter(_Cmd);
                adaPTer.AcceptChangesDuringFill = false;
                adaPTer.Fill(_dt);
                if (_dt.Rows.Count == 0)
                    throw new ApplicationException("Your request did not return any results.");
                return _dt;
            catch (Exception ex)
                throw ex;
            finally
                if (_Con.State == ConnectionState.Open)
                    _Con.Close();
    Maurice

  • Running out of memory despite having set je.maxMemory to a moderate value

    I have set je.maxMemory to 20MB (je.maxMemory=20000000) and allowed a max heap size of 512MB (-Xms256M -Xmx512M).
    After two hours of running my web service, I'm running out of memory. After having profiled my service (using Yourkit Java Profiler 1.10.6), I can see the following:
    Name                                               Objects ShallowSize  RetainedSize
    byte[]                                               16711   124124880     124124880
    com.sleepycat.je.tree.BIN                              181       24616     116254200
    com.sleepycat.je.tree.Node[]                           187       98736     115743184
    com.sleepycat.je.tree.LN                              7092      226944     115253600
    java.util.concurrent.ConcurrentHashMap$HashEntry       554       17728      78328944
    java.util.concurrent.ConcurrentHashMap$HashEntry[]    1053       34728      77489632
    java.util.concurrent.ConcurrentHashMap                 117        5616      71812072
    java.util.concurrent.ConcurrentHashMap$Segment[]       118       10304      71807912
    java.util.concurrent.ConcurrentHashMap$Segment        1052       42080      71798808
    com.sleepycat.je.tree.IN                                 6         672      45592352
    java.lang.String                                    135888     4348416      14152664The memory profiler claims further, that com.sleepycat.je.tree.BIN is responsible for 71% of all heap memory.
    In any case, com.sleepycat.je.tree.BIN claims ~ 116MB of heap memory, which is by any goodwill, exceeded the limit of 20MB.
    How can this be?
    How is JE ensuring that the limit is not exceeded? Is there a timer (thread) running which once a while checks the memory used and then cleans up ; or is memory usage checked creating a com.sleepycat.je.tree.BIN object?
    My environment:
    BDB JE 4.0.92 - used as cache loader within Jboss Cache (3.2.7.GA), running on a JBOSS Application Server, Java 1.6 (IBM) on Linux. Further details are listed in the system properties below (except some deleted security items).
    System properties:
    (java.lang.String, int, java.lang.StringBuffer, int)=contains
    DestroyJavaVM helper thread=(java.lang.String, java.security.KeyStore$Entry, java.security.KeyStore$ProtectionParameter)
    base.collection.name=CD2JAVA
    bind.address=10.12.25.130
    catalina.base=/work/ocrgws_test/server0
    catalina.ext.dirs=/work/ocrgws_test/server0/lib
    catalina.home=/work/ocrgws_test/server0
    catalina.useNaming=false
    com.arjuna.ats.arjuna.objectstore.objectStoreDir=/work/ocrgws_test/server0/data/tx-object-store
    com.arjuna.ats.jta.lastResourceOptimisationInterface=org.jboss.tm.LastResource
    com.arjuna.ats.tsmx.agentimpl=com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
    com.arjuna.common.util.logger=log4j_releveler
    com.arjuna.common.util.logging.DebugLevel=0x00000000
    com.arjuna.common.util.logging.FacilityLevel=0xffffffff
    com.arjuna.common.util.logging.VisibilityLevel=0xffffffff
    com.ibm.cpu.endian=little
    com.ibm.jcl.checkClassPath=
    com.ibm.oti.configuration=scar
    com.ibm.oti.jcl.build=20100326_1904
    com.ibm.oti.shared.enabled=false
    com.ibm.oti.vm.bootstrap.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64
    com.ibm.oti.vm.library.version=24
    com.ibm.util.extralibs.properties=
    com.ibm.vm.bitmode=64
    common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
    epo.jboss.deploymentscanner.extradirs=/work/ocrgws_test/app/
    external.cert.ldap.* = ***************
    file.encoding=UTF-8
    file.separator=/
    flipflop.activation.time=16:30
    hibernate.bytecode.provider=javassist
    ibm.signalhandling.rs=false
    ibm.signalhandling.sigchain=true
    ibm.signalhandling.sigint=true
    ibm.system.encoding=UTF-8
    jacorb.config.log.verbosity=0
    java.assistive=ON
    java.awt.fonts=
    java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
    java.awt.printerjob=sun.print.PSPrinterJob
    java.class.path=/work/ocrgws_test/config:/usr/local/jboss-eap-4.3-cp07/bin/run.jar:/opt/ibm/java-x86_64-60/lib/tools.jar
    java.class.version=50.0
    java.compiler=j9jit24
    java.endorsed.dirs=/usr/local/jboss-eap-4.3-cp07/lib/endorsed
    java.ext.dirs=/opt/ibm/java-x86_64-60/jre/lib/ext
    java.fullversion=JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr8-20100401_55940 (JIT enabled, AOT enabled)
    J9VM - 20100401_055940
    JIT - r9_20100401_15339
    GC - 20100308_AA_CMPRSS
    java.home=/opt/ibm/java-x86_64-60/jre
    java.io.tmpdir=/tmp
    java.jcl.version=20100408_01
    java.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64:/usr/lib64/mpi/gcc/openmpi/lib64:/usr/lib
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    java.net.preferIPv4Stack=true
    java.protocol.handler.pkgs=org.jboss.net.protocol
    java.rmi.server.codebase=http://10.12.25.130:8083/
    java.rmi.server.hostname=10.12.25.130
    java.rmi.server.randomIDs=true
    java.runtime.name=Java(TM) SE Runtime Environment
    java.runtime.version=pxa6460sr8-20100409_01 (SR8)
    java.security.krb5.conf=/usr/local/jboss/etc/krb5.conf
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Sun Microsystems Inc.
    java.specification.version=1.6
    java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory
    java.vendor.url=http://www.ibm.com/
    java.vendor=IBM Corporation
    java.version=1.6.0
    java.vm.info=JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr8-20100401_55940 (JIT enabled, AOT enabled)
    J9VM - 20100401_055940
    JIT - r9_20100401_15339
    GC - 20100308_AA_CMPRSS
    java.vm.name=IBM J9 VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.specification.version=1.0
    java.vm.vendor=IBM Corporation
    java.vm.version=2.4
    javax.management.builder.initial=org.jboss.mx.server.MBeanServerBuilderImpl
    javax.net.ssl.trustStore=/usr/local/jboss/etc/ldap.truststore
    javax.net.ssl.trustStorePassword=password
    jboss.bind.address=10.12.25.130
    jboss.home.dir=/usr/local/jboss-eap-4.3-cp07
    jboss.home.url=file:/usr/local/jboss-eap-4.3-cp07/
    jboss.identity=30df88bc0a52e350x6e2ff59cx136c17794d5x-8000757
    jboss.lib.url=file:/usr/local/jboss-eap-4.3-cp07/lib/
    jboss.messaging.controlchanneludpaddress=239.1.200.4
    jboss.messaging.datachanneludpaddress=239.1.200.4
    jboss.partition.name=ocrgws_test_Partition
    jboss.partition.udpGroup=239.1.200.4
    jboss.remoting.domain=JBOSS
    jboss.remoting.instanceid=30df88bc0a52e350x6e2ff59cx136c17794d5x-8000757
    jboss.remoting.jmxid=luu002t.internal.epo.org_1334685694459
    jboss.remoting.version=22
    jboss.security.disable.secdomain.option=true
    jboss.server.config.url=file:/work/ocrgws_test/server0/conf/
    jboss.server.data.dir=/work/ocrgws_test/server0/data
    jboss.server.home.dir=/work/ocrgws_test/server0
    jboss.server.home.url=file:/work/ocrgws_test/server0/
    jboss.server.lib.url=file:/work/ocrgws_test/server0/lib/
    jboss.server.log.dir=/work/ocrgws_test/server0/log
    jboss.server.name=luu002t_ocrgws_test_server0
    jboss.server.temp.dir=/work/ocrgws_test/server0/tmp
    jboss.tomcat.udpGroup=239.1.200.4
    jbossmx.loader.repository.class=org.jboss.mx.loading.UnifiedLoaderRepository3
    je.maxMemory=20000000
    jgroups.bind_addr=10.12.25.130
    jmx.console.bindcredential=3bpwdmpc
    jmx.console.binddn=cn=jbossauth-ro,ou=accounts,ou=auth,dc=epo,dc=org
    jmx.console.rolesctxdn=ou=roles-test,ou=jboss,ou=applications,ou=internal,dc=epo,dc=org
    jndi.datasource.name=java:MainframeDS
    jnp.disableDiscovery=true
    jxe.current.romimage.version=15
    jxe.lowest.romimage.version=15
    line.separator=
    mainframelogin.password=720652a1e842fc7f
    mainframelogin.username=test_t
    org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
    org.apache.tomcat.util.http.ServerCookie.VERSION_SWITCH=true
    org.epo.jboss.application.home=/work/ocrgws_test
    org.hyperic.sigar.path=/work/ocrgws_test/server0/./deploy/hyperic-hq.war/native-lib
    org.jboss.ORBSingletonDelegate=org.jacorb.orb.ORBSingleton
    org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
    org.omg.CORBA.ORBSingletonClass=org.jboss.system.ORBSingleton
    org.w3c.dom.DOMImplementationSourceList=org.apache.xerces.dom.DOMXSImplementationSourceImpl
    os.arch=amd64
    os.name=Linux
    os.version=2.6.32.46-0.3-xen
    package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
    package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
    path.separator=:
    poll.interval.milliseconds=300000
    program.name=run.sh
    server.loader=
    shared.loader=
    spnego.config=/usr/local/jboss/etc/spnego.properties
    sun.arch.data.model=64
    sun.boot.class.path=/usr/local/jboss-eap-4.3-cp07/lib/endorsed/xercesImpl.jar:/usr/local/jboss-eap-4.3-cp07/lib/endorsed/xalan.jar:/usr/local/jboss-eap-4.3-cp07/lib/endorsed/serializer.jar:/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs/jclSC160/vm.jar:/opt/ibm/java-x86_64-60/jre/lib/annotation.jar:/opt/ibm/java-x86_64-60/jre/lib/beans.jar:/opt/ibm/java-x86_64-60/jre/lib/java.util.jar:/opt/ibm/java-x86_64-60/jre/lib/jndi.jar:/opt/ibm/java-x86_64-60/jre/lib/logging.jar:/opt/ibm/java-x86_64-60/jre/lib/security.jar:/opt/ibm/java-x86_64-60/jre/lib/sql.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmorb.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmorbapi.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcfw.jar:/opt/ibm/java-x86_64-60/jre/lib/rt.jar:/opt/ibm/java-x86_64-60/jre/lib/charsets.jar:/opt/ibm/java-x86_64-60/jre/lib/resources.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmpkcs.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcertpathfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjgssfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjssefw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmsaslfw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjcefw.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjgssprovider.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmjsseprovider2.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmcertpathprovider.jar:/opt/ibm/java-x86_64-60/jre/lib/ibmxmlcrypto.jar:/opt/ibm/java-x86_64-60/jre/lib/management-agent.jar:/opt/ibm/java-x86_64-60/jre/lib/xml.jar:/opt/ibm/java-x86_64-60/jre/lib/jlm.jar:/opt/ibm/java-x86_64-60/jre/lib/javascript.jar:/tmp/yjp201202191932.jar
    sun.boot.library.path=/opt/ibm/java-x86_64-60/jre/lib/amd64/compressedrefs:/opt/ibm/java-x86_64-60/jre/lib/amd64
    sun.io.unicode.encoding=UnicodeLittle
    sun.java.command=org.jboss.Main -b 10.12.25.130 -Djboss.server.home.dir=/work/ocrgws_test/server0 -Djboss.server.home.url=file:/work/ocrgws_test/server0 -Djboss.server.name=luu002t_ocrgws_test_server0 -Djboss.partition.name=ocrgws_test_Partition -Depo.jboss.deploymentscanner.extradirs=/work/ocrgws_test/app/ -Dorg.epo.jboss.application.home=/work/ocrgws_test
    sun.java.launcher.pid=17781
    sun.java.launcher=SUN_STANDARD
    sun.java2d.fontpath=
    sun.jnu.encoding=UTF-8
    sun.rmi.dgc.client.gcInterval=3685000
    sun.rmi.dgc.server.gcInterval=3685000
    system=java.io.ObjectStreamField
    tomcat.util.buf.StringCache.byte.enabled=true
    user.country=US
    user.dir=/work/ocrgws_test
    user.home=*****************
    user.language=en
    user.name=***********
    user.timezone=Europe/Berlin
    user.variant=

    The memory profiler claims further, that com.sleepycat.je.tree.BIN is responsible for 71% of all heap memory. In any case, com.sleepycat.je.tree.BIN claims ~ 116MB of heap memory, which is by any goodwill, exceeded the limit of 20MB. >
    I'm not sure whether the profiler is reporting live objects only (referenced) or all objects (including those not yet reclaimed). If the latter, it isn't telling you how much memory is actually referenced by the JE cache.
    Please look at the JE stats to see what the cache usage is, from JE's point of view.
    If you believe there is a bug in JE cache management, you'll need to write a small standalone test to demonstrate it and submit it to us, since we don't know of any such bug. Also note that we'll have difficulty supporting JE 4.0 (without a support contract anyway). Please use JE 5.0, or at least 4.1.
    Eviction occurs as objects are allocated, as well as in background threads. Eviction in background threads and concurrent eviction were greatly improved in JE 4.1.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Out of memory problem using the API

    Hi all,
    I need your assistance, we are working with CDB 10.2 making searches and retrieving the documents with all their attributes.
    In our actual scenario we have a single user (which represents an application) accessing CDB. This user use several persistent sessions simultaneously. I mean, several thousands of final users connect to an application that uses one user of CDB to connect to CDB with several persistent sessions.
    To simulate this scenario we wrote java code that open five threads and make several searches (requesting all the attributes) using the same user on cdb.
    Retrieving a considerable amount of data found on the search (~5000), we found a “Out of memory” problem when we made these tests:
    -     5 threads obtaining 100 documents (and all their attributes) / search
    -     1 thread obtaining 500 documents (and all their attributes) / search
    -     Also we have same problem if we make several searches with less results
    We suppose it’s a configuration or code issue so we ask for your assistance and experience to solve it.
    Thanks for your help,
    Dani
    import java.sql.Connection;
    import oracle.ifs.examples.api.constants.AttributeRequests;
    import oracle.ifs.examples.api.util.CommonUtils;
    import oracle.ifs.fdk.Attributes;
    import oracle.ifs.fdk.ClientUtils;
    import oracle.ifs.fdk.FdkConstants;
    import oracle.ifs.fdk.FdkCredential;
    import oracle.ifs.fdk.ManagersFactory;
    import oracle.ifs.fdk.NamedValue;
    import oracle.ifs.fdk.Options;
    import oracle.ifs.fdk.SearchExpression;
    import oracle.ifs.fdk.SearchManager;
    import oracle.ifs.fdk.SimpleFdkCredential;
    import oracle.jdbc.pool.OracleDataSource;
    public class Prueba {
         public static void main(String args[]) {
              Thread thread = new BasicThread1();
              Thread thread1 = new BasicThread1();
              Thread thread2 = new BasicThread1();
              Thread thread3 = new BasicThread1();
              Thread thread4 = new BasicThread1();
              thread.start();
              thread1.start();
              thread2.start();
              thread3.start();
              thread4.start();
    class BasicThread1 extends Thread {
         public void run() {
              ManagersFactory session = null;
              try {
                   System.out.println(this.getName() + "-->init");
                   session = getSession();
                   SearchManager sManager = session.getSearchManager();
                   SearchExpression srchExpr = new SearchExpression(Attributes.SIZE,
                             new Integer(20000000), FdkConstants.OPERATOR_LESS_THAN);
                   NamedValue[] res = null;
                   for (int i = 0; i < 100000; i++) {
                        res = sManager.search(srchExpr, basicSearchOptions2,
                                  AttributeRequests.DOCUMENT_CATEGORY_ATTRIBUTES);
                   System.out.println(this.getName()+" --> fin sin error: " + res.length);
                   } catch (Throwable t) {
    t.printStackTrace();
    System.out.println("<--"+this.getName());
              } finally {
                   CommonUtils.bestEffortLogout(session);
         static NamedValue[] basicSearchOptions2 = new NamedValue[] {
                   ClientUtils.newNamedValue(
                                       Options.MULTILEVEL_FOLDER_RESTRICTION,
                                       Boolean.TRUE),
                   ClientUtils.newNamedValue(Options.SEARCH_FOR_DOCUMENTS,
                             Boolean.TRUE),
                   ClientUtils.newNamedValue(Options.SEARCH_FOR_FOLDERS,
                             Boolean.FALSE),
                   ClientUtils.newNamedValue(Options.RETURN_COUNT,
                             new Integer(500)) //<<Maximo nº de elementos
         private static ManagersFactory getSession() throws Exception {
         OracleDataSource ods = new OracleDataSource();
         ods.setURL("URL");
         Connection conn = ods.getConnection();
         FdkCredential credential = new SimpleFdkCredential("USER","PSW");
         ManagersFactory session = ManagersFactory.login(credential,
         "SERVER");
    return session;
    }

    re-Post

  • Java Out of memory error when accessing MySQL

    Hi all
    I've got a weird problem, I programed some code to mirror data between two databases and I was testing it with two different computers each one running MySQL. The first database has 33,000 rows across 40 columns and the second one 380,000 rows across 40 columns. When trying to transfer the data from the small database to the large one everything works fine, after a couple of minutes all 33,000 rows are successfully transfered to the large one.
    But then I tried it the other way around, transfer 380,000 rows to the small. This does not run at all it just gives me an error of Out Of Memory and stops. I tried on win2k, winxp and redhat 7.3 same error. Does anyone has any idea why this is happening? All three machines have 512MB RAM.
    Is there a limit on the size that a result set can have? I really need to know since this database is gonna grow by aprox. 136,000 rows per hour or 3,264,000 rows per data. That's about 3 GB of data per day which needs to be mirrored across the databases.
    Any suggestions would really be apreciated

    Thanks for the response guys,
    The purpose of this program is to mirror the data between two databases. The first one sits on a machine that is monitoring a system through sensors connected via a DSP card. Now the processing of the gathered data is done on the second machine. This mirroring needs to happen every day and as I said on my previous post the amount of data is aprox. 3GB per day or about 1.2m rows per day. I know this is a huge amount of data.
    In the program I've written what I do is:
    get a connection to both databases on both servers then I create a prepared statement to do the INSERT. Then I get a result set from the first database and in the while loop I update the data to the second one. So only one result set is used. Now I shouild let you know that there's never gonna be any updating of the data only new ones get added.
    I am assuming by the error I get that when I get my result set it tries to load it all in memory which I do not want to do for the obvious reasons.
    I am including my code
    import java.sql.*;
    import java.util.*;
    class Mirror {
        Connection con;
        Statement dispStmt;
        Connection con2;
        PreparedStatement updStmt2;
        public static void main( String args[] ) {
            Mirror mr = new Mirror();
            mr.process();
        public void process() {
            try {
                Class.forName( "org.gjt.mm.mysql.Driver" ).newInstance();
                con2 = DriverManager.getConnection( "jdbc:mysql://ipaddress/database2", "username", "password" );
                updStmt2 = con2.prepareStatement( "insert into Gratings (SensorSetID, Grating_1, Grating_2, Grating_3, Grating_4, Grating_5, Grating_6, Grating_7, Grating_8, Grating_9, Grating_10, Grating_11, Grating_12, Grating_13, Grating_14, Grating_15, Grating_16, Grating_17, Grating_18, Grating_19, Grating_20, Grating_21, Grating_22, Grating_23, Grating_24, Grating_25, Grating_26, Grating_27, Grating_28, Grating_29, Grating_30, Grating_31, Grating_32, Grating_33, Grating_34, Grating_35, Grating_36, Grating_37, Grating_38, Grating_39, Grating_40) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" );
                con = DriverManager.getConnection( "jdbc:mysql://ipaddress/database1", "usernames", "password" );
                dispStmt = con.createStatement();
            catch( Exception e ) /* (ClassNotFoundException and SQLException)*/ {
                e.printStackTrace();
            try {
                synchronized( this ) {
                    ResultSet rs = dispStmt.executeQuery( "select * from Gratings" );
                    while( rs.next() ) {
                        updStmt2.setString( 1, rs.getString( "SensorSetID" ) );
                        updStmt2.setString( 2, rs.getString( "Grating_1" ) );
                        updStmt2.setString( 3, rs.getString( "Grating_2" ) );
                        updStmt2.setString( 4, rs.getString( "Grating_3" ) );
                        updStmt2.setString( 5, rs.getString( "Grating_4" ) );
                        updStmt2.setString( 6, rs.getString( "Grating_5" ) );
                        updStmt2.setString( 7, rs.getString( "Grating_6" ) );
                        updStmt2.setString( 8, rs.getString( "Grating_7" ) );
                        updStmt2.setString( 9, rs.getString( "Grating_8" ) );
                        updStmt2.setString( 10, rs.getString( "Grating_9" ) );
                        updStmt2.setString( 11, rs.getString( "Grating_10" ) );
                        updStmt2.setString( 12, rs.getString( "Grating_11" ) );
                        updStmt2.setString( 13, rs.getString( "Grating_12" ) );
                        updStmt2.setString( 14, rs.getString( "Grating_13" ) );
                        updStmt2.setString( 15, rs.getString( "Grating_14" ) );
                        updStmt2.setString( 16, rs.getString( "Grating_15" ) );
                        updStmt2.setString( 17, rs.getString( "Grating_16" ) );
                        updStmt2.setString( 18, rs.getString( "Grating_17" ) );
                        updStmt2.setString( 19, rs.getString( "Grating_18" ) );
                        updStmt2.setString( 20, rs.getString( "Grating_19" ) );
                        updStmt2.setString( 21, rs.getString( "Grating_20" ) );
                        updStmt2.setString( 22, rs.getString( "Grating_21" ) );
                        updStmt2.setString( 23, rs.getString( "Grating_22" ) );
                        updStmt2.setString( 24, rs.getString( "Grating_23" ) );
                        updStmt2.setString( 25, rs.getString( "Grating_24" ) );
                        updStmt2.setString( 26, rs.getString( "Grating_25" ) );
                        updStmt2.setString( 27, rs.getString( "Grating_26" ) );
                        updStmt2.setString( 28, rs.getString( "Grating_27" ) );
                        updStmt2.setString( 29, rs.getString( "Grating_28" ) );
                        updStmt2.setString( 30, rs.getString( "Grating_29" ) );
                        updStmt2.setString( 31, rs.getString( "Grating_30" ) );
                        updStmt2.setString( 32, rs.getString( "Grating_31" ) );
                        updStmt2.setString( 33, rs.getString( "Grating_32" ) );
                        updStmt2.setString( 34, rs.getString( "Grating_33" ) );
                        updStmt2.setString( 35, rs.getString( "Grating_34" ) );
                        updStmt2.setString( 36, rs.getString( "Grating_35" ) );
                        updStmt2.setString( 37, rs.getString( "Grating_36" ) );
                        updStmt2.setString( 38, rs.getString( "Grating_37" ) );
                        updStmt2.setString( 39, rs.getString( "Grating_38" ) );
                        updStmt2.setString( 40, rs.getString( "Grating_39" ) );
                        updStmt2.setString( 41, rs.getString( "Grating_40" ) );
                        updStmt2.executeUpdate();
                    rs.close();
                con.close();
                con2.close();
            catch( Exception ex ) {
                System.out.println( ex );
                ex.printStackTrace();
    }Does anyone have any suggestions?
    What can I do in order to prevent the whole database being loaded in memory?
    Additionally I noticed that the above operation stops when memory usage reaches 71.5 MB for the JVM

  • XML SQL utility ( Urgent)

    Hi,
    I am trying to install XML SQL utility. I have jdk1.2.2 and
    oracle xml parser v2. I ran the env.bat file. Then when I try to
    run the oraclexmlsqlload.sql file i got 822 errors. Then I try
    to run the first file "loadjava -resolve -verbose -user %
    USER_PASSWORD% xmlparser.jar" I got some these kind of errors,
    resolving: org/w3c/dom/html/HTMLBodyElement
    Error while resolving class org/w3c/dom/html/HTMLBodyElement
    ORA-04043: object org/w3c/dom/html/HTMLBodyElement does not
    exist
    resolving: org/xml/sax/helpers/LocatorImpl
    Error while resolving class org/xml/sax/helpers/LocatorImpl
    ORA-04043: object org/xml/sax/helpers/LocatorImpl does not
    exist
    resolving: oracle/xml/parser/v2/Axis
    Error while resolving class oracle/xml/parser/v2/Axis
    ORA-04043: object oracle/xml/parser/v2/Axis does not exist
    resolving: oracle/xml/parser/v2/PathExpr
    Error while resolving class oracle/xml/parser/v2/PathExpr
    ORA-04043: object oracle/xml/parser/v2/PathExpr does not
    exist
    resolving: oracle/xml/parser/v2/FromDescPrecedingSibling
    Error while resolving class
    oracle/xml/parser/v2/FromDescPrecedingSibling
    ORA-04043: object
    oracle/xml/parser/v2/FromDescPrecedingSibling does not exi
    st
    "I GOT SOME VIEW/TABLE DOES NOT EXIST ERROR ALSO"
    Here is my env.bat file..................
    rem Copyright (c) Oracle Corporation 1999. All Rights Reserved.
    rem
    rem NAME
    rem env
    rem
    rem DESCRIPTION
    rem environmental variables needed to compile or run
    OracleXML utility
    rem
    rem ------------------------ oraclexmlsql utility directory path
    rem set PD to point to the directory in which you expanded the
    zip file
    set PD=C:\Oracletools\OracleXSU
    rem ------------------------ JDBC classes
    set CLASSPATHJ=D:\Oracle\Ora8i\jdbc\lib\classes111.zip
    rem ------------------------
    rem This need not be changed
    set XMLSQL_DIR=%PD%\lib\oraclexmlsql.jar;%PD%;%PD%\src;%PD%\lib;%
    PD%\sample
    rem ------------------------ Oracle XML parser settings
    rem This need not be changed
    set ORACLE_PARSER=%PD%\lib\xmlparser.jar
    rem ------------------------ JDK_HOME
    set JDK_HOME=C:\JDK1.2.2
    rem ------------------------ CLASSPATH settings
    set CLASSPATH=%ORACLE_PARSER%;%CLASSPATHJ%;%JDK_HOME%
    \lib\classes.zip;%XMLSQL_DIR%;%CLASSPATH%
    I need urgent help from you...........
    Thanks,
    Chandran...
    null

    Hi,
    Here is the problem. As per your suggestion I had installed
    Jdk1.8.8 and jdbc driver too. Though I am having one JDBC driver
    in oracle8i, I have downloaded from your site and set the env
    path and run the env.bat file. Then when I tried to execute the
    Java OracleXML getXML -user "scott/tiger" "select * from emp"
    file I got runtime error. But first time what I did was I had
    already run the oraclexmlsqlload file so there are lot of
    chances for OracleXML class file to be deleted. So Again I ran
    the oraclexmlsqlload bat file, so definitely it should load the
    oraclexmlsql file and xmlparser file. I didn't get any error. So
    I tried the file for xmlgenpkg it says package created with no
    errors and when I tried the oraclexmlsqltest file I got the same
    error...what I did get yesterday............
    Here is the output , please help me out....
    SQL> @C:\Oracletools\OracleXSU\lib\oraclexmlsqltest.sql;
    SQL> Rem
    SQL> Rem $Header: oraclexmlsqltest.sql 27-jul-99.22:53:37
    vnimani Exp $
    SQL> Rem
    SQL> Rem oraclexmlsqltest.sql
    SQL> Rem
    SQL> Rem Copyright (c) Oracle Corporation 1999. All Rights
    Reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem oraclexmlsqltest.sql - <one-line expansion of
    the name>
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem <short description of component this file
    declares/defines>
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem <other useful comments, qualifications, etc.>
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem vnimani 07/27/99 - add testing for
    setStyleSheetType
    SQL> Rem vnimani 06/19/99 -
    Rem mkrishna 06/13/99 -
    Rem mkrishna 06/13/99 - add more testsSQL> Rem mkrishna 05/27/99 - sql testing the db loaded util
    SQL> Rem mkrishna 05/27/99 - Created
    SQL> Rem
    SQL>
    SQL> Rem Do not set serveroutput to be on here. There are
    problems (bug) when the
    SQL> Rem serveroutput is turned on before the last PL/SQL block
    is executed.
    SQL>
    SQL> set long 4000
    SQL> set pages 8000
    SQL> set echo on
    SQL>
    SQL> Rem Use these to test the results..
    SQL> select xmlgen.getXML('select * from scott.emp',1) from dual;
    select xmlgen.getXML('select * from scott.emp',1) from dual
    ERROR at line 1:
    ORA-29540: class OracleXMLStore does not exist
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at line 1
    SQL> select xmlgen.getXML('select * from all_Tables where
    owner=''SCOTT''') from dual;
    select xmlgen.getXML('select * from all_Tables where
    owner=''SCOTT''') from dual
    ERROR at line 1:
    ORA-29540: class OracleXMLStore does not exist
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at "SCOTT.XMLGEN", line 83
    ORA-06512: at line 1
    SQL>
    SQL> Rem
    SQL>
    SQL>
    SQL> commit;
    Commit complete.
    Thanks,
    Chan...
    Oracle XML Team wrote:
    : Hi Chan,
    : Soon we will release a version of the XSU which runs with
    : JDK1.2 but for now the XSU requires JDK1.1.x. Also, your
    : Oracle8i (or later) database must be java enabled.
    : for starters, try and run the command line front end of the
    : utility:
    : java OracleXML getXML -user "scott/tiger" "select * from emp"
    : once you get this part running then proceed trying to load
    the
    : utility into the db. Note, to run the command line front end
    you
    : will need to have the Oracle JDBC drivers for use with
    JDK1.1.x.
    : They are freely available from:
    : technet.oracle.com/tech/java/sqlj_jdbc
    : Chan (guest) wrote:
    : : Hi,
    : : I am trying to install XML SQL utility. I have jdk1.2.2
    and
    : : oracle xml parser v2. I ran the env.bat file. Then when I try
    : to
    : : run the oraclexmlsqlload.sql file i got 822 errors. Then I
    try
    : : to run the first file "loadjava -resolve -verbose -user %
    : : USER_PASSWORD% xmlparser.jar" I got some these kind of
    errors,
    : : resolving: org/w3c/dom/html/HTMLBodyElement
    : : Error while resolving class org/w3c/dom/html/HTMLBodyElement
    : : ORA-04043: object org/w3c/dom/html/HTMLBodyElement does
    not
    : : exist
    : : resolving: org/xml/sax/helpers/LocatorImpl
    : : Error while resolving class org/xml/sax/helpers/LocatorImpl
    : : ORA-04043: object org/xml/sax/helpers/LocatorImpl does
    not
    : : exist
    : : resolving: oracle/xml/parser/v2/Axis
    : : Error while resolving class oracle/xml/parser/v2/Axis
    : : ORA-04043: object oracle/xml/parser/v2/Axis does not
    exist
    : : resolving: oracle/xml/parser/v2/PathExpr
    : : Error while resolving class oracle/xml/parser/v2/PathExpr
    : : ORA-04043: object oracle/xml/parser/v2/PathExpr does not
    : : exist
    : : resolving: oracle/xml/parser/v2/FromDescPrecedingSibling
    : : Error while resolving class
    : : oracle/xml/parser/v2/FromDescPrecedingSibling
    : : ORA-04043: object
    : : oracle/xml/parser/v2/FromDescPrecedingSibling does not exi
    : : st
    : : "I GOT SOME VIEW/TABLE DOES NOT EXIST ERROR ALSO"
    : : Here is my env.bat file..................
    : : rem Copyright (c) Oracle Corporation 1999. All Rights
    : Reserved.
    : : rem
    : : rem NAME
    : : rem env
    : : rem
    : : rem DESCRIPTION
    : : rem environmental variables needed to compile or run
    : : OracleXML utility
    : : rem
    : : rem ------------------------ oraclexmlsql utility directory
    : path
    : : rem set PD to point to the directory in which you expanded
    the
    : : zip file
    : : set PD=C:\Oracletools\OracleXSU
    : : rem ------------------------ JDBC classes
    : : set CLASSPATHJ=D:\Oracle\Ora8i\jdbc\lib\classes111.zip
    : : rem ------------------------
    : : rem This need not be changed
    : : set
    : XMLSQL_DIR=%PD%\lib\oraclexmlsql.jar;%PD%;%PD%\src;%PD%\lib;%
    : : PD%\sample
    : : rem ------------------------ Oracle XML parser settings
    : : rem This need not be changed
    : : set ORACLE_PARSER=%PD%\lib\xmlparser.jar
    : : rem ------------------------ JDK_HOME
    : : set JDK_HOME=C:\JDK1.2.2
    : : rem ------------------------ CLASSPATH settings
    : : set CLASSPATH=%ORACLE_PARSER%;%CLASSPATHJ%;%JDK_HOME%
    : : \lib\classes.zip;%XMLSQL_DIR%;%CLASSPATH%
    : : I need urgent help from you...........
    : : Thanks,
    : : Chandran...
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • XML SQL Utility Thread Error

    Greetings:
    I am working on how to use xml and 8i to our benefit. I have
    installed Oracle 8i and I have downloaded the XML SQL Utility.
    In checking out the installation using the standard "java ...
    select from" example I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    OracleXML
    The first place I checked was the env.bat file, I found an
    incorrect classpath and changed it:
    rem - JDK_HOME
    set JDK_HOME=C:\JDK1.1.6 (no such folder)
    to
    rem - JDK_HOME
    set JDK_HOME=C:\JDK1.2.2
    All other paths look good. I executed the bat file and tried the
    example again. Same error.
    Any Ideas??
    null

    Still same error.
    Here is what I've done.
    1. rem the JDK Home
    2. downloaded Java 1.1.8 JDK
    3. changed computer env. path to include 1.1.8 JDK
    I have checked all the paths in the bat file and all are pointing
    to the correct place to find the file listed with one exception:
    I don't have a src file in the %PD% folder.
    rem This need not be changed
    set
    XMLSQL_DIR=%PD%\lib\oraclexmlsql.jar;%PD%;%PD%\src;%PD%\lib;%PD%\
    sample
    Where should it be pointing for the src file?
    Oracle XML Team wrote:
    : Hi Michael,
    : Based on the symptoms described, I am guessing something in
    : your environment still isn't right (i.e. env.bat hasn't been
    : configured correctly). Please confirm that all the paths in
    that
    : directory point to the right places. In particular make
    : sure that your CLASSPATH includes the directory in which
    : oraclexmlsql.jar and parser.jar reside. Also, the XSU is
    : supposed to run against JDK1.1.6 (we haven't tested it against
    : 1.2). One last thing... make sure that JAVA_HOME environment
    : variable is NOT set (i.e. make sure it is undefined).
    : Michael Cline (guest) wrote:
    : : Greetings:
    : : I am working on how to use xml and 8i to our benefit. I have
    : : installed Oracle 8i and I have downloaded the XML SQL
    Utility.
    : : In checking out the installation using the standard "java ...
    : : select from" example I get the following error:
    : : Exception in thread "main" java.lang.NoClassDefFoundError:
    : : OracleXML
    : : The first place I checked was the env.bat file, I found an
    : : incorrect classpath and changed it:
    : : rem - JDK_HOME
    : : set JDK_HOME=C:\JDK1.1.6 (no such folder)
    : : to
    : : rem - JDK_HOME
    : : set JDK_HOME=C:\JDK1.2.2
    : : All other paths look good. I executed the bat file and tried
    : the
    : : example again. Same error.
    : : Any Ideas??
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • Out of memory error

    Hello all,
    I am newbie to this forum, so kindly excuse me if I am posting an incorrect question.
    My application goes down every week and the error logs point to java.lang.OutOfMemoryError.
    Analysed the sysout logs and heap logs : -
    Sysout logs :
    Could not invoke the service() method on servlet action. Exception thrown : java.lang.OutOfMemoryError
         at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java(Compiled Code))
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java(Compiled Code))
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java(Compiled Code))
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java(Compiled Code))
         at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java(Compiled Code))
         at xxx.cis.tuf.server.connector.jdbc.v1.JDBCv1DBStatement.executeQuery(JDBCv1DBStatement.java(Compiled Code))
         at xxx.myapplication.dao.Person.loadRecord(Person.java(Compiled Code))
         at xxx.myapplication.SiteUtil.getUserJavaLocale(SiteUtil.java(Compiled Code))
         at xxx.myapplication.updateprofile.actions.UpdateProfileAction.execute(UpdateProfileAction.java:56)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined Compiled Code))
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java(Inlined Compiled Code))
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
         at xxx.myapplication.UTF8Filter.doFilter(UTF8Filter.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
         at xxx.cis.tuf.server.filter.TUFExtendedFilterChainImpl.doFilter(TUFExtendedFilterChainImpl.java(Compiled Code))
         at xxx.cis.tuf.server.directory.GroupModifixxxionEventFilter.doFilter(GroupModifixxxionEventFilter.java(Compiled Code))
         at xxx.cis.tuf.sys.server.filter.TUFFilterChainImpl.doFilter(TUFFilterChainImpl.java(Inlined Compiled Code))
         at xxx.cis.tuf.server.filter.TUFExtendedFilterChainImpl.doFilter(TUFExtendedFilterChainImpl.java(Compiled Code))
         at xxx.cis.tuf.server.security.SecurityFilter.doFilter(SecurityFilter.java(Compiled Code))
         at xxx.cis.tuf.sys.server.filter.TUFFilterChainImpl.doFilter(TUFFilterChainImpl.java(Inlined Compiled Code))
         at xxx.cis.tuf.server.filter.TUFExtendedFilterChainImpl.doFilter(TUFExtendedFilterChainImpl.java(Compiled Code))
         at xxx.cis.tuf.server.security.cws.CWSSecurityTokenContextFilter.doFilter(CWSSecurityTokenContextFilter.java(Compiled Code))
         at xxx.cis.tuf.sys.server.filter.TUFFilterChainImpl.doFilter(TUFFilterChainImpl.java(Inlined Compiled Code))
         at xxx.cis.tuf.server.filter.TUFExtendedFilterChainImpl.doFilter(TUFExtendedFilterChainImpl.java(Compiled Code))
         at xxx.cis.tuf.server.logging.LoggingRequestIDFilter.doFilter(LoggingRequestIDFilter.java(Compiled Code))
         at xxx.cis.tuf.sys.server.filter.TUFFilterChainImpl.doFilter(TUFFilterChainImpl.java(Compiled Code))
         at xxx.cis.tuf.server.filter.TUFExtendedFilterChainImpl.doFilter(TUFExtendedFilterChainImpl.java(Inlined Compiled Code))
         at xxx.cis.tuf.server.filter.TUFMasterFilter.doFilter(TUFMasterFilter.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    The analysis of heap dump shows :-
    35,548,944 (29%) [32] 2 java/util/Hashtable$Entry 0x17e998f8
    35,548,888 (29%) [232] 15 com/ibm/ws/rsadapter/spi/WSRdbManagedConnectionImpl 0x128a8c40
    35,084,008 (28%) [24] 1 array of javax/resource/spi/ConnectionEventListener 0x128a8128
    35,083,984 (28%) [16] 1 com/ibm/ejs/j2c/ConnectionEventListener 0x128a7af8
         35,083,968 (28%) [224] 13 com/ibm/ejs/j2c/MCWrapper 0x161ccf50
         34,547,384 (28%) [24] 1 com/ibm/ejs/j2c/poolmanager/MCWrapperList 0x120ea638
         34,547,360 (28%) [216] 42 array of java/lang/Object 0x120ea558
              1,105,160 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x1251fb88
              1,065,552 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x1022c780
              1,061,056 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x107157a0
              1,042,776 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x148ab790
                   1,038,656 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x168fbb30
                   1,000,784 (0%) [224] 9 com/ibm/ejs/j2c/MCWrapper 0x108cec00
                   There are 22 more children
    My analysis is that hashtable is causing this issue.
    In my application I am using hashmap to store resultset objects and use request.setAttribute("databasevaluesforuser", databasevalues) to show in jsp.
    Could it be that after the values are displayed the hashmap still contains those objects and when multiple users
    access the application, heap size increases and this causes out of memory issues. I also paginated some jsp so that users view part by part of the results from database and thus prevent memory outage.
    Could anybody help me in this issue. Please inform me if I need to provide any further information.

    Aplogies for answering late.
    I am using SUN 1.4 jvm
    The analysis of GC logs showed that lot of memory is consumed by java hashmap. In my application I am using hash map only to store the results from database and then represent at jsp using the request parameter.

Maybe you are looking for