Information Broadcasting  -  java.lang.OutOfMemoryError

Hy, when execute a broadcasting setting i have this error: Error: java.lang.OutOfMemoryError
Could you help me?
Thank's a lot.
Sincerely yours
Andrea Maraviglia

Hi,
By default, the JVM will use up to 16Mb of RAM. If your program allocates a lot of memory, you may need to increase this value to give more room to the garbage collector.
When starting the JVM, two parameters can be adjusted to suit your memory needs :
-mx n Sets the maximum size of the memory allocation pool where n is in bytes, appending "m" to n will
specified the number in megabytes, for example to set the maximum at 20Mb : java -mx 20m myApp
. -ms n Sets the startup size of the memory allocation pool, where n is in bytes, appending "m" to n will
specified the number in megabytes. The default is 1Mb.
With JDK1.2, that syntax have changed, no space between ms/mx and the value : java -mx20m yourApplication
And for your your code you can take ehodges suggestion and try profiling your application for memory
usage and then proceed to change your code so that the memory allocation is better and you are also not
creating objects unnecessarily
Hope this helps
Aviroop

Similar Messages

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

  • Error: java.lang.OutOfMemoryError when uploading CSV files to web server

    Hi experts,
    I have made a JSP page from which clients load csv files to web server. I am using Tomca 4.1 as my web server and JDK 1.3.1_09.
    The system works fine when uploadiing small csv files, but it crashes when uploading large CSV files.
    It gives me the following error:
    java.lang.OutOfMemoryError
         <<no stack trace available>>
    This is the code that I used to load files....
    <%
    String saveFile = "";
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         byte dataBytes[] = new byte[formDataLength];
         int byteRead = 0;
         int totalBytesRead = 0;
         while (totalBytesRead < formDataLength)
              byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
              totalBytesRead += byteRead;
         String file = new String(dataBytes);
         saveFile = file.substring(file.indexOf("filename=\"") + 10);
         saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
         saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
         int lastIndex = contentType.lastIndexOf("=");
         String boundary = contentType.substring(lastIndex + 1,contentType.length());
         int pos;
         pos = file.indexOf("filename=\"");
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         int boundaryLocation = file.indexOf(boundary, pos) - 4;
         int startPos = ((file.substring(0, pos)).getBytes()).length;
         int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
         String folder = "f:/Program Files/Apache Group/Tomcat 4.1/webapps/broadcast/file/";
         //String folder = "10.28.12.58/bulksms/";
         FileOutputStream fileOut = new FileOutputStream(folder + saveFile);
         //out.print("Saved here: " + saveFile);
         //fileOut.write(dataBytes);
         fileOut.write(dataBytes, startPos, (endPos - startPos));
         fileOut.flush();
         fileOut.close();
         out.println("File loaded successfully");
    //f:/Program Files/Apache Group/Tomcat 4.1/webapps/sms/file/
    %>
    Please can anyone help me solve this problem for me...
    Thanx...
    Deepak

    I know it may be hard to throw away all this code, but consider using the jakarta fileupload component.
    I think it would simplify your code down to
    // Create a factory for disk-based file items
    FileItemFactory factory = new DiskFileItemFactory();
    // Create a new file upload handler
    ServletFileUpload upload = new ServletFileUpload(factory);
    // Parse the request
    List /* FileItem */ items = upload.parseRequest(request);
    // Process the uploaded items
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
        FileItem item = (FileItem) iter.next();
        if (item.isFormField()) {
            processFormField(item);
        } else {
            // item is a file.  write it
            File saveFolder = application.getRealPath("/file");          
            File uploadedFile = new File(saveFolder, item.getName());
            item.write(uploadedFile);
    }Most of this code was hijacked from http://jakarta.apache.org/commons/fileupload/using.html
    Check it out. It will solve your memory problem by writing the file to disk temporarily if necessary.
    Cheers,
    evnafets

  • One app service getting "java.lang.OutOfMemoryError: Java heap space"

    We are running a commercial app on WebLogic 9.2. Two physical servers with 5 application processes running on each in a single cluster. on the server in question, we have 5.5 gigs of free ram at the moment and still getting the message below.
    We have 10 app servers and one is getting this message. the full text of it is:
    ####<Apr 13, 2011 10:58:12 AM CDT> <Warning> <DeploymentService> <lxwbwapa> <workbpr2_node_1a> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1302710292663> <BEA-290064> <Deployment service servlet encountered an Exception while handling the deployment service message for request id "-1" from server "Admin_pr2_a". Exception is: "java.lang.OutOfMemoryError: Java heap space
    ".>
    I dug back through the logs and found it started a couple of weeks ago. I have been able to log into this app server without issue.
    Something else I have noticed is that the total heap size for all the app services have shrunk from the initial value of 1.5G - they have all dropped down into the 500 meg range. Is this normal? Why has this one not increased the size of the heap if it is running out of memory?
    I could restart the service for this app server but I would not know the cause and since it is a production server where I am not recieving complaints, I am hesitant to go through the res tape to do a re-start.
    Any information or past experience with this type issue is greatly appreciated.
    Thanks,
    W

    Hello,
    You might want to post this in the weblogic forum: WebLogic Server - General
    as they might be able to explain how WebLogic uses or releases resources.
    Regards,
    Chris

  • Java.lang.OutOfMemoryError - jrockitR27

    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,
    By default, the JVM will use up to 16Mb of RAM. If your program allocates a lot of memory, you may need to increase this value to give more room to the garbage collector.
    When starting the JVM, two parameters can be adjusted to suit your memory needs :
    -mx n Sets the maximum size of the memory allocation pool where n is in bytes, appending "m" to n will
    specified the number in megabytes, for example to set the maximum at 20Mb : java -mx 20m myApp
    . -ms n Sets the startup size of the memory allocation pool, where n is in bytes, appending "m" to n will
    specified the number in megabytes. The default is 1Mb.
    With JDK1.2, that syntax have changed, no space between ms/mx and the value : java -mx20m yourApplication
    And for your your code you can take ehodges suggestion and try profiling your application for memory
    usage and then proceed to change your code so that the memory allocation is better and you are also not
    creating objects unnecessarily
    Hope this helps
    Aviroop

  • Getting java.lang.OutOfMemoryError when updating our application

    Hi Experts,
    When we update our application which is an heavy EAR file we get the following errors in the logs. But the same applications works well when we deploy it for the first few times why is this happening we have enough space in RAM still we get this error and when we restart our server it again works for sometime.
    ServletContext@16428923[app:jccrbxt module:jccrbxt path:/jccrbxt spec-version:null]] Root cause of ServletException.
    java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:328)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:285)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
    at weblogic.servlet.jsp.JspClassLoader.findClass(JspClassLoader.java:48)
    at weblogic.servlet.jsp.JspClassLoader.loadClass(JspClassLoader.java:33)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:281)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:216)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
    Thanks

    Hi,
    Now as you can see that you are getting *"java.lang.OutOfMemoryError: PermGen space"* during the activation on an application it means that you are application needs more space in the non-heap part of the JVM which is PermGen to create the Classes, Class Structures, Methods and Reflection Objects of this applications hence you are getting this issue.
    Now how to solve this issue you try the following check list which would help you resolve this issue and overcome same type of issue in future
    Point-1). Make Sure that the PermGen Area is not set to a very less value.
    Point-2). Usually if an Application has Many JSP Pages in that case every JSP will be converted to a *.class file before JSP Request Process. So a large number of JSPs causes generation of a Large number of *.class files all these classes gets loaded in the PermGen area.
    Point-3). While allocating the -XX:MaxPermSize make sure that you follow a rough Formula… which works in most of the Application Servers.
    MaxPermSize = (Xmx/3) —- Very Special Cases (One Third of maximum Heap Size)
    MaxPermSize = (Xmx/4) —- Recommended (One Fourth Of maximum Heap Size
    To get more information on this I would suggest you to have look at the below link which would surely help you in this case
    Topic: OutOfMemory Causes and First Aid Steps?
    http://middlewaremagic.com/weblogic/?p=4464
    Regards,
    Ravish Mody

  • Don't understand the java.lang.OutOfMemoryError

    Hi there,
    I try to create an 'About' frame for a small programm I created and I get an java.lang.OutOfMemoryError which I don't understand. Can somebody help?
    Here is my code:
    * TabbedPaneDemo.java is a 1.4 example that requires one additional file:
    *   images/middle.gif.
    import javax.swing.JTabbedPane;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JComponent;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.KeyEvent;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    public class TabbedAbout extends JPanel {
              JLabel label=new JLabel("PRODUCT INFORMATION ");
                JLabel pv=new JLabel("Product version:");
                JLabel pvR=new JLabel("1.0");
                JLabel javav=new JLabel("Java Version:");
                JLabel javavR=new JLabel("1.4.2");
                JLabel sqlv=new JLabel("PostgreSQL Version:");
                JLabel sqlvR=new JLabel("8.1");
                JLabel pt=new JLabel("Programming Team:");
                JLabel onoma1=new JLabel("Gkisis Traianos");
                JLabel onoma2=new JLabel("Zafeiropoulos Ioannis");
                JLabel onoma3=new JLabel("Supervisor Teacher:");
                JLabel onoma3R=new JLabel("Stamatis Dimosthenis");
                JLabel alr=new JLabel("Product developed as dissertation for the ATEI");
                JLabel alr2=new JLabel("Thessaloniki on autumn 2006.");
                JLabel alr1=new JLabel("All rights reserved");
                ImageIcon icon = createImageIcon("images/folder_sticky.gif");
            ImageIcon icon2 = createImageIcon("images/tick.gif");
        public TabbedAbout() {
             JLabel panel1 = new JLabel();
             JFrame frame = new JFrame("About");
             JFrame.setDefaultLookAndFeelDecorated(true);
             frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
             //super(new GridLayout(1, 1));
            JTabbedPane tabbedPane = new JTabbedPane();
            panel1.setIcon(new ImageIcon("images/TakeANoteProgress.jpg"));
            tabbedPane.addTab("About", icon, panel1);
            tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
            JPanel panel2 = new JPanel();
            //JFrame frame2 = new JFrame();
            panel2.setLayout(null);
            label.setIcon(icon2);
            label.setBounds(new Rectangle(20, 20, 200, 25));
            pv.setBounds(new Rectangle(20, 40, 175, 45));
            pvR.setBounds(new Rectangle(180, 40, 175, 45));
            javav.setBounds(new Rectangle(20, 60, 175, 45));
            javavR.setBounds(new Rectangle(180, 60, 175, 45));
            sqlv.setBounds(new Rectangle(20, 80, 175, 45));
            sqlvR.setBounds(new Rectangle(180, 80, 175, 45));
            pt.setBounds(new Rectangle(20, 100, 175, 45));
            onoma1.setBounds(new Rectangle(180, 100, 175, 45));
            onoma2.setBounds(new Rectangle(180, 120, 175, 45));
            onoma3.setBounds(new Rectangle(20, 140, 175, 45));
            onoma3R.setBounds(new Rectangle(180, 140, 175, 45));
            alr.setBounds(new Rectangle(20, 190, 500, 45));
            alr2.setBounds(new Rectangle(20, 210, 500, 45));
            alr1.setBounds(new Rectangle(20, 250, 500, 45));
            panel2.add(label);
            panel2.add(pv);
            panel2.add(pvR);
            panel2.add(javav);
            panel2.add(javavR);
            panel2.add(sqlv);
            panel2.add(sqlvR);
            panel2.add(pt);
            panel2.add(onoma1);
            panel2.add(onoma2);
            panel2.add(onoma3);
            panel2.add(onoma3R);
            panel2.add(alr);
            panel2.add(alr2);
            panel2.add(alr1);
            tabbedPane.addTab("Detail", icon, panel2);
            tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
            tabbedPane.setSize(new Dimension(400, 300));
            //Add the tabbed pane to this panel.
            add(tabbedPane);
            //Uncomment the following line to use scrolling tabs.
            //tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
            //Create and set up the content pane.
            JComponent newContentPane = new TabbedAbout();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.getContentPane().add(new TabbedAbout(),
                                     BorderLayout.CENTER);
            //Display the window.
            frame.setLocationRelativeTo(super.getComponent(0));
            frame.pack();
            frame.setResizable(false);
            frame.setVisible(true);
        protected JComponent makeTextPanel(String text) {
            JPanel panel = new JPanel(false);
            JLabel filler = new JLabel(text);
            filler.setHorizontalAlignment(JLabel.CENTER);
            //panel.setLayout(new GridLayout(1, 1));
            panel.add(filler);
            return panel;
        /** Returns an ImageIcon, or null if the path was invalid. */
        protected static ImageIcon createImageIcon(String path) {
            java.net.URL imgURL = TabbedAbout.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
       // private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            //Create and set up the window.
      public static void main(String[] args) {
      //      //Schedule a job for the event-dispatching thread:
        //    //creating and showing this application's GUI.
            //javax.swing.SwingUtilities.invokeLater(new Runnable() {
             // public void run() {
                   TabbedAbout a=new TabbedAbout();
        }Thanks in advance

    I will try your suggestions. But still I don't understand. It was running independently very ok and it was what I wanted. It was built excatly as the example in
    With run and main etc etc. But when I put it in my rest program it started and stack overflow error. Then I tried to change, change, change and got this last form.
    This is what I had before but didn't work with my rest program.
    * TabbedPaneDemo.java is a 1.4 example that requires one additional file:
    *   images/middle.gif.
    import javax.swing.JTabbedPane;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JComponent;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.KeyEvent;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    public class TabbedAbout extends JPanel {
      JLabel label=new JLabel("PRODUCT INFORMATION ");
      JLabel pv=new JLabel("Product version:");
      JLabel pvR=new JLabel("1.0");
      JLabel javav=new JLabel("Java Version:");
      JLabel javavR=new JLabel("1.4.2");
      JLabel sqlv=new JLabel("PostgreSQL Version:");
      JLabel sqlvR=new JLabel("8.1");
      JLabel pt=new JLabel("Programming Team:");
      JLabel onoma1=new JLabel("Gkisis Traianos");
      JLabel onoma2=new JLabel("Zafeiropoulos Ioannis");
      JLabel onoma3=new JLabel("Supervisor Teacher:");
      JLabel onoma3R=new JLabel("Dimosthenis Stamatis");
      JLabel alr=new JLabel("Product developed as dissertation for the ATEI Thessaloniki on autumn 2006.");
      JLabel alr1=new JLabel("All rights reserved");
        public TabbedAbout() {
            //super(new GridLayout(1, 1));
            JTabbedPane tabbedPane = new JTabbedPane();
            ImageIcon icon = createImageIcon("images/folder_sticky.gif");
            JLabel panel1 = new JLabel();
            panel1.setIcon(new ImageIcon("images/TakeANote.jpg"));
            tabbedPane.addTab("About", icon, panel1);
            tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
            JPanel panel2 = new JPanel();
            JFrame frame = new JFrame();
            panel2.setLayout(null);
             label.setBounds(new Rectangle(170, 20, 150, 25));
             pv.setBounds(new Rectangle(90, 40, 175, 45));
             pvR.setBounds(new Rectangle(220, 40, 175, 45));
             javav.setBounds(new Rectangle(90, 60, 175, 45));
             javavR.setBounds(new Rectangle(220, 60, 175, 45));
             sqlv.setBounds(new Rectangle(90, 80, 175, 45));
             sqlvR.setBounds(new Rectangle(220, 80, 175, 45));
             pt.setBounds(new Rectangle(90, 100, 175, 45));
             onoma1.setBounds(new Rectangle(220, 100, 175, 45));
             onoma2.setBounds(new Rectangle(220, 120, 175, 45));
             onoma3.setBounds(new Rectangle(90, 140, 175, 45));
             onoma3R.setBounds(new Rectangle(220, 140, 175, 45));
             alr.setBounds(new Rectangle(30, 170, 500, 45));
             alr1.setBounds(new Rectangle(170, 190, 500, 45));
            panel2.add(label);
            panel2.add(pv);
            panel2.add(pvR);
            panel2.add(javav);
            panel2.add(javavR);
            panel2.add(sqlv);
            panel2.add(sqlvR);
            panel2.add(pt);
            panel2.add(onoma1);
            panel2.add(onoma2);
            panel2.add(onoma3);
            panel2.add(onoma3R);
            panel2.add(alr);
            panel2.add(alr1);
            tabbedPane.addTab("Detail", icon, panel2);
            tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
            tabbedPane.setSize(new Dimension(400, 300));
            //Add the tabbed pane to this panel.
            add(tabbedPane);
            //Uncomment the following line to use scrolling tabs.
            //tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        protected JComponent makeTextPanel(String text) {
            JPanel panel = new JPanel(false);
            JLabel filler = new JLabel(text);
            filler.setHorizontalAlignment(JLabel.CENTER);
            //panel.setLayout(new GridLayout(1, 1));
            panel.add(filler);
            return panel;
        /** Returns an ImageIcon, or null if the path was invalid. */
        protected static ImageIcon createImageIcon(String path) {
            java.net.URL imgURL = TabbedAbout.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("About");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            JComponent newContentPane = new TabbedAbout();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.getContentPane().add(new TabbedAbout(),
                                     BorderLayout.CENTER);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }But independetly was working just fine. Excatly as I wanted
    Message was edited by:
    sickboy

  • Problem with java.lang.OutOfMemoryError

    hi
    i am developping a web application
    i am using jfreechart in my jsf application to generate statistic diagrams
    to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
    my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:
    javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: Java heap space
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
         at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at TimeoutFilter.doFilter(TimeoutFilter.java:64)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(Unknown Source)
         at java.awt.image.Raster.createPackedRaster(Unknown Source)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
         at java.awt.image.BufferedImage.<init>(Unknown Source)
         at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1407)
         at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1389)
         at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:183)
         at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:320)
         at SWIMLogStatistiques.generateChartMethod(SWIMLogStatistiques.java:98)
         at SWIMmoduleStatistiques.generateChartMethod(SWIMmoduleStatistiques.java:39)
         at ListModules.mesServicesAttributs(ListModules.java:199)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
         at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.
    i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?

    riadhhwajdii wrote:
    i am using jfreechart in my jsf application to generate statistic diagrams
    to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
    my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:This bit (slowing down over several cycles of the code)..and this bit:
    after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.(increasing memory simply delays the exception), are usually a pointer that you have a memory leak somewhere.
    i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?Take some heap dumps (especially when the out of memory occurs) and stick them in a memory analyser. Just because the exception is being thrown during saveChartAsPNG() does not mean that's the culprit. All that means is it was the final straw.

  • CFML gateway : java.lang.OutOfMemoryError

    I though that CFML gateways were designed for long running
    tasks, but my tests tends to show the opposite :
    whatever I do, it always crash with a
    java.lang.OutOfMemoryError
    I made a mass emailing gateway, following the CDFJ article (
    june 2005,
    volume 7, issue 6 : the asynchronous CFML gateway)
    that is to say :
    - a classic cfm page that defines the needed struct
    (arguments for the gateway cfc) then a call to the gateway.
    - the gateway cfc is very basic : it makes a query to
    retrieve email adresses from a database then loop over the query
    and for each adress send an email.
    I use cfoutput query + a cfmail for each email because i need
    to make a bit of other things in the loop (every 100 email sent i
    made another "update" query to keep an information of what email
    were sent.
    I have about 150,000 emails to send but plan to send more
    (1,000,000. I'm not a spammer, all adresses are opted-in).
    The first time it crashed around 25,000 emails.
    I tried to maximize the JVM settings (maxperm, maxheap, ...
    to 512MB then 1024MB), it then crashed around 55,000, but whatever
    I do it still crashs before the end of the task. The server is a
    dual xeon 3.0 ghz with 2 GB of RAM and is running Coldfusion 7.0.1
    (updater 2) on windows 2003 std.
    I also replace the cfmal tag by cffile tag (for each adress i
    write then delete a small file, to simulate activity without really
    sending tons of emails
    ... and remove the "every 100 loops update a
    counter" query... it still crashs (but around 360,000 loops).
    Just in case, I tried the cfsetting timeout in the cfc, the
    timeout in the struct passed to the cfc... no effect.
    So I'm a bit confused about the aibility to handle long
    running tasks...
    The exception.log files contains :
    "Error","Thread-13","04/20/06","17:26:58",,"Error invoking
    CFC for gateway emailblaster: null"
    java.lang.OutOfMemoryError
    And here is a part of the cfc code :

    obouillaud wrote:
    > - Why not cleaning the email before it's insertion in
    the database ? I already
    > do it, but I want to be sure to avoid crashing the
    sending process because
    you can't crash the "sending process" w/bad email, it will
    only NOT send those
    emails.
    > someone manualy (bad) changed an adress in the database,
    or everything else
    > that can lead to a bad formated adress...
    you need procedures, etc. to manage that sort of thing. for
    instance, if your db
    has triggers, you can have it verify the email when/if
    somebody messes w/it.
    > - splitting into chunks... what a shame !!! the gateways
    are designed for such
    > tasks, that is to say long running queries. The
    asynchronous process is made to
    > avoid the "blank loading page" of these long tasks. Do
    you mean I need to make
    > a gateway that handle the whole process and that calls
    for example every
    > thousands email another gateway that send the emails ?!?
    probably several way to handle this. here's one:
    one asynch gateway, one CFC, pass in query conditions &
    let it work (do the
    query, send the mail). instead of one monster loop of 500k,
    maybe 10 of 50k
    would work better. it's all the same to the user/main app--it
    hands off the
    processing to the gateway & goes on to do other things.
    you can easily call the
    gateway 10x in the main app, since everything's happening in
    the gateway it's
    very fast as far as the user/main app is concerned.
    i'm not sure what your UPDATE query is actually used for but
    you could easily
    hand-off parsing send logs, etc. to an asynch gateway (could
    even be the same
    one that's running the email, you can specify a different CFC
    to use) to handle
    that. or if you really wanted to get "fancy" have a look at
    sean's concurrency
    app:
    http://cfopen.org/projects/concurrency
    i've combined gateways before. for example, SMS & asynch
    gateways work very well
    together (cf can melt down SMS aggregators fairly easily). so
    having more than 1
    gateway handle a job's not a bad idea.

  • Java.lang.OutOfMemoryError in UCM

    hi all,
    We are getting the following error in Oracle UCM since last night:
    Event generated by user 'weblogic' at host 'CIS'. System code execution error. java.lang.OutOfMemoryError: getNewTla. [ Details ]
    An error has occurred. The stack trace below shows more information.
    !csUserEventMessage,weblogic,CIS!csSystemCodeExecutionError!syJavaExceptionWrapper,java.lang.OutOfMemoryError: getNewTla
    intradoc.common.ServiceException:
    at intradoc.server.ServiceManager.onError(ServiceManager.java:703)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:303)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.OutOfMemoryError: getNewTla
    at java.nio.CharBuffer.wrap(CharBuffer.java:133)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:246)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
    at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
    at java.io.PrintStream.newLine(PrintStream.java:495)
    at java.io.PrintStream.println(PrintStream.java:774)
    at java.lang.Throwable.printStackTrace(Throwable.java:461)
    at java.lang.Throwable.printStackTrace(Throwable.java:451)
    at intradoc.common.DefaultReportDelegator.message(DefaultReportDelegator.java:160)
    at intradoc.common.Report.messageInternal(Report.java:170)
    at intradoc.common.Report.message(Report.java:145)
    at intradoc.common.Report.error(Report.java:397)
    at intradoc.server.ServiceRequestImplementor.logErrorWithHostInfo(ServiceRequestImplementor.java:1850)
    at intradoc.server.Service.logErrorWithHostInfo(Service.java:2151)
    at intradoc.server.Service.logFileRequestError(Service.java:2276)
    at intradoc.server.FileService.logError(FileService.java:1625)
    at intradoc.server.ServiceRequestImplementor.reportError(ServiceRequestImplementor.java:1806)
    at intradoc.server.ServiceRequestImplementor.handleErrorResponse(ServiceRequestImplementor.java:1762)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:816)
    at intradoc.server.Service.doRequest(Service.java:1865)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    ... 4 more
    This is happening too many times. We are able to start the server and it is up for sometime and then it gives the mentioned error. This is urgent. Please help.
    Thanks and Regards,
    Nithya

    Hi ,
    Please find the details below:
    1. What version of UCM server is this issue seen ?
    UCM 11g
    2. What specific action is when the out of memory shows up ? As in is it during checking in , searching etc .
    Portal uses RIDC API to get data files from UCM. So this happens while fetching data files.
    3. What are the Java memory arguments provided to the system or is it running the default settings ?
    The machine we are running Oracle UCM on is 4 GB and it has no other applcation running on it.
    Please find below the memory details provided in the setDomainenv file:
    set XMS_SUN_64BIT=1024
    set XMS_SUN_32BIT=1024
    set XMX_SUN_64BIT=1024
    set XMX_SUN_32BIT=1024
    set XMS_JROCKIT_64BIT=1024
    set XMS_JROCKIT_32BIT=1024
    set XMX_JROCKIT_64BIT=1024
    set XMX_JROCKIT_32BIT=1024
    if "%JAVA_VENDOR%"=="Sun" (
    set WLS_MEM_ARGS_64BIT=-Xms256m -Xmx512m
    set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m
    ) else (
    set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx512m
    set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m
    if "%JAVA_VENDOR%"=="Oracle" (
    set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_JROCKIT_64BIT%m -Xmx%XMX_JROCKIT_64BIT%m
    set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_JROCKIT_32BIT%m -Xmx%XMX_JROCKIT_32BIT%m
    ) else (
    set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_SUN_64BIT%m -Xmx%XMX_SUN_64BIT%m
    set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_SUN_32BIT%m -Xmx%XMX_SUN_32BIT%m
    Please advice.
    Thanks
    Nithya

  • Java.lang.OutOfMemoryError in iGrid

    Hi,
    In XMII 12, i tried to get the customer information from SAP thru BAPI and to show it in iGrid. I am successfully getting information from SAP. But when i tried to show the result in iGrid thru xacute query, in iGrid java console it is showing error as Error: java.lang.OutOfMemoryError. How to solve this?
    Regards,
    Senthil

    Hi
    You can go through this thread:
    Re: ERROR - Problem Reading Data From Server - java.io.EOFException
    Hope this may help you.

  • GetXMLString java.lang.OutOfMemoryError

    Hello,
    I am trying to get data from tables and save this information in XML files. I am using XML SQL utility into a Java program.
    The problem is that I have a big table with a LONG data type and when the program try to get the data it shows an error :
    Exception in thread "main" java.lang.OutOfMemoryError
    I checked if the LONG data was the problem, I put a condition in the SQL instruction. The LONG data is saved in XML file. I think that the problem is the result of my query
    "select * from mytable"
    it is too big
    Somebody knows if I can use a CURSOR or something like that to save ALL the records.
    Any idea.
    Thanks.

    I'd recommend using the XML SQL Utility version 2.1.0 Beta's new support for producing a SAX2 event stream for a query.
    This will let your SAX2 ContentHandler incrementally handle each <ROW> element and it's children without incurring any memory overhead.

  • Java.lang.OutOfMemoryError(Native Method)

    Hello Everybody,
    We hava a java.lang.OutOfMemoryError,the problem weblogic server installed in windows 2003 x64,weblogic version 9.2 MP1,sun jdk 1.5.0_22 32bit,the memory configuration below:
    set MEM_ARGS=-server -Xms1024m -Xmx1024m -verbose:gc -Xloggc:%SERVER_NAME%_GC.log -XX:SurvivorRatio=3 -XX:NewSize=512M -XX:MaxNewSize=512M -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+HeapDumpOnCtrlBreak -XX:+HeapDumpOnOutOfMemoryError
    if "%JAVA_VENDOR%"=="Sun" (
         set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% -XX:MaxPermSize=512m
    The error in log below:
    ####<2013-2-16 上午11时08分15秒 CST> <Error> <Kernel> <CWGK-APP-2> <node2> <[STANDBY] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1360984095564> <BEA-000802> <ExecuteRequest failed
    java.lang.OutOfMemoryError.
    java.lang.OutOfMemoryError
         at java.io.RandomAccessFile.readBytes(Native Method)
         at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
         at weblogic.diagnostics.archive.FileUtils.readFile(FileUtils.java:46)
         at weblogic.diagnostics.archive.filestore.FileIndexMetaInfo.buildIndex(FileIndexMetaInfo.java:403)
         at weblogic.diagnostics.archive.filestore.FileIndexMetaInfo.buildIndex(FileIndexMetaInfo.java:319)
         at weblogic.diagnostics.archive.filestore.FileDataArchive.computeFullIndices(FileDataArchive.java:521)
         at weblogic.diagnostics.archive.filestore.FileDataArchive.computeIndices(FileDataArchive.java:629)
         at weblogic.diagnostics.archive.filestore.FileDataIndexer$IndexCommand.run(FileDataIndexer.java:199)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    >
    How can i solution the problem?
    Please help.

    Need more log information to diagnose it.
    Kinds,
    Gabriel Abelha

  • Weblogic server start error: java.lang.OutOfMemoryError

    Hi:
              when i start weblogic server, i met following error !
              java.lang.OutOfMemoryError
              <<no stack trace available>>
              why?
              thanks!
              starting output as follow :
              C:\bea7\user_projects\zhudomain>startweblogic
              C:\bea7\user_projects\zhudomain>echo off
              CLASSPATH=C:\bea7\jdk131_03\lib\tools.jar;C:\bea7\weblogic700\integration\li
              b\wl
              pi-worklist.jar;C:\bea7\weblogic700\samples\server\eval\pointbase\lib\pbserv
              er42
              ECF172.jar;C:\bea7\weblogic700\server\lib\weblogic_sp.jar;C:\bea7\weblogic70
              0\se
              rver\lib\weblogic.jar;
              PATH=.;C:\bea7\weblogic700\server\bin;C:\bea7\jdk131_03\bin;C:\PROGRA~1\RATI
              ONAL
              \RATION~1\NUTCROOT\bin;C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\bin\x11;C:\PRO
              GRA~
              1\RATIONAL\RATION~1\NUTCROOT\mksnt;c:\Oracle\Ora81\bin;C:\WINNT\system32;C:\
              WINN
              T;C:\WINNT\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\CTEX\MiKTeX\TeXMF\miktex\bi
              n;C:
              \CTEX\MiKTeX\LocalT~1\cct\bin;C:\Program Files\Rational\common;C:\Program
              Files\
              Rational\ClearQuest;C:\Program Files\Rational\Rose\TopLink\;C:\Program
              Files\Rat
              ional\Rational Test;C:\bea7\jdk131_03\bin
              * To start WebLogic Server, use a username and *
              * password assigned to an admin-level user. For *
              * server administration, use the WebLogic Server *
              * console at http://[hostname]:[port]/console *
              C:\bea7\user_projects\zhudomain>"C:\bea7\jdk131_03\bin\java" -hotspot -Xms32
              m -X
              mx200m -Dweblogic.security.SSL.trustedCAKeyStore=C:\bea7\weblogic700\server\
              lib\
              cacerts -Dweblogic.Name=myserver -Dbea.home="C:\bea7" -Dweblogic.management.
              user
              name= -Dweblogic.management.password= -Dweblogic.ProductionModeEnabled= -Dja
              va.s
              ecurity.policy="C:\bea7\weblogic700\server\lib\weblogic.policy"
              weblogic.Server
              <2002-11-13 ÏÂÎç04ʱ21·Ö01Ãë> <Info> <Security> <090065> <Getting boot
              identity
              from user.>
              Enter username to boot WebLogic server:system
              Enter password to boot WebLogic server:
              Starting WebLogic Server...
              <2002-11-13 ÏÂÎç04ʱ21·Ö08Ãë> <Notice> <Management> <140005> <Loading
              configurat
              ion C:\bea7\user_projects\zhudomain\.\config.xml>
              java.lang.OutOfMemoryError
              <<no stack trace available>>
              

    Hi JLK,
    Now as you can see that you are getting "java.lang.OutOfMemoryError: PermGen space" during the activation on an application it means that you are application needs more space in the non-heap part of the JVM which is PermGen to create the Classes, Class Structures, Methods and Reflection Objects of this applications hence you are getting this issue.
    Now how to solve this issue you try the following check list which would help you resolve this issue and overcome same type of issue in future
    1). Make Sure that the PermGen Area is not set to a very less value.
    2). Usually if an Application has Many JSP Pages in that case every JSP will be converted to a *.class file before JSP Request Process. So a large number of JSPs causes generation of a Large number of *.class files all these classes gets loaded in the PermGen area.
    3). While allocating the -XX:MaxPermSize make sure that you follow a rough Formula… which works in most of the Application Servers.
    MaxPermSize = (Xmx/3) —- Very Special Cases (One Third of maximum Heap Size)
    MaxPermSize = (Xmx/4) —- Recommended (One Fourth Of maximum Heap Size
    To get more information on this I would suggest you to have look at the below link which would surely help you in this case
    Topic: OutOfMemory Causes and First Aid Steps?
    http://middlewaremagic.com/weblogic/?p=4464
    Regards,
    Ravish Mody

  • 10.1.3 Apps Server java.lang.OutOfMemoryError: PermGen space

    Hi,
    I am continually getting java.lang.OutOfMemoryError: PermGen space errors when using the application server control. I have two applications deployed which have been running ok (since i bumped up the MaxPermSize in oc4j_opmn.xml)
    I have set the max perm size to 512m should i need to set this higher to get the AS stable?
    The error has happened this time when I selected an application and clicked Redeploy. Because the ASC dies i can't get any useful information on what the server is doing before it memory leaks itself out of existence.
    any help would be appreciated,
    Brenden

    Hi,
    I found this in the manual as a solution for out of memory errors:
    (from the opmn.xml in $ORACLE_HOME/opmn/conf/)
    <ias-component id="OC4J">
      <process-type id="home" module-id="OC4J" status="enabled">
        <module-data>
          <category id="start-parameters">
            <data id="java-options" value="-Xms512m -Xmx512m -Djava.awt.headless=true
              -Dhttp.webdir.enable=false"/>
          </category>
        </module-data>
      </process-type>
    </ias-component>reference:
    http://download-west.oracle.com/docs/cd/B25221_03/web.1013/b14432/diagnosis.htm#sthref509
    shall see if it works......
    Brenden

Maybe you are looking for

  • Tile List Selection indicator

    I have a tile list layout with some thumbnails. When one is selected it gets a default blueish background. Could someone explain how i would go about putting a nice green tick over a thumbnail once its selected?

  • Printing Problems in CS4 with EPSON R1900

    I recent bought a new Epson R1900 and much to my dismay, I can't print from InDesign or Illustrator (haven't yet tried from Photoshop). Basically what happens is that the printer ignores any settings I configure, and prints with the "Default" setting

  • TS4006 how to cancel a remote wipe request

    How can I cancel my request to remote wipe my ipad2? I found it and do not want it erased.

  • I'm getting an error code -69 message

    My iTunes library will not save and I get the error code -69 message pop up. This has started happening since the latest iTunes update was installed.

  • How to extract month from given date in bpel??

    Hi friends hi need some information  regarding dates in BPEL.. Here in these I taking date as input which type is also date type.Then required output is month in number format.. Here I  used Assign activity and in assign activity,I took month-from-da