RMIRegistry and OutOfMemoryError

I am running a server process that registers 5 RMI Objects with the RMIRegistry that is running as a separate process on default port 1099. Initially, the client process is able to lookup (using Registry.lookup()) these RMI Objects from RMIRegistry and everything works fine, but after a period of 3 days of continuous run, the client process gets an exception java.rmi.NoSuchObjectException when it looks up for these RMI Objects. If I use the Registry.list() API, I can see the name of those 5 RMI Objects listed.
In these 3 days, the Server goes thru a lot of stress and I suspect that it may be leaking memory. I cannot see it since the process is running in background and I do not handle this exception. There is no core dump and the server process is still running.
My question is that what if the behaviour of rmiregistry process when the server process leaks memory and starts throwing OutOfMemoryError.
I am using JDK1.4.0 on HP-UX 11i.
Any help would be appreciated.

sonal-s,
It's not clear to me -- from your post -- whether you are getting a "NoSuchObjectException" or an "OutOfMemory" error (or both).
Regarding the "NoSuchObjectException", this is just a guess, but there is a special, distributed garbage collector associated with RMI objects. Could it be that one of your registered objects is not referenced for a long time and is therefore garbage collected?
Regarding "OutOfMemoryError", there are many profiling tools available that will help you locate memory leaks (if they exist). The JavaPerformanceTuning Web site has all the details.
In either case, the "rmiregistry" merely maintains the lookup information -- what lookup name is associated with what registered object. The RMI server JVM is where the actual objects live. If you haven't already looked at it, I suggest the RMI Guide. Also the book java.rmi: The Remote Method Invocation Guide by Esmond Pitt and Kathleen McNiff explains the distributed garbage collector well (in my opinion, of-course).
[By the way, the "Safari" online library gives you a free two-week trial subscription.]
Perhaps if you posted some more details, I may be able to help you further, such as:
1. Entire error message and stack trace you are getting
2. The part of your code that you think is causing the error
3. Java version you are using
4. Platform you are using
Good Luck,
Avi.

Similar Messages

  • RMIRegistry and rmiserver running  on different machines

    hi,
    Is it possible that RMIRegistry and rmiserver run on different machines?

    Its possible, but you cannot bind objects into the registry from a remote machine, due to security restrictions in force in Sun's RMI implementation.

  • Alternative to Hashtable? Got lots of data and "OutOfMemoryError"

    Hello,
    I am working on an application (CLDC1.1 and MIDP2.0, using NetBeans) and have to use a large look-up table with about 50 000 entries. During runtime the application is set to look up entries xxx times from the table, as fast as possible of course. I have used Hashtable for the table data (keys/value) until now, and distributed it all over several files / classes (singleton, static init) with a Hashtable for each class. Have not yet completely inserted the look-up table (about 30% percent left, and .jar size is 300 KB), but now I get the following error: Uncaught exception java/lang/OutOfMemoryError. All hashtables are initialized with a final size.
    I should have ca. 2 MB of RAM with the emulator Im using . Printing out freeMemory() from the Runtime I notice that the free mem number decreases fast, towards zero, and then it starts over again - decreasing from somewhere under 2 000 000 bytes down to 0. Not a wiz with debugging, but I guess I have to dive deeper into my garbage collection :)
    Is there a better way to store the keys (int) and values (int) of the look-up table? Like an associative array (pseudo): [["key"]=>[value]]
    Should I check out RMS (slow?), or some sorts of file handling? Or maybe a combination of Hashtables in memory and also RMS..?
    If someone could help with a hint or two, I would be very very thankful!
    Tib

    50 000 * (4 + 4) B = 400kB of uncompressed data. That's quite a lot for a MIDlet, but it's probably ok if the rest of your application is not so large. Hashtables need more than the size of the data to be effective, so I think an array of key-value pairs (sorted on the keys) would be best here, and of course using binary search when looking up the values.
    Or you can look at the range, distribution etc. of the keys, perhaps they will allow some optimization.

  • Dynamic Proxy and OutOfMemoryError

    I ran into this problem before when working with Proxied objects.
    I am integrating iBatis into my framework and using Dynamic Proxies to allow a developer to pass in a DAO interface and the Dynamic Proxy will retrieve the correct iBatis SQL Map and run it according to the DAO interface method. Some of these DAO methods take parameters that are lists with 100,000s of records. When I run my batch process using Dynamic Proxies, I get OutOfMemoryError in WebLogic. When I remove the Dynamic Proxy and create a simple implementation for my DAO that I use instead of Proxying it, I get no error and my process runs fine.
    Any thoughts? Does sending huge amounts of data through a Proxy or doing quite a bit of activity inside a Proxied object cause OutOfMemoryErrors?
    Thanks,
    -jay blanton

    Check you don't have an infinite loop or recursion which is wrapping Proxies in Proxies in Proxies...

  • Utilisation of XMLInputStream and OutOfMemoryError (WLS 8.1 SP5)

    Hello,
    Did somebody use weblogic.xml.stream.XMLInputStream to read/parse a large XML file?
    If I understand it well, this class uses SAX to parse the files, so it must be stateless and it must not consume a lot of memory.
    However, when I try to read a 15 Mb XML file, using the following code :
    XMLInputStream matchingStream = XMLInputStreamFactory.newInstance().newInputStream(pFile);
    while (matchingStream.hasNext()) {
    XMLEvent event = matchingStream.next();
    , memory's being consumed quickly and I get OutOfMemoryError when the java process' memory exceedes 74 Mb.
    Can you approve/disapprove my utilisation of this class ?
    Thanks in advance

    I would normally suggest raising the issue with support, but I recall hearing that 8.1 is nearing the end of its support cycle, so I'm not sure that's an option for you. Other options:
    - try upgrading to a newer SP, or better yet, a new version of WebLogic
    - try changing to synchronous forwarding
    - examine thread dumps from when the bridge appears to be stalled
    - post the exception that bridge is throwing when it tries to connect
    - try patching MQ (the problem could be on the MQ side, and perhaps an older version of the bridge may not be fully capable of handling all of MQs minor quirks)
    - write a program to (A) detect inactivity on the src destination, and (B) somehow restart the bridge and/or all of WL when this occurs
    Tom

  • RMI, eclipse, rmiregistry and codebase

    Hi all,
    I'm trying to get sun's RMI hello world (http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html) to work under eclipse.
    This works without problems, but only if i start the rmiregistry from the root of the class tree. (I use a command shell (linux) to start rmiregistry outside of eclipse.) In this case, i don't need to specify a value for the codebase property when starting the server. I don't like this solution because of its ad-hoc-ness, and i would rather set the codebase property and start the rmiregistry from anywhere.
    In my run configuration i use the VM argument
    -Djava.rmi.server.codebase=file:${workspace_loc:/HelloRMIServer/}but that doesn't work, i get an exception:
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: example.hello.Hello
    (etcetera...)What am i doing wrong? What is the correct run-configuration in eclipse?
    Thanks in advance. Michiel.

    Actually I am having a similar problem and it is really strange.
    I set the VM Arguments to: -Djava.rmi.server.codebase=file:${workspace_loc}/RMI/ example.hello.Serverand I get: Coult not find the main class. Programm will exit.
    Whatever I change in the VM Arguments, the error is the same! I know that this is a question related to Eclipse mainly, but I will appreciate any help!

  • RMIRegistry and Server on different Machines

    Is it possible to run rmiregistry on one machine and then bind an object from a different machine to this registry. I can't find any documentation to say that you can't.
    If i try to, i get a hostname is a non-local host Exception.

    What im actually doing is this :
    I have a client program that wishes to transport some C code to a server for execution on that server. This would be simple enough but the client should not be concerned with where the server is, but only needs to know a name server that holds all object and server names so as they can then query this one registry for a server name and then connect to this server.
    I was hoping that you could run rmiregistry on one machine, a server on another, bind that server object to the registry and then connect to the server from the client via the registry.
    I have written my own registry object that implements this fine but i wanted to know whether this was a long winded way. Surely RMI is a java developers alternative to CORBA (according to sun web site !), in which this would be possible with the ORB running on a remote machine to client and server?

  • Java.lang.reflect.InvocationTargetException and OutOfMemoryError non heap

    Hi,
    After tomcat running 3,4 days well with 75 users, suddenly we are facing InvocationTargetException caused by OutOfMemoryError for 3,4 users some times. The JAVA_OPTS options are well configured as observed no heap error issue. Heap utilization is only 60% but Foud that CodeCache is reaching maximum. As codecache is no heap,so it may not provide outofmemory issue. Currently everyday outof production time we are restarting server to avoid sudden exception in production. The following is the exception we received as suggestion of finding the root cause.
    We are using XForms xslt & xpl's in which our spring integrated java dynamically compiled code will be called.
    ep 11, 2009 8:38:00 AM org.apache.jk.common.ChannelSocket processConnection
    WARNING: processCallbacks status 2
    08:38:00,202 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    08:38:00,233 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100(AggregatorProcessor.java:38)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl(AggregatorProcessor.java:93)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:368)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:387)
    at com.expeditor.processors.SingleTaskData.generateData(SingleTaskData.java:85)
    at sun.reflect.GeneratedMethodAccessor2048.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
    at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
    at org.orbeon.oxf.portlet.OPSPortletDelegate.forward(OPSPortletDelegate.java:253)
    at org.orbeon.oxf.externalcontext.PortletToExternalContextRequestDispatcherWrapper.forward(PortletToExternalContextRequestDispatcherWrapper.java:35)
    at org.orbeon.oxf.xforms.XFormsSubmissionUtils.openOptimizedConnection(XFormsSubmissionUtils.java:108)
    at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:768)
    at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:1283)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.OutOfMemoryError
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791)
    at org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2(ReflectionIClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
    at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
    at o

    Hi,
    we have observed memory usage with probe in tomcat. Found no issue with non heap of permgen space. We are generating some dynamic classes which are around 30 for entire application. It is working for 3 days . Even in probe found that perm gen space is gradually decreasing.
    When perm gen outofmemory exception arrived (we reduced and tested ) in the logs we are getting the Error specifying it is OutOfMemory because of PermGen space not enoug.
    But CodeChache is reaching it's maximum as observed in probe and Error message is as above withou heap/perm gen/ other details.

  • Undo and OutOfMemoryError...

    Hi All,
    I have this program in which I work with the StyledDocument. I have implemented the undo functionality as well. Now, if a lot of style changes happen to the file being edited, as in change of color for sections of text eg. highlight of comments, strings etc., I have noticed that lots of instances (thousands) of DefaultStyledDocument.AttributeUndoableEdit are being created. As a result, while doing editing, sometimes java gives OutOfMemoryError.
    Can anyone suggest how I can override the behaviour and instruct java not to worry about remembering AttributeSet changes to an Element?
    Regards,
    M

    Hi All,
    I have seen an example code which is capabable of the operations like undo and redo with JTextPane. But, I need to apply the same for JTextArea.How to apply the undo and redo operations with JTextArea?

  • JEditorPane and OutOfMemoryError

    Hello,
    I'm using a JEditorPane to display a set of html pages. I have two main problems, which a general search tells me is quite common. First of all the CSS isn't recognised, so highlighted text is displayed as plain text. But more importantly, I Get OutOfMemoryErrors for loading relatively small pages - if the file contains only text there is no problem loading it, however if one or more images are embedded in the html more often than not an OutOfMemoryError occurs. The files are each less than 100KBs, but there could be anything form 1 to more than 10 in a single file.
    Has anyone found a way to resolve especially the second problem?
    Aba-Sah
    Exception in thread "Image Fetcher 3" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 1" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 2" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

    thanks, it seems fine with 512M, all the images are able to load without it breaking.

  • Allocated Heap v.s. Max Heap and OutOfMemoryError

    In my application, I specify heap size like following:
    -Xms384m -Xmx384m
    I got few OOME error recently. From our monitoring tool, I can see the 'allocated heap' was only about 280 - 340MB range when OOME happened. That means that the used heap size were close or reach the 'allocated' heap size but not the max heap that defined in '-Xmx'. My question is:
    Why does JVM act like this? What is the problem that prevents JVM from obtaining promised memory from OS?
    We are using JDK 1.5
    Thanks,
    J

    Its easy to check this, create as many threads as possible and configure a small heap size and a big stack size, count the number of created threads, then increase the heap and run the program again. Then you can see the number of threads increased too.
    I have created a [java program to do exactly this, check it out|http://weblogs.java.net/blog/claudio/archive/2007/05/how_many_thread_1.html] .
    See below, how thread stack size are allocated into the heap.
    [http://java.sun.com/docs/hotspot/threads/threads.html|http://java.sun.com/docs/hotspot/threads/threads.html]
    excerpt "TLEs (in 1.3) or TLABs (in 1.4) are thread local portions of the heap used in the young generation"
    [Java Memory White Paper|http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf]
    For multithreaded applications, allocation operations need to be multithread-safe. If global locks were used to
    ensure this, then allocation into a generation would become a bottleneck and degrade performance. Instead,
    the HotSpot JVM has adopted a technique called Thread-Local Allocation Buffers (TLABs). This improves
    multithreaded allocation throughput by giving each thread its own buffer (i.e., a small portion of the
    generation) from which to allocate. Since only one thread can be allocating into each TLAB, allocation can take
    place quickly by utilizing the bump-the-pointer technique, without requiring any locking. Only infrequently,
    when a thread fills up its TLAB and needs to get a new one, must synchronization be utilized. Several techniques
    to minimize space wastage due to the use of TLABs are employed. For example, TLABs are sized by the allocator
    to waste less than 1% of Eden, on average. The combination of the use of TLABs and linear allocations using the
    bump-the-pointer technique enables each allocation to be efficient, only requiring around 10 native instructions.

  • VM args for WL81 and OutOfMemoryError

    Hi,
    We've had some problems with OutOfMemory errors here and our really big application
    WAR file. Typically we get this after re-deploying the WAR a couple of times.
    I've come up with a set of VM tuning arguments that helped us fix the problem,
    so I thought to share it with you:
    -Xmx256M
    -Xms256M
    -XX:NewRatio=12
    -XX:MaxPermSize=64M
    -XX:MaxNewSize=128M
    -XX:SurvivorRatio=2
    The goal of this tuning was to make enough eden space to allow for redeployment
    and restarts of big applications PLUS account for enough perm size so that new
    class definitions could shadow existing ones during the hot-deploy.
    So far it has worked out for us here. I'd like to hear back from anyone who has
    done similar VM tuning.
    Thanks
    -- Jake
    [email protected]
    [email protected]

    Try again. You should get the same exception displayed in both cases. If not then perhaps you are running the code via an IDE and it has different behaviour.

  • CLASSPATH, rmiregistry, unmarshalling exceptions and more !!

    Hi all,
    I am close to getting a very simple RMI example to work.
    Basically, this is what I have:
    On one PC, I have both the client and the server. One command prompt downloads the stub from the apache webserver directory. To do this, I use two command prompts/windows: in one, I say "set CLASSPATH="
    and then "rmiregistry". Then in the next command prompt, I do a
    "java -Djava.rmi.codebase=http://localhost/ Djava.security.policy=policy HelloImpl" (NB: policy is a simply, allow-access-to-all policy).
    In another window, I cd into my client directory and do "java -Djava.security.policy=policy -Djava.security.manager HelloClient"
    - this DOES work! Hurrah!
    But it I try and do the same thing, so that the server side part of
    this RMI link is on a remote Sun machine, so that I am calling it from
    a PC, I get "StubNotFoundException". Note that the Sun machine has no CLASSPATHs set, and I get the above exception if I launch rmiregistry and "java -D.....etc." from different directories. If I start them off from the same directory (containing the *.class, stubs/skels and policy files), I get the message that "my object is bound in the registry"...but then I can't download the stub from the server!
    The problem seems to be the definition of Classpaths as, apart from the remote nature of this second try, everything seems to be fine.

    Done that, mate. Sorry it didn't work.
    I've tried a few experiments with my Sun as the server
    and my PC as the client. In this case, even though the client
    gives the usual unmarshalled error, I have put logs of logging calls
    in my Java launcher call on the server. This is what I get:
    elt@joint-elt:~/src/SunsExample$ java -Djava.rmi.server.codebase=http://10.16.58.7:80/ -Djava.security.policy=policy -Djava.rmi.server.logCalls=TRUE -D java.security.manager -Dsun.rmi.server.logLevel=VERBOSE -Dsun.rmi.loader.logLevel=VERBOSE -D,sun.rmi.server.exceptionTrace=TRUE HelloImpl
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastServerRef
    computeMethodHash
    FINER: main: string used for method hash: "sayHello()Ljava/lang/String;"
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastRef newCall
    FINE: main: get connection
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastRef newCall
    FINER: main: create call context
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastRef invoke
    FINER: main: execute call
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastServerRef logCall
    FINER: RMI TCP Connection(1)-10.16.58.7: [10.16.58.7: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "[Ljava.rmi.server.ObjID;", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "[Ljava.rmi.server.ObjID;" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "java.rmi.server.ObjID", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "java.rmi.server.ObjID" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "java.rmi.server.UID", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "java.rmi.server.UID" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "java.rmi.dgc.Lease", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "java.rmi.dgc.Lease" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "java.rmi.dgc.VMID", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "java.rmi.dgc.VMID" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINE: RMI TCP Connection(1)-10.16.58.7: name = "[B", codebase = ""
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: (thread context class loader: sun.misc.Launcher$AppClassLoader@169e11)
    Nov 19, 2003 1:37:58 PM sun.rmi.server.LoaderHandler loadClass
    FINER: RMI TCP Connection(1)-10.16.58.7: class "[B" found via codebase, defined by null
    Nov 19, 2003 1:37:58 PM sun.rmi.server.UnicastRef done
    FINE: main: free connection (reuse = true)
    HelloServer bound in registry
    <NB: I get no more calls after I try to run the client machine, download the stub, or try to, etc.)
    If this helps, please let me know!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • OutOfMemoryError:Java Heap Space on JSP with %@page buffer % directive

    Hi guys,
    I am developing a large report requires a lot of memory using JSP, therefore I allocated about 4096kb in the JSP as follow:
    ==================================================================
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
    <%@page buffer="4096kb" %>
    <html>...some work to display report ...</html>
    ==================================================================
    The report runs fine but after few retrieves I got the OutOfMemoryError (OOME) and the only way for me to fix it is to restart the web server (tomcat). I went throught few troubleshooting tests and found out if I take out the <%@page buffer="4096kb" %> in the page, the error will go away regardless how much data I am retrieving from database (In another words, if I put this code into a report to retrieve a small data set, I will still get OOME after few tries). I know you can manually enlarge the Java Memory/Heap size, but it will not fix the problem as it will eventually run out of memory anyway. I am wondering is there known bugs relating to manually allocate buffer size for JSP pages? And how can i deal with it if it is a JSP "Bug"? Or there is something else I am doing wrong. (I have tried manually invoke System.gc() but it will not solve the problem)
    any help is appreciated, Thanks.

    Thanks for these information, you are truely amazing with amount of knowledge you have and your analytical skills.
    Back to the topic:
    <quote>
    Only if you waste time with all the intermediate values that are also too big, and only if you persist in your illusion that you are buying performance with these huge buffers. You aren't. You are buying OutOfMemoryErrors instead.
    You do need to realize that your output will be (i) buffered by the socket send buffer, which is only 8k on Windows, and (ii) transmitted in packets of the path MTU, which is less than 1500 bytes in most cases, so this huge buffer can't possibly do you any good - it just adds latency and OutOfMemoryError risk, as I've been telling you.
    </quote>
    I don't know which part of my replay does not agree with you that setting the buffer size too large is more of an problem other than a solution, perhaps I miss leaded you somehow.
    <quote>That doesn't actually answer the question, does it?</quote>
    Well if a page can be complied and retrieved in the first place, is there enough space to create the page/object? Perhaps you can tell me if I am wrong about it and why.
    I believe the JspWriter object is stored in heap and heap is break up into few sections. I wouldn't be able to tell you for sure which section it resides but my guess is in Eden Space and that space is just about 4MB in space. But remeber I did my test by changing the buffer size to 2MB which is well under the 4MB, I still get the same error.
    <quote>That was what your question was about. OutOfMemoryError using huge buffers. So that's what I focussed on.</quote>
    Yes, you did ponting me out that but what you have done is told me not to use it, which I am very happy with. In my older post, I did actually correct myself and made my question more clear by asking
    "Why with large JSP buffer size, the retrival of the JSP page chewing up the server memory? Shoudlnt memory be released after the page is retrieved?"
    Unfortunitelly I don't think you pointing me anything about it, instead you told me all the reasons not to do it and assuming that I was arguing with you about "it is better to have large buffer jsp size". Again, sorry if I miss leaded you somehow.
    Lets put it this way, even with large jsp buffer size (regardless whether we should be doing that or not) if the memory is freed properly, I will not get OOM error. Am I right?
    <quote>I take out the <%@page buffer="4096kb" %> in the page, the error will go away</quote>
    Yes, but I need to restart my server to make it work. I forgot to mention it, my bad.
    Last, I finally found my answer through web and other forumes. The reason of this happening is because my web server did not release the PageContext object properly which JspWriter is linked to, therefore the memory does not get released at all. So ths the issue that chewing up the server memory. Again, thank you for all your help, your suggestion and knowledge did help me find out my answer in the end.

  • Java.lang.OutOfMemoryError

    Hi all, can anybody help me?
    I am getting in production environment the error below. We have jboss 4.0.4 in virtual machine and 2 tomcat (apache-tomcat-5.5.17) servers in 2 different virtual machines. Between we have load balance also to send the request in 2 tomcats.
    Jboss is running in \jrockit-R27.3.1-jdk1.5.0_11 and tomcat 1 in \jrockit-R27.3.1-jdk1.5.0_11 and the other in \jrockit-R27.3.5-jdk1.5.0_14. Jboss deployment is build in jre6 and tomcat deployment (*.war files) in jdk 1.6.0_22. We have the same environment for test. In test env everything works fine and we did also stress test
    for 50 users and works fine. When we go live we are getting the error bellow, many times and in many screens. I couldn't find any pattern or something similar. Every time is different when tomcat communicated with jboss and also in both tomcats I am getting the same. The out of memory error it is throwing in tomcat. Jboss works fine.
    The strange think is that in the old version of production is working fine, and we did not make a lot of changes. The only thing is that in old version the deployment of the jboss is build in jdk 1.5.0_18 but now it is in jre6. Could someone give me a solution of that? I am thinking that the problwm maybe is that jboss deployment it is in jre6 and jboss is running with jrockit.
    Both tomcat java options:
    JAVA_OPT: -server -Xms1024m -Xmx1024m -XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000 -Djava.security.auth.login.config=C:\apache-tomcat-5.5.17\conf\login.conf
    Error 1:
    2013-01-22 12:54:38,052 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[nettutor].[Faces Servlet]] (TP-Processor619:) Servlet.service() for servlet Faces Servlet threw exception
    java.lang.OutOfMemoryError: mmAllocObject - Object size: 80
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
    at java.lang.Class.getDeclaredMethod(Class.java:1907)
    at java.io.ObjectStreamClass.getInheritableMethod(ObjectStreamClass.java:1321)
    at java.io.ObjectStreamClass.access$2200(ObjectStreamClass.java:52)
    at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:432)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1035)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at cy.com.net.util.ServiceLocatorNew.lookupRemote(ServiceLocatorNew.java:75)
    at cy.com.net.nettutor.client.nettutorClient.init(nettutorClient.java:52)
    at cy.com.net.nettutor.client.nettutorClient.invoke(nettutorClient.java:62)
    at cy.com.net.nettutor.RequestBean.invoke(RequestBean.java:175)
    at cy.com.net.nettutor.LoginPage.load(LoginPage.java:439)
    at cy.com.net.nettutor.LoginPage.prerender(LoginPage.java:415)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.prerender(ViewHandlerImpl.java:815)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:303)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    Error 2:
    javax.faces.FacesException: #{ReportSavePage.btnSaveReport_action}: javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
    at cy.com.net.faces.webapp.CustomActionListener.processAction(CustomActionListener.java:34)
    at javax.faces.component.UICommand.broadcast(UICommand.java:332)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:84)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:84)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.UrlSessionFilter.doFilter(UrlSessionFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    ... 38 more
    Caused by: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
    at java.io.BufferedInputStream.<init>(BufferedInputStream.java:178)
    at java.io.BufferedInputStream.<init>(BufferedInputStream.java:158)
    Error 3:
    2013-01-18 11:26:16,300 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[nettutor]] (TP-Processor667:) An unknown error occured. allocLargeObjectOrArray - Object size: 263952, Num elements: 263936
    javax.faces.FacesException: #{paymentConfirmPage.confirmBtn_action}: javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 263952, Num elements: 263936
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
    at cy.com.net.faces.webapp.CustomActionListener.processAction(CustomActionListener.java:34)
    at javax.faces.component.UICommand.broadcast(UICommand.java:332)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:84)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:84)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at cy.com.net.servlet.filter.UrlSessionFilter.doFilter(UrlSessionFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 263952, Num elements: 263936
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    ... 38 more
    Caused by: java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 263952, Num elements: 263936
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
    at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java)
    at java.rmi.MarshalledObject$MarshalledObjectOutputStream.writeLocation(MarshalledObject.java:242)
    at sun.rmi.server.MarshalOutputStream.annotateClass(MarshalOutputStream.java:76)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1591)
    at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1175)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at java.util.HashMap.writeObject(HashMap.java:2316)
    error 4:
    2012-10-19 12:41:46,020 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[nettutor].[Faces Servlet]] (TP-Processor66699:) Servlet.service() for servlet Faces Servlet threw exception
    java.lang.OutOfMemoryError: create_interned
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
    at java.lang.Class.getDeclaredMethod(Class.java:1907)
    at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
    at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
    at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:396)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:396)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1035)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at javax.naming.CompoundName.writeObject(CompoundName.java:541)
    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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    2012-10-19 12:41:46,020 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[nettutor].[jsp]] (TP-Processor66699:) Servlet.service() for servlet jsp threw exception
    java.lang.OutOfMemoryError: create_interned
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
    at java.lang.Class.getDeclaredMethod(Class.java:1907)
    at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
    at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
    at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:396)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:396)
    at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1035)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at javax.naming.CompoundName.writeObject(CompoundName.java:541)
    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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    2012-10-19 12:41:46,535 INFO [cy.com.net.servlet.listener.ManagedBeanListener] (Thread-1:) Context destroyed
    2012-10-19 12:41:46,613 INFO [org.quartz.core.QuartzScheduler] (Thread-1:) Scheduler QuartzScheduler_$_1 shutting down.
    2012-10-19 12:41:46,613 INFO [org.quartz.core.QuartzScheduler] (Thread-1:) Scheduler QuartzScheduler_$_1 paused.
    2012-10-19 12:41:46,629 INFO [org.quartz.core.QuartzScheduler] (Thread-1:) Scheduler QuartzScheduler_$_1 shutdown complete.
    2012-10-19 12:41:46,629 INFO [org.quartz.ee.servlet.QuartzInitializerListener] (Thread-1:) Quartz Scheduler successful shutdown.
    2012-10-19 12:41:46,629 INFO [cy.com.net.servlet.listener.ConfigurationListener] (Thread-1:) Context destroyed
    2012-10-19 12:41:49,910 WARN [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[nettutor]] (Thread-1:) Cannot serialize session attribute SessionBean for session 60E3E7E99C3858B503AA138DA31B2E45
    java.io.NotSerializableException: java.util.PropertyResourceBundle
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1462)
    at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:938)
    at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:516)
    at org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)
    at org.apache.catalina.session.StandardManager.stop(StandardManager.java:666)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4345)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892)
    at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164)
    at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054)
    at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066)
    at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:512)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:601)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    2012-10-19 12:41:54,223 ERROR [org.apache.catalina.session.ManagerBase] (Thread-1:) Exception unloading sessions to persistent storage
    java.lang.OutOfMemoryError
    2012-10-19 12:45:03,020 ERROR [org.apache.catalina.session.ManagerBase] (Thread-1:) IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.PropertyResourceBundle
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.PropertyResourceBundle
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1386)
    at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:921)
    at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:393)
    at org.apache.catalina.session.StandardManager.load(StandardManager.java:320)
    at org.apache.catalina.session.StandardManager.start(StandardManager.java:636)
    at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:431)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4131)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    Caused by: java.io.NotSerializableException: java.util.PropertyResourceBundle
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1462)
    at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:938)

    Hi again,
    This is the situation:
    We have virtual machine in jrockitR27 for jboss 4.04 and 2 virtual machines for tomcat 5.5.17 clustering. The deployment in jboss was compile in java 1.5 using jdk1.5.0_18 and tomcat compile in java 1.5 using jdk1.6. This version is working fine.
    After some changes in the code and many test in UAT environment(which is the same with production) and also after stress test, we went live but we got OutOfMemoryError. The only different in the new version is that we had some changes in the code and we compile in java 1.5 using jre6 for jboss and for tomcat compile in java 1.5 using jdk1.6. The outOfMemoryError is throwing in communication of jboss and tomcat. When jboss send hasmap object to tomcat, then tomcat throws outOfMemoryError allocLargeObjectOrArray.
    The only different is that new version compile in java 1.5 using jre6. Is there is a problem for that? So tomcat throws outOfMemoryError allocLargeObjectOrArray. I cannot replicate the error in UAT. But I cannot go live just to test again that it is going to work if I make the build in java 1.5 using jdk 1.5. What else information do you want?
    Do you have experience in jrockitR27 and outOfMemoryError and compatibility issues?
    If I make again the deployment using jdk1.5 it will work?

Maybe you are looking for

  • Zen Xtra refuses to conn

    My mp3 mplayer is a Creative Zen Touch Xtra 30 GB Ok, I was foolishly syncing my library across teh computer and forgot to plug it in, so in the middle of the sync the mp3 player lost power. Now, I can't connect to the mp3 player anymore, I tried goi

  • How to get the name of workspace on htmd db local installation

    Hello to all, I have been working with my html db Xe version on my pc for a while now. I forgot the workspace name. I am trying to run the sample application and for that I need the admin for username and workspace name for password. But forgot the w

  • Problem when joining PO - GRN

    Hi, I have this following code; which I think there is a problem with the Joins. It is working fine when commenting the following fields: T4.ocrCode as 'Profit Centre', T4.U_eEmpID as 'Employee ID',T4.Freetxt as 'Free Text'; but when I include these

  • Command line script in LabView 2010 Win7

    Hi guys, How to execute a CL script in LabView 2010 and pass parameters to it?

  • Copying ALV Display Variants between different programs

    Is there a way to copy the ALV Display Variants from one program to another?  I am NOT referring to selection screen variants. An SAP standard program was copied to a Z program.  Some changes were made to the logic.  The original SAP program has many