Java heap memory errors..

I make a spider program, but it runs out of memory after ~200 websites.
after that it crashes.. or becomes so slow its useless.
The problem is in this Spider class , that cant be garbage collected (But I dont see any reason why not)
These profilers i have seen show you that memory is allocated and cant be garbage collected , but not where ? Can anyone give suggestions what can be wrong with this class or tell how they fix memory problems?
peter
import java.util.*;
import java.net.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import org.htmlparser.util.ParserException;
import org.htmlparser.Node;
import org.htmlparser.NodeFilter;
import org.htmlparser.Parser;
import org.htmlparser.PrototypicalNodeFactory;
import org.htmlparser.tags.BaseHrefTag;
import org.htmlparser.tags.FrameTag;
import org.htmlparser.tags.TitleTag;
import org.htmlparser.tags.HeadingTag;
import org.htmlparser.tags.LinkTag;
import org.htmlparser.tags.MetaTag;
import org.htmlparser.util.EncodingChangeException;
import org.htmlparser.util.NodeIterator;
import org.htmlparser.util.NodeList;
import org.htmlparser.util.ParserException;
import org.htmlparser.beans.StringBean;
public class Spider implements Runnable {
   private URL base;
   private int siteid;  
   private int companyid;
   private int MaxPaginas;
   protected Collection workloadPath = new ArrayList(3);
   protected Collection workloadError = new ArrayList(3);
   protected Collection workloadWaiting = new ArrayList(3);
   protected Collection workloadProcessed = new ArrayList(3);
   protected ISpiderReportable report;
   protected Done done;
   protected Parser mParser;
   String content = "";
   String meta = "";
   String titel = "";
   String kopjes = "";
   static private int count = 0;
   private int taskNumber;
  public Spider(int DBcompanyid, int DBsiteid, URL DBbase, ISpiderReportable report)
     base = DBbase;
     siteid = DBsiteid;
     companyid = DBcompanyid;
     MaxPaginas = 20;
     this.report = report;
     count++;
     taskNumber = count;
     mParser = new Parser ();
     PrototypicalNodeFactory factory = new PrototypicalNodeFactory ();
     factory.registerTag (new LocalLinkTag ());
     factory.registerTag (new LocalMetaTag ());
     factory.registerTag (new LocalFrameTag ());
     factory.registerTag (new LocalTitleTag ());
     factory.registerTag (new LocalHeadingTag ());
     mParser.setNodeFactory (factory);
  public void run()
      clear();
      report.koppelDB(siteid,companyid);
      addURL(base);
      begin();
  public Collection getWorkloadPath()
    return workloadPath;
  public Collection getWorkloadError()
    return workloadError;
  public Collection getWorkloadWaiting()
    return workloadWaiting;
  public Collection getWorkloadProcessed()
    return workloadProcessed;
  public void clear()
    getWorkloadError().clear();
    getWorkloadWaiting().clear();
    getWorkloadProcessed().clear();
    getWorkloadPath().clear();
  public void addURL(URL url)
    if ( getWorkloadWaiting().contains(url) )
      return;
    if ( getWorkloadError().contains(url) )
      return;
    if ( getWorkloadProcessed().contains(url) )
      return;
    if ( getWorkloadPath().contains(url.getPath()) )
      return;
     getWorkloadPath().add(url.getPath());
     log("PROCES: " + taskNumber + "  Adding to workload: " + url );
     getWorkloadWaiting().add(url);
     MaxPaginas--;
   protected void processURL (URL Furl) throws ParserException
          NodeList Nlist;
         getWorkloadWaiting().remove(Furl);
         getWorkloadProcessed().add(Furl);
         String url = Furl.toString();
         StringExtractor se = new StringExtractor (url);
         try
            content = se.extractStrings ();
        catch (ParserException e)
                e.printStackTrace ();
        try
        mParser.setURL (url);
            try
               Nlist = new NodeList ();
                for (NodeIterator e = mParser.elements (); e.hasMoreNodes (); )
                    Nlist.add (e.nextNode ());
            catch (EncodingChangeException ece)
                mParser.reset ();
                Nlist = new NodeList ();
                for (NodeIterator e = mParser.elements (); e.hasMoreNodes (); )
                    Nlist.add (e.nextNode ());
        catch (ParserException pe)
           String message;
           message = pe.getMessage ();
           if ((null != message) && (message.endsWith ("does not contain text")))
                System.out.println("Is geen text bestand...");
            else
                throw pe;
        report.writeDB(siteid,(String)Furl.getPath(),content, titel, meta, kopjes);
        String content = "";
        String meta = "";
        String titel = "";
        String kopjes = "";
        log("Complete: " + url);
    class LocalLinkTag extends LinkTag
        public void doSemanticAction ()
            throws
                ParserException
            if(!isHTTPLikeLink())
                return;
            String link = getLink();
           int index = link.indexOf('#');
             if (index != -1)
                 link = link.substring(0, index);
            if(MaxPaginas>1)
               handleLink(base,link);
            else
                return;
    class LocalFrameTag extends FrameTag
        public void doSemanticAction ()
            throws
                ParserException
            String link = getFrameLocation ();
            if(MaxPaginas>1){
                handleLink(base,link);
   public class StringExtractor
     private String resource;
     public StringExtractor (String resource)
        this.resource = resource;
     public String extractStrings ()
        throws
           ParserException
        StringBean sb;
        sb = new StringBean ();
        sb.setLinks (false);
        sb.setURL (resource);
        return (sb.getStrings ());
    class LocalTitleTag extends TitleTag
        public void doSemanticAction ()
            throws
                ParserException
            titel = getTitle();
    class LocalHeadingTag extends HeadingTag
       public void doSemanticAction ()
            throws
                ParserException
            kopjes = kopjes + " " + toPlainTextString();
      class LocalMetaTag extends MetaTag
        public void doSemanticAction ()
            throws
                ParserException
            String metaNaam = null;
            metaNaam = getMetaTagName();
            if(metaNaam!=null)
                if(metaNaam.equals("keywords") || metaNaam.equals("description"))
                        meta = meta + " " + getMetaContent();
  public void begin()
    while ( !getWorkloadWaiting().isEmpty()) {
       Object list[] = getWorkloadWaiting().toArray();
      for ( int i=0;(i<list.length);i++ )
      try{
         processURL((URL)list);
}catch(ParserException pe){
System.out.println("Parser error:"+pe);
MaxPaginas++;
protected void handleLink(URL base,String str)
try {
URL url = new URL(base,str);
if ( report.spiderFoundURL(base,url)){
addURL(url);
} catch ( MalformedURLException e ) {}
public void log(String entry)
System.out.println(entry );
It must have something to do with the inner classes and processURL since i replaced only this code Swing parser with htmlparser.
I dont expect anyone to exactly say this is wrong or that, but maybe some tools and suggestions how to solve would be very welcome.
thanks

The structure is like this:
public class test{
  public static void main(String args[])
         test x = new test();
         x.execute();
  public void execute()
     ThreadPool pool = new ThreadPool(10);
      for (int i = 0; i < size; i++ )
          pool.assign(new Spider(DBcompanyid, DBsiteid, base,this));
     pool.complete();
}

Similar Messages

  • Java.lang.OutOfMemoryError: Java heap space error

    Hello All,
    We are on SOA 10g (10.1.3.5) and are facing java heap memory error intermittently. We have already beefed up the memory to 1024MB and have implemented separate module-wise domain on the SOA server ex: PTP,DTD etc.
    The error is thrown ecen when data volume is very low << 7MB in size.
    Following is the excerpt from the opmn.xml file.
    <process-type id="oc4j_soa" module-id="OC4J" status="enabled">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-server *-Xms1024m -Xmx1024m* -Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false *-XX:MaxPermSize=256M* -Doraesb.home=/u01/app/oracle/soaprd2/product/app/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Doc4j.formauth.redirect=true -Djava.net.preferIPv4Stack=true -Dorabpel.home=/u01/app/oracle/soaprd2/product/app/bpel -Xbootclasspath^/p:/u01/app/oracle/soaprd2/product/app/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"/>
    </category>
    <category id="stop-parameters">
    <data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
    </category>
    </module-data>
    Can anyone please point out what could go wrong here..
    Thanks,
    Rahul.

    Thanks All..We were able to resolve this issue by tuning the query that SOA used via the DB adapter to poll and select the data set from the custom staging tables. Still, we are thinking of increasing the memory to 2 Gigs.
    Can anyone point out what is the ideal settings for a high transaction environment on SOA 10g (10.1.3.5) for the following..
    -Xms1024m
    -Xmx2048m
    - XX:MaxPermSize=512M
    Thanks,
    Rahul

  • How to figure out the size of an object - java out of heap memory error

    Hi all,
    I am using an object that I found in a library that I didn't create so I don't know its internal state or members.
    I created a single one of these objects and I call announce() on this object which just sends a UDP announcement over the channel to notify listeners. However, after a message #124,288 I get a java out of heap memory error.
    I am wondering if this announce() method is causing the state of the object to grow with every call...it seems unlikely but I want to check to see if it's reserving a growing amount of heap memory without ever allowing it to free.
    My question is how can I check how big the object is within my program? I'd like to check, for instance, at every 10,000 messages sent how much memory the object is taking up. Is there a method call for that? Would I have to use some kind of debugger or memory monitor? I would like something easy to use.
    Please let me know, and thanks in advance.
    Julian

    jboolean23 wrote:
    Thanks for the quick reply.
    I say it's unlikely that the methods I call are filling up heap memory because I have one Message object. This one Message has a myMsg String member. Whenever I want to change the message I call myMsg = "anewstringhere". And then I do myMessageObject.announce(); And for that reason i say I only have one Message object. The only thing added to the heap would be the strings that I replace myMsg with. The old references to myMsg are no longer valid and should be garbage collected..
    Unless of course if you are calling intern() on them.
    so here's my train of thought (and this isn't what my actual code looks like):
    myMessageObject.myMsg = "hello" //creates a string on the heap? I assume this is equivalent to saying myMsg = new String("hello")No they are not the same.
    The text literal will be in the intern space. Both code fragments would do that.
    The second example would create a second instance of String(). That second instance would be cleaned when no longer referenced. But the literal will not.
    Is my thought process correct? You are calling a third party library right so mock it (write a simple replacement that does the minimal correct functionality.) Substitute it in your code. And then run. If it still fails then the problem is in your code. If not then it is either in the library or the way that you use the library.

  • Java Heap Space Error in BI Publisher

    Hi,
    I have an issue with BIP reports.
    My report is working fine in development instance as it has very less data.
    But the same report is throwing "Java Heap Space" error in another instance which is having huge amount of data.
    I tried to modify the oc4j.cmd file by increasing the values -XX:MaxPermSize=128m -Xmx1024m.
    After restarting the oc4j serivices,my OBIEE and BIP URL's becomes dead slow.
    Is there any solution to improve the performance (or) is there any other way to resolve this issue.
    I am running on
    OBIEE 10.1.3.4.2.
    oc4j Server
    Windows box.
    Thanks in advance.
    Pramod.

    Changing os's may help, or it may not. Java requires contiguous memory addresses for the heap, and that varies with the os, os parameters, what has previously been loaded into memory, and how much physical memory is available. The heap can't be assigned to the os's swap space; the os handles paging in and out of memory. All modern os's provide paging to disk.

  • While generating the huge report getting Java Heap Space Error

    Hi All,
    We are using XML Publisher 5.6.2. we have to generate the huge report which contains more than 300 sql statements. Since our schema structure we can not reduce the queries. Now we are facing issue while generating the report. It takes lot of time and gives 'java heap space error'. We are using data template and RTF template for generating excel report.
    Can anybody help me to resolve the issue? or is there any other way to generate the huge reports?
    Thanks,

    Hi,
    I had seen the forum, but we had already adjusted the parameters in the oc4j "-XX:MaxPermSize=128m -Xmx512m" values to 4096. but still we are getting the java heap space error. since we increased the size of xmx value, XML Publisher occupies 61% of memory of the server. B'coz of this our other applications are getting affected.
    and also, since we are using XML Publisher 5.6.2, can you please assist us how to set the scalable property to 'true'.
    Thanks,
    Ramya.
    Edited by: user753355 on Aug 12, 2009 3:35 AM

  • Java Heap Space Error

    Hi,
    We are running SAP MII 12.0 on windows server 2003 SP1 installed on a virtual machine with 4GB RAM, Intel Xenon CPU E5504 @ 2.00 GHz.
    We started getting the Java Heap Space Error while executing a transaction which fetches about 200 rows. But now the error is quiet frequent and appears while trying to open or close the transactions or save trying to save data.
    I have edited the heap space in the config tool to 2048 but this has not helped. Not sure if this is of significance but the SAP R3 server being used is quiet slow and takes about 3 mins to return data when I run the BAPI on it. This resulted in the transaction timing out a few times before we started getting the error. Increasing the connection timeout and read timeout for the transaction has not helped.
    Please help me resolve this
    Thanks
    Maaz Ahmed

    The BAPI being used is BAPI_GOODSMVT_GETITEMS I am specifying the Material, Plant, Goods Mvt ranges, and a date range.
    I was informed that the QA R3 system is not among the best servers and the speeds would be better in production (under 3s).
    Also I have been looking at the sapmmc. Each time I restart the cluster or the server I get a series of messages or alerts. In these alerts I see a series (Content, Navigation, PRT, etc..) of health checks failing. And the last two errors are as below
    Object - Common Information
    Attribute - Failed to Start Application
    Description - 2 appl > 1 appl last reported value above threshold.
    and
    Object - Common Information
    Attribute - Failed to Start Application
    Description - 1 appl > 0 appl last reported value above threshold.
    I am able to launch the menu page after this and when i run the above mantioned BAPI I get the error
    Object - Memory Info
    Attribute - Usage Rate
    Description - 81% > 80% last reported value above threshold

  • Recon task fails with Java heap space error

    Hi All,
    I have this annoying issue at the moment where a custom recon task will start, process a few users, and then end up with a java heap space error. The app server will then restart after a few minutes and run into the same problem and bomb out while continuing to fill the log file.
    This has only just started and nothing has changed in our environment so it baffles me as to why it has started. The recon task uses some code to do a lookup and then adds the users to certain groups.
    Error from log:
    10/12/12 17:41:03 Target Class = uob.oim.adapters.AddGroup
    DEBUG,12 Dec 2010 17:41:03,704,[UBOIM],AddGroup:107:addGroup(BR20, SCHOOLS, EMPOWER)
    10/12/12 17:41:03 Looking up
    DEBUG,12 Dec 2010 17:41:03,704,[UBOIM],OIMConnection::getThorUtility(tcLookupOperationsIntf)
    10/12/12 17:55:31 Running GETLOOKUP
    10/12/12 17:55:31 Target Class = uob.oim.adapters.AddGroup
    DEBUG,12 Dec 2010 17:55:31,351,[UBOIM],AddGroup:109:addGroup(MTH, CAMPUSES, EMPOWER)
    10/12/12 17:55:31 Looking up
    DEBUG,12 Dec 2010 17:55:31,351,[UBOIM],OIMConnection::getThorUtility(tcLookupOperationsIntf)
    ERROR,12 Dec 2010 18:01:18,108,[XELLERATE.DATABASE],Class/Method: tcDataBase/readPartialStatement encounter some problems: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    APP SERVER RESTARTS...
    Then falls over again:
    10/12/12 18:12:26 Running GETLOOKUP
    10/12/12 18:12:26 Target Class = uob.oim.adapters.AddGroup
    DEBUG,12 Dec 2010 18:12:26,610,[UBOIM],AddGroup:119:addGroup(MTH, CAMPUSES, EMPOWER)
    10/12/12 18:12:26 Looking up
    DEBUG,12 Dec 2010 18:12:26,610,[UBOIM],OIMConnection::getThorUtility(tcLookupOperationsIntf)
    10/12/12 18:13:11 Running GETLOOKUP
    10/12/12 18:13:11 Target Class = uob.oim.adapters.AddGroup
    DEBUG,12 Dec 2010 18:13:11,546,[UBOIM],AddGroup:107:addGroup(S&P, PORTFOLIOS, EMPOWER)
    10/12/12 18:13:11 Looking up
    DEBUG,12 Dec 2010 18:13:11,547,[UBOIM],OIMConnection::getThorUtility(tcLookupOperationsIntf)
    ERROR,12 Dec 2010 18:15:52,318,[XELLERATE.DATABASE],Class/Method: tcDataBase/readPartialStatement encounter some problems: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    ERROR,12 Dec 2010 18:15:52,324,[XELLERATE.SERVER],Class/Method: tcKeylessDataObj/runInitialSelect encounter some problems: Data Access Error
    com.thortech.xl.dataaccess.tcDataSetException: Data Access Error
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcKeylessDataObj.runInitialSelect(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcOSI.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcOSI.<init>(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.<init>(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.checkChildren(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.insertResponseMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.updateProcessData(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.linkToProcess(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.applyActionRules(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.checkDataSorted(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.RunAsInterceptor.invoke(RunAsInterceptor.java:31)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.MessageDrivenConsumer.onMessage(MessageDrivenConsumer.java:347)
         at com.evermind.server.ejb.MessageDrivenConsumer.processMessages(MessageDrivenConsumer.java:233)
         at com.evermind.server.ejb.MessageDrivenConsumer.run(MessageDrivenConsumer.java:169)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Data AccessException:
    com.thortech.xl.orb.dataaccess.tcDataAccessException: RESULT_TOO_LARGE_FOR_SERVERDetail: (none)Description: RESULT_TOO_LARGE_FOR_SERVERSQL State: Vendor Code: -1Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
         at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.readPartialStatement(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcDataSet.executeQuery(Unknown Source)
         at com.thortech.xl.dataobj.tcKeylessDataObj.runInitialSelect(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcOSI.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcOSI.<init>(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.initialize(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.<init>(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.checkChildren(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.insertResponseMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.updateProcessData(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.linkToProcess(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.applyActionRules(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.checkDataSorted(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
         at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
         at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.RunAsInterceptor.invoke(RunAsInterceptor.java:31)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.MessageDrivenConsumer.onMessage(MessageDrivenConsumer.java:347)
         at com.evermind.server.ejb.MessageDrivenConsumer.processMessages(MessageDrivenConsumer.java:233)
         at com.evermind.server.ejb.MessageDrivenConsumer.run(MessageDrivenConsumer.java:169)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    What can I check/change given that this has happened out of no where. Only fix at the moment is to stop and start app server, but seems to fall over again on the same recon task.

    Error is just related to memory. Why don't you increase memory in your environment ?

  • Flash Builder 4.5 Java Heap Space Error

    Hello everyone,
    I've downloaded Flash Builder 4.5 trial a few days ago. Let me first tell that I like the new features a lot and they help to speed up the development process noticably. I thank Adobe for that very much.
    However I did not notice any performance boost over the Flash Buidler 4. Even worse, the 4.5 version seems to run much slower and use more memory than Flash Builder 4. I constantly keep getting Java Heap Space errors and needles to say, the tool just crashes and I have to restart it.
    Here how my experience working with the new version looks like. I start the Flash Builder 4.5 which has my current project open (for the record, I still use Flex 4.1, and the project includes roughly 300+ classes and 30000+ lines of code (AS and MXML)). At the beggining everything works fine and pretty fast. UI, code completion, snippets and all other good stuff works pretty fast. However, after each build, FlashBuilder.exe process eats up from 50 to 100 megabytes of memory and does not seem to release it or reuse it. So after a 5 or 10 builds it already appears to be using over 1 GB of RAM. At that point the editor becomes sloppy - it can't keep up with my typing, code completion popups takes a few seconds to show up. And a few more builds - the Flash Builder freezes and after a minute or two I get Java Heap Space error.
    I've tried increased the JRE heap space used by the Flash Builder (flashbuilder.ini, flashbuilderc.ini, eclipse.ini) to -Xms512m -Xmx1024m as well as permanent generation heap space to -XX:MaxPermSize=512m -XX:PermSize=256m and the mxml compiler (jvm.config) to -Xms384m -Xmx768m. However this did not solve the problem. Maybe just postponed it a bit.
    Am I the only one observing such behaviour of Flash Builder 4.5? Does any one have any other ideas how to fix this? (by the way, I work on 64bit machine with Widnows Server 2008R2, 4GB of RAM and 2.66 GHz Intel Core 2 Duo).
    Thanks in advance.
    Michael

    I'm seeing nearly the same thing.  I also have a very large set of projects similar to what you are describing and I do have Java Heap Space errors (The details show an error of "java.lang.OutOfMemoryError: unable to create new native thread" occurring for me)
    I had similar issues, although they are more frequent in the 4.5 builder, in the 4.1 builder.  In 4.1 builder, I didn't get the exact same detailed error regarding threads.
    I did install my flash builder into a clean instance of eclipse 3.6.2 vs using the standalone install.  That shouldn't make a difference though.  In 4.1, I tried he standalone install and saw the same issues I saw in the plugin version.
    I'm also using the 4.1 SDK in Flash Builder 4.5 (It appears that is what you are doing).  I've been attributing the crashes to the following bug in the 4.1 SDK, although I have applied the files in the bug report and still have the problem.  I'm hoping when I'm able to switch to the 4.5 SDK it may help.  (I can't switch yet because from what I can tell, it requires 10.2 Flash Player and my company is currently only on 10.0)
    The Bug Report I'm referring to is: https://bugs.adobe.com/jira/browse/SDK-26366
    I've bumped up all of the memory settings you've referred to and it helps the environment run longer, but it still eventually crashes.  One thing I definately do is make sure that the "Build Automatically" is unchecked.
    The machine I'm running on is an Intel 2600K with 16GB of memory running Windows 7 64-bit, so I don't think hardware is the issue.
    No real answer, but your not alone in having similar issues.
    Jon

  • Java Heap Space Error in Unix

    Will Java Heap Space error occur in Unix environment? I have problem with heap space error in Windows. Will it help if i switch to Unix platform? Does Unix swap memory to secondary storage when out of memory?

    Changing os's may help, or it may not. Java requires contiguous memory addresses for the heap, and that varies with the os, os parameters, what has previously been loaded into memory, and how much physical memory is available. The heap can't be assigned to the os's swap space; the os handles paging in and out of memory. All modern os's provide paging to disk.

  • Java Heap Space error while reading from Excel

    Hello,
    I have a data flow which reads from excel and updates records in an oracle table.
    When the data flow tries to read the excel I get a java Heap space Error.
    Error preparing to read <SUPP_STG3_FILE1>: <Java heap space>.
    Data flow <DF_SUPP_STG3_UPD> is terminated due to error <58105>.
    I have configured Excel Adapter since the server is on UNIX. BOExcelAdapter shows status as red once the execution fails. Before that BOExcel adapter status is green.
    BOExcelAdapter Trace:
    1/13/12 10:57:38 PM Thread[Thread-6,5,main]      Received an error message from the message broker. [Communication failure. Read timed out]. Will exit adapter immediately.
    1/13/12 10:57:47 PM Thread[main,5,main]      Create broker client for life-cycle management. Host:port = hikalxboes01:4001
    1/13/12 10:57:47 PM Thread[main,5,main]      Create broker client for data exchange with ASP. Host:port = hikalxboes01:4001. Client ID = com.acta.adapter.msexceladapter.MSExcelAdapter.data_18
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Create broker client for real-time services with ASP. Host:port = 'hikalxboes01:4000''.
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Start instance [BOExcelAdapter] of adapter [com.acta.adapter.msexceladapter.MSExcelAdapter].
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Register the client ID [com.acta.adapter.msexceladapter.MSExcelAdapter.data_18] and adapter destination [hikalxboes01:4001] with the adapter manager.
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Registration complete.
    1/13/12 10:58:10 PM Thread[Thread-10,5,main]      java.lang.OutOfMemoryError: Java heap space
         at org.apache.poi.hssf.usermodel.HSSFRow.addCell(HSSFRow.java:273)
         at org.apache.poi.hssf.usermodel.HSSFRow.createCellFromRecord(HSSFRow.java:196)
         at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:183)
         at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:128)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:283)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:178)
         at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.begin(MSExcelAdapterReadTable.java:537)
         at com.acta.adapter.sdk.StreamOperationWrapper.beginStream(StreamOperationWrapper.java:88)
         at com.acta.adapter.sdk.AdapterRunnerImpl.processBeginOperation(AdapterRunnerImpl.java:1762)
         at com.acta.adapter.sdk.AdapterServiceDataListener.handleBrokerMessage(AdapterServiceDataListener.java:90)
         at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:439)
         at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
         at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1621)
         at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)
    BOExcelAdapter Error Log:
    1/13/12 10:58:10 PM      java.lang.OutOfMemoryError: Java heap space
         at org.apache.poi.hssf.usermodel.HSSFRow.addCell(HSSFRow.java:273)
         at org.apache.poi.hssf.usermodel.HSSFRow.createCellFromRecord(HSSFRow.java:196)
         at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:183)
         at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:128)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:283)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:178)
         at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.begin(MSExcelAdapterReadTable.java:537)
         at com.acta.adapter.sdk.StreamOperationWrapper.beginStream(StreamOperationWrapper.java:88)
         at com.acta.adapter.sdk.AdapterRunnerImpl.processBeginOperation(AdapterRunnerImpl.java:1762)
         at com.acta.adapter.sdk.AdapterServiceDataListener.handleBrokerMessage(AdapterServiceDataListener.java:90)
         at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:439)
         at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
         at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1621)
         at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)

    As Jay mentioned above it might be due to the size of the Excel spreadsheet as you might be hitting the limitation in Apache POI library used for adapter.
    What is the size of the Excel file?
    What is the value of -Xmx parameter - see DS Management Console > Adapter configuration page.
    Thank you,
    Viacheslav.

  • Java heap size error Work manager

    Hi,
      We are working with Work Manager 6.0 running on SMP 2.3 SP03.
    The application was working fine, but after the data load that has happened in the UAT
    System, we are getting the below error:
    2014/08/08 00:48:56.142:
    setImportParameters::STORAGE_REF_KEY=ET_COMPLEX_TABLE
    2014/08/08 00:48:56.143:               + User=TS_MAINTMGR
    2014/08/08 00:48:56.143:                 execute::::TS_MAINTMGR::before
    BAPI execute: /SMERP/MM_CTMATPLANT_GET
    2014/08/08 00:55:20.905:             + BackEnd=Java-1
    2014/08/08 00:55:20.905:               Exception while updating complex
    table 'ctpart': JavaBackEndError: JAVA EXCEPTION CAUGHT:
    java.lang.OutOfMemoryError: Java heap space in
    AgentryJavaComplexTableIterator::hasNext at
    AgentryJavaComplexTableIterator.cpp:52
    2014/08/08 00:55:21.099: + Thread=6588
    2014/08/08 00:55:21.099:   + Thread Pool=Server
    2014/08/08 00:55:21.099:     + WorkFunction=00000000020DEF90
    2014/08/08 00:55:21.099:       + User=TS_MAINTMGR
    2014/08/08 00:55:21.099:         + User=TS_MAINTMGR
    2014/08/08 00:55:21.099:           Received Logout Request message 18
    status changed to 'In Progress'
    2014/08/08 00:55:21.105:         Logged out (but not yet cleaned up)
    We tried to increase the min and max heap size from 256 / 512 to 512 /
    2048 respectively in Agentry.ini, but are still getting the same error.
    Please let us know if there is any other parameter which can be used to
    fine tune this and get this up and running,
    Thanks for the help.

    Raviraj,
    Are you working with Boopaln?  The reason why I as He posted the same error (in the same complex table) With the same changes but just a different user shown.
    If yes. please see that thread at:  JAVA Heap Size Error in SAP Work Manager

  • Is there a way to define the ideal size of the java heap memory?

    Hello all!
    Is there a way to define the ideal size the java heap memory? I'm using a server with (IR,FR,WA) installed and i'm using the Windows Server 2008 R2 with 32GB of ram memory. I have other server with the same configuration using essbase. How can i set the heap memory? I have around 250 users (not simultaneous).
    Regards,
    Rafael Melo
    Edited by: Rafael Melo on Aug 17, 2012 5:40 AM

    For 2008 which is 64 bit you can have
    For FR in windows registry
    HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\Hyperion Reports\HyS9FRReport
    Xms and Xmx can have 1536 each.
    For workspace
    Start “Start Workspace Agent UI” service and open Configuration Management
    Console (CMC) via http://localhost:55000/cmc/index.jsp
    for
    Workspace Agent / Common Services Java Heap size you can have
    Xms and Xmx as 1024 each.

  • How can I detect Java Heap Space Error?

    Is it possible to detect "Java Heap Space" error logged by Report Viewer Bean?
    It's displayed on screen and Console - but what about API?
    Can I catch it somewhere? Any isError() method? I tried isBusy(), but it does not work - after Heap Space Error, isBusy() still returns true...
    Edit:
    Sometimes, there is NullPointerException logged after Heap Space Error - in this case isBusy() is set to false after five minutes timeout.
    Edited by: mr. regis on Jan 17, 2011 10:27 AM

    Can you show me the link of the bug report?
    A.A.
    This type of functionality is supposed to exist via
    the dom,
    but I don't think it works as advertised in 1.4.x (bug
    reports).

  • Flash Builder 4.6 Java Heap Space Error

    Hi,
    I get this error "Java Heap Space" when trying to clean build (or build in any way) my project.
    I have a lot of embeded assets (png, mp3 and some binary files embeded to be read as a ByteArray) which total about 37 MB. Including one more 1.6MB binary asset causes this error to occur.
    I have tried to change my memory settings about (-Xmx and -Xms) as previous posts have suggested but this doesn't seem to make any difference.
    Is there any patch or solution to this very frustrating limitation of Flash Builder?
    Thanks for any help!
    Tom

    I constantly had issues with this.  I managed to run into the max for increasing the heap space.  I was able to get beyond the limit by flagging the FlashBuilder.exe file to allow it to allocate to higher memory address ranges.  I'm on a 64 bit machine, so the only limitation was the 32 bit FlashBuilder process.  Anyways i was able to get from 1024m up to 1720m.  Also note that FlashBuilder 4.7 Beta is out and it is a native 64 bit application, so you will get higher addressing there.  I just found it to be too buggy for my every day development tasks.  Also missing the Design view really hurts development.  I hope they put that back in.
    Here's more detail on how I got beyond the java heap ceiling.
    http://chrsmrtn.azurewebsites.net/flash-builder-java-heap-errors-limitations-of-xms-and-xm x/

  • Java heap space error in obiee 10g

    Dear All,
    We are unable to generate the reports. We observed the following error in OC4J
    12/06/06 17:43:28 java.lang.OutOfMemoryError: Java heap space
    12/06/06 17:43:36 Exception in thread "Timer-8" Exception in thread "Timer-0" j
    va.lang. OutOfMemoryError: Java heap space
    12/06/06 17:44:45 java.lang.OutOfMemoryError: Java heap space
    12/06/06 17:45:18 java.lang.OutOfMemoryError: Java heap space
    12/06/06 17:45:19 java.lang.OutOfMemoryError: Java heap space
    12/06/06 17:45:26 java.lang.OutOfMemoryError: Java heap space
    How to resolve this.
    Thanks.

    Hi,
    Increase the heap size by setting -Xmx to the desired amount of memory in the <java-option> element in opmn.xml:
    <module-data> <category id="start-parameters">
    <data id="java-options" value="-Xmx256M" />
    </category>
    </module-data>
    Alternatively, you can set a system property at OC4J startup:
    java -Xmx256M -jar oc4j.jar
    Refer : http://docs.oracle.com/cd/B14099_15/web.1012/b14011/diagnosis.htm
    Regards,
    Srikanth

Maybe you are looking for