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

Similar Messages

  • Big ANE causes java.lang.OutOfMemoryError when packaging Air application

    Hi,
    I'm working on an Air mobile game that uses ANE on iOS and Android. I'm in the process of creating a new ANE and face a problem on the Android side.
    My ANE requires an external framework (Burstly, http://burstly.com). If I just link the Android project to Burstly's .jar file, I get errors in "adb logcat", like:
    I/dalvikvm(16074): Could not find method com.burstly.lib.BurstlySdk.init, referenced from method com.freshplanet.burstly.functions.InitBurstlyFunction.call
    In order to include Burstly's files in my own .jar, I unzip Burstly's .jar file and repackage them with my compiled code in a unique .jar (following advice on http://stackoverflow.com/questions/7732742/air-3-native-extensions-for-android-can-i-how-t o-include-3rd-party-libraries).
    Problem: Burstly's SDK includes thousands of files. It doesn't create any trouble when packaging the ANE, but when I try to package the Air application, I get the following error:
    dx tool failed:
    UNEXPECTED TOP-LEVEL ERROR:
    java.lang.OutOfMemoryError: Java heap space
              at com.android.dx.util.IntList.<init>(IntList.java:87)
              at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:174)
              at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
              at com.android.dx.ssa.back.IdenticalBlockCombiner.process(IdenticalBlockCombiner.java:74)
              at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:132)
              at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:76)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:103)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74)
              at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:269)
              at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
              at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
              at com.android.dx.command.dexer.Main.processClass(Main.java:299)
              at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
              at com.android.dx.command.dexer.Main.access$100(Main.java:56)
              at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
              at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
              at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
              at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
              at com.android.dx.command.dexer.Main.processOne(Main.java:247)
              at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
              at com.android.dx.command.dexer.Main.run(Main.java:139)
              at com.android.dx.command.dexer.Main.main(Main.java:120)
              at com.android.dx.command.Main.main(Main.java:89)
    I read that the solution to eliminate this error is to give Java the parameters "-Xms...M -Xmx...M", with "..." being a high-enough number. Note that I'm working on a machine with 8GB of RAM. I tried to package the app in command line to be able to pass these parameters:
    /usr/bin/java -Xms512M -Xmx4096M -jar "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/adt.jar" -package -target apk -storetype pkcs12 -keystore [...].p12 Main.apk Main-app.xml Main.swf -extdir "/Users/alex/Documents/Adobe Flash Builder 4.6/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/front-end-mobile/com.ado be.flexide.multiplatform.ios.platform"
    But when I run a "ps -ef | grep java", I can see that adt runs another Java program (dx) without transmitting my -Xms -Xmx parameters:
    /usr/bin/java -jar /Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/android/bin/dx.jar --dex --output=/private/var/folders/t9/3kw74cx14nv2xg9tgmx9m1jc0000gp/T/b5757d93-1e93-439c-8f6d -c93e4933f6f1/outputDEX.dex [... bunch of jars]
    Any idea to solve this issue?
    Thanks
    Alex

    I solved my issue by setting the _JAVA_OPTIONS environment variable. (Note: there are two underscores)
    I added the following line to my .bash_profile:
    export _JAVA_OPTIONS="-Xms1024m -Xmx4096m -XX:MaxPermSize=512m"
    Now everytime a Java program is launched from the command line, I see the following message:
    Picked up _JAVA_OPTIONS: -Xms1024m -Xmx4096m -XX:MaxPermSize=512m
    And my application packaging runs just fine now.
    I still have an issue though: this trick solved the problem for packaging the app from the command line, but the _JAVA_OPTIONS are not picked up when packaging from Flash Builder, so it still crashes there.
    Note that my Adobe Flash Builder 4.6.ini contains the following options:
    -Xms512m
    -Xmx1676m
    -XX:MaxPermSize=512m
    -XX:PermSize=64m
    1676m is the highest number I can put before Flash Builder refuses to launch. I'm not sure if these parameters are actually passed to the VM that runs de dx.jar program, or if it's just for the ActionScript compiler. But anyway my app packaging still crashes in Flash Builder.
    If someone knows a way to force Flash Builder to pickup the _JAVA_OPTIONS set in the command line, let me know :-)
    Thanks
    Alex

  • Getting java.lang.OutOfMemoryError when deploying

    Hi,
    I have an ear-file which is not very big, 12Mb, but when I run deploy from Enterprise Manager I get the following error:
    [2007-maj-09 10:09:50] Binding XXPA_PA140 web-module for application XXPA_PA140 to site default-web-site under context root XXPA_PA140
    [2007-maj-09 10:10:14] Operation failed with error: Error compiling :/u01/oracle/midweb/j2ee/OC4J_WS1/applications/XXPA_PA140/XXPA_PA140: Error instantiating compiler: Web service artifact generation failed:java.lang.OutOfMemoryError: Java heap space
    The heap space is set to: -ms512M -mx1024M.
    I have tried to deploy trough JDeveloper as well but with the same result. I would be very grateful if someone could point me in some direction. Doeas anyone know what causes this? What acctually happens during deployment, what files are read?
    Thank you!

    Hello,
    Could you give more information about the application?
    Which version of OC4J are you using?
    Which JDK and OS?
    From what I see this is the WS generation that fails could you describe the style of WS you have developped? (EJB, POJO?, ..)
    Can you run the code form JDeveloper (not deploy run the application)
    Regards
    Tugdual Grall

  • Constantly getting java.lang.OutOfMemoryError when submitting the form.

    Hello,
    I know this doesn't exactly pertain to Form Server, but maybe someone has some insight.
    I set up JBoss 3.2.5 with Java 1.4.2.11 on a seperate machine to do a remote connection to my LiveCycle environment.
    I am using the SOAPClient sample from the developer guide to save my form. I am able to save the submitted form for just fine, but I can only do so once and the second time I always get am error: "javax.servlet.ServletException: Servlet execution threw an exception" root cause: "java.lang.OutOfMemoryError"
    Even with just the code from the guide, I get this error. Does anyone have any insight into fixing this? I really don't know what to fix in the code since I used the sample from the guide and they close the objects if that was an issue. If it matters, the pdf file I am submitting to be saved is about 800KB and then the saved file size is about 1400KB
    I already tried setting within the run.conf file the following: JAVA_OPTS="-server -Xms1028m -Xmx1028m" but I still get the same out of Memory error. The only error within the server.log file is the following:
    2007-01-10 15:46:19,125 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[SubmitPart1]: Servlet.service() for servlet SubmitPart1 threw exception
    java.lang.OutOfMemoryError
    Thanks,
    Jennifer

    Hi Jennifer,
    If the problem is not yet resolved here is my suggestion.
    With my interaction with Adobe I came to know that SOAP has a limitation of handling a max of 10 MB and in real-time you may stitch the forms more than 10MB.
    Use the EJBClient instead of SOAPClient.
    You may set this is in FormServerDefinition class.
    Thanks,
    Vijay

  • Java.lang.OutOfMemoryError when calling invokeMethod from CO

    Hi All,
    We are developing some custom pages using OA. All the pages were working properly utill yestarday and all of of a sudden I started getting java.lang.OutOfMemoryError error in my local Jdeveloper.I have not installed any new software or any upgrade between now and then, and there has been no changes to my application either. I even tried running this page standalone. I uninstalled Jdeveloper and reinstalled it again still the same. When I copy the code from AM into my CO it works fine. What could be causing the issue ?
    java.lang.OutOfMemoryError, msg=null
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:864)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at fpi.oracle.apps.xbol.gwo.webui.GWOOrderHeaderCO.processRequest(GWOOrderHeaderCO.java:126)

    Thanks for taking my query.
    Here is the code from fpi.oracle.apps.xbol.gwo.webui.GWOOrderHeaderCO where the exception originated.. this is not just with this CO but in all the CO. This code is exactly the same as in the PO Tutorial. Also I could not locate the option to set the JVM memory parameter in Project setting. I have set the Java heap size -mx512m which I believe is what you wanted me to do.
         OAApplicationModule am = pageContext.getApplicationModule(webBean);
         Serializable[] parameters = { pageContext.getParameter("headerId") };
         boolean rowFound = ((Boolean)am.invokeMethod("init", parameters)).booleanValue();
    Here is the complete stack..
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.OutOfMemoryError, msg=null
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:864)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at fpi.oracle.apps.xbol.gwo.webui.GWOOrderHeaderCO.processRequest(GWOOrderHeaderCO.java:126)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.OutOfMemoryError
    Here is the code from fpi.oracle.apps.xbol.gwo.webui.GWOOrderHeaderCO where the exception originated.. this is not just with this CO but in all the CO. This code is exactly the same as in the PO Tutorial.
         OAApplicationModule am = pageContext.getApplicationModule(webBean);
         Serializable[] parameters = { pageContext.getParameter("headerId") };
         boolean rowFound = ((Boolean)am.invokeMethod("init", parameters)).booleanValue();
    Message was edited by:
    Bismi

  • Getting 'java.lang.OutOfMemoryError' while importing process flows.

    Hello,
    We are getting 'java.lang.OutOfMemoryError' error while importing process flows in our QA environment. This environment is not new. The same process flows were working perfectly fine till last week.
    This week we had to delete the project in QA and reimport all the objects. Import went fine for all, except process flows. We could deploy all other objects as well.
    We have tried increasing JVM in run_service.sh and owbclient.sh files by increasing -Xmx, -Xmx and Dlimit. We increased as far as 2048M ( This is the max memory available on our server)
    We are using OWB version 10.2.0.2 and Oracle 10G over Linux. Did anyone of you face the same issue ? Please le us know the solution.
    Thanks
    Madhavi

    Hi Madhavi,
    Which locale language is shown in your OWB client configuration? We had this issue in previous versions (I haven't found it in this version, but I'm used to work with English since these previous versions) So we always adjust Preferences (Tools -> Preferences...) to see Appearance -> Locale -> English.
    Try to change the locale language if it's your case.
    Regards
    ANA GH

  • How to solve 'java/lang/OutOfMemoryError' when apply weblogic patch 10.3.6.0.10?

    Hi All:  Our platform is IBM AIX power system 64 bit, os level 6.  Oracle Fusion Middleware version is 10.3.6.0.8.  We tried to patch 10.3.6.0.10 on it, but encounter ‘out of memory error’ when  applied WebLogic patch 10.3.6.0.10 on UAT report server.  Currently UAT has 3GB memory (currently is 3G) .
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utilhd' in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152727.6422620.0001.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc'
    in response to an event
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError" - please wait.
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd'
    in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc'
    in response to an event
    Exception in thread "main"
    java.lang.OutOfMemoryError at
    java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:335)
    at
    java.lang.StringBuffer.append(StringBuffer.java:201)
    at
    java.lang.Class.throwNoSuchMethodException(Class.java:278)
    at
    java.lang.Class.getMethod(Class.java:845)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.isValueSet(XBeanDataHandler.java:958)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getValueFromObject(XBeanDataHandler.java:589)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getSimpleValue(XBeanDataHandler.java:431)
    at
    com.bea.plateng.patch.dao.cat.PatchDependency.getRule(PatchDependency.java:48)
    at
    com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1625)
    at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
    at
    com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
    at
    com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
    at
    com.bea.plateng.patch.Patch.main(Patch.java:281)
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    Exception in thread "Attach API wait loop"
    java.lang.OutOfMemoryError
       at
    com.ibm.tools.attach.javaSE.CommonDirectory.waitSemaphore(CommonDirectory.java:222)
    at
    com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.waitForNotification(AttachHandler.java:329)
    at com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.run(AttachHandler.java:396)
    bsu.sh -install -patch_download_dir=/ora_bin01/u01/oracle/Middleware/utils/bsu/cache_dir -patchlist=12UV -prod_dir=/ora_bin01/u01/oracle/Middleware/wlserver_10.3
    we followed the README.txt instructions, and stop/start weblogic service before/after apply patch. Can anyone suggest a solution or Doc ID for helping us?
    thank you very much!

    Solutions: Bounce the applications and check the arguments if you can increase it.  It is due to memory issue
    You can set these values in CommEnv.sh (.cmd for windows) file located in the weblogic_home/common/bin directory.
    This gets applied to all the domains under that wls home.
    If you want to make the changes to specific domain then edit the SetDomainEnv.sh file located under the domain/bin directory.
    How to solve java.lang.OutOfMemoryError: Java heap space
    solutions:  export JVM_ARGS="-Xms1024m -Xmx1024m"
    How to solve java.lang.OutOfMemoryError: PermGen space
    solution : export JVM_ARGS="-XX:PermSize=64M -XX:MaxPermSize=256m"

  • Error "java.lang.OutOfMemoryError" When Returning Large Number of Docs

    In our SES implementation, we have a custom search interface that allows users to search for documents and then add them to a "shopping cart". Users add then to their shopping cart from search results, by adding docs one-by-one or an Add All option. Once they are done "shopping" they create a report.
    Here is the scenario...
    Users are saerching for documents and seeing that on page 1, there is 1 - 10 of about 300 results. They clicked Add All and want all 300 docs added to their cart.
    What we do under the covers is we execute another search and set the docs requested to 200. We get the array of docs, iterate over them and add the keys to a list. We found 200 docs at a time to be a safe number. However, there are still 100 docs that were not added to their cart and users want all 300 added. In other words, when they click Add All, they want to add all docs, 300, 500, 5000, etc.
    I set the "Maximum Number of Results" to 500 and found that I can safely add up to ~ 350 docs at one time. However, going past this point throws the following error:
    [SOAPException: faultCode=SOAP-ENV:Server; msg= [java.lang.OutOfMemoryError]]
         at oracle.search.query.webservice.client.OracleSearchService.makeSOAPCallRPC(OracleSearchService.java:941)
         at oracle.search.query.webservice.client.OracleSearchService.doOracleSearch(OracleSearchService.java:469)
    After this error is thrown, SES was unable to recover and searching would not work anymore, even return 10 docs at a time. We had to restart SES to resolve the issue.
    1. What is throwing this error? Is it the amount of XML being returned?
    2. What is the maximum number of results we can get back at any one time? Is it based on the amount of data being returned or the number of attributes?
    We are running 10.1.8 with plans to upgrade soon.
    Thanks in advance.

    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

  • Java.lang.OutOfMemoryError when viewing JSP with records from Oracle DB

    Hi,
    I did an import of data from my damp file.I have exported the file from my other Oracle10g database I have the following error after I try to access data from my table I populated with import:
    javax.servlet.ServletException: Servlet execution threw an exception
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    java.lang.OutOfMemoryError: Java heap space
         oracle.jdbc.driver.DateTimeCommonAccessor.getDate(DateTimeCommonAccessor.java:105)
         oracle.jdbc.driver.OracleResultSetImpl.getDate(OracleResultSetImpl.java:737)
         oracle.jdbc.driver.OracleResultSet.getDate(OracleResultSet.java:1637)
         org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getDate(DelegatingResultSet.java:255)
         com.myapp.app.OrderHelper.getAllOrders(OrderHelper.java:4137)
         com.myapp.app.GetOrderDO.execute(GetOrderDO.java:172)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    a fragment of my OrderHelper with line where error occurs (line 4137):
    public class Orders {
    public List getAllOrders(){
    List lineOrders = new ArrayList();
    Connection conn = null;
    Statement stat = null;
    ResultSet rst = null;
    OrdersDTO order = null;
    String select = "SELECT * FROM TBL_ORDERS";
    DbConnection dbConn = new DbConnection();
    try {
    conn = dbConn.getDbConnection(Constants.MY_JNDI);
    stat = conn.createStatement();
    rst = stat.executeQuery(select);
    while(rst.next()){
    order = new OrdersDTO();
    order.setOrderAsmtDate(rst.getDate("order_asmt_date"));////line: 4137
    lineOrders.add(order);
    }catch (SQLException ex) {
    ex.printStackTrace();
    } finally{
    SQLHelper.cleanUp(rst, stat, conn);
    return lineOrders;
    GetOrderDO.java is just my action class which calls the getAllOrders method for my JSP to list orders. Am using Apache Tomcat/5.5.17 and struts 1.2.9 and Orcale10g.
    thnx,
    xsiyez

    thank you Avi and Bipin for the responce. I have installed Oracle on my RedHat Enterprise Linux 4 box and did an export of the TBL_ORDERS table from my database on Windows Vista . Am not getting this error when running my application on this machine. I get the error on when I run it on windows vista where I have also installed Oracle 10g and running tomcat.
    Yes Avi the ArrayList object is actually getting to big. Its returning more than 100 000 rows. I am using displaytag to do pegination. Any guidelines on how I can increase jvm heap memory on of tomcat?
    Thanx.

  • Java.lang.OutOfMemoryError when running java concurrent program

    Hi,
    i had written a java concurrent program to create the content items into Oracle Content Manager (OCM). Process the records from interface table and create the content items into OCM by calling the API IBC_CITEM_ADMIN_GRP.upsert_item().
    I run the concurrent program with 2000 records in interface table, it's an one to one process, 563 records are processed and 563 content items are created successfully in OCM. After 563 records continuously throws the Exception
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EX - bundle validation others--');
    x_return_status := FND_API.G_RET_STS_ERROR;
    FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_ERROR');
    FND_MESSAGE.set_token('SITUATION', 'VALIDATION');
    FND_MSG_PUB.ADD;
    IF IBC_DEBUG_PVT.debug_enabled THEN
    IBC_DEBUG_PVT.end_process(
    IBC_DEBUG_PVT.make_parameter_list(
    p_tag => 'OUTPUT',
    p_parms => JTF_VARCHAR2_TABLE_4000(
    'x_return_status', '*** EXCEPTION *** [' || SQLERRM || ']'
    END IF;
    in IBC_CITEM_ADMIN_GRP.validate_attribute_bundle() API.
    Again running the concurrent program it process another 563 records. Can any one help me to fix this issue?
    i figured out the exception. When debug the error, i got the actual error message like this
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ArrayIndexOutOfBoundsException: -2048 < 0
    for this issue i increased the heap memory size up to 1024MB. Still i have the same issue. Can any one help to fix the issue?

    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.ArrayIndexOutOfBoundsException:
    -2048 < 0Aren't the null pointer and arrayindexoutofbounds, the ones which you get when you are trying to read beyond your array? (example: when your loop tries to access the 563rd element in your array, since your array index starts from 0)?
    May be if you can try to write out your elements in the array, you might see what it is croaking about.
    Thanks,
    Chiru

  • 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

  • Java.lang.NullPointerException when running JHeadstart Application Generato

    When I run the Generator I get
    java.lang.NullPointerException
    In my console I get (after many DRAG OVER/DRAG EXIT messages):
    (xml.XmlBeanDefinitionReader 150 ) Loading XML bean definitions from file [D:\work\Meld\ViewController\templates\config\jag-config.xml]
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'pgItemModelHelper'
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'velocityInitializer'
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'formGroupLayoutFactory'
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'formPageNameFormat'
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'tableGroupLayoutFactory'
    (xml.XmlBeanFactory 222 ) Creating shared instance of singleton bean 'tablePageNameFormat'
    java.lang.NullPointerException
    at oracle.jheadstart.dt.jag.bindinggenerator.PageUIModelGenerator.generateGroupBindings(PageUIModelGenerator.java:743)
    at oracle.jheadstart.dt.jag.bindinggenerator.PageUIModelGenerator.generateInternal(PageUIModelGenerator.java:390)
    at oracle.jheadstart.dt.jag.bindinggenerator.PageUIModelGenerator.generate(PageUIModelGenerator.java:249)
    at oracle.jheadstart.dt.jag.JhsApplicationGenerator.generate(JhsApplicationGenerator.java:332)
    at oracle.jheadstart.dt.jag.JhsApplicationGenerator.generate(JhsApplicationGenerator.java:361)
    at oracle.jheadstart.dt.jag.jdev.JagRunner$1.run(JagRunner.java:80)
    at java.lang.Thread.run(Thread.java:595)
    JagRunner$1[103]: Invoking garbage collector
    I am using JDeveloper 10.1.3.3.0.4157
    and JHS 10.1.3.0.97
    What could be the problem?
    Thanks in advance,
    Lebbol

    Ok, I don't understand much from your stack dump there, but the ONLY time I've ever got a NullPointerException with the JAG is when I've deleted my bc4j.xcfg files from my ADF BC project in my application. I've fixed this by regenerating these files; which seems to occur when I open up my Application Module and then close it.
    It's worth a shot I guess.

  • 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 when starting Weblogic

    Hello,
    I am getting the following out of meemory when starting my local weblogic server using Ant. Any idea's on why this is happening and how I can correct it?
    Thanks, Brian
    [java] java version "1.4.0_02"
    [java] Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
    [java] Buildfile: C:\expenselink\bin\build.xml
    [java] Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
    [java]
    [java] wlrun.private_development:
    [java] [wls] java version "1.4.0_02"
    [java] [wls] Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
    [java] [wls] Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
    [java] [wls] [GC 8127K->1122K(130112K), 0.0152757 secs]
    [java] [wls] Starting WebLogic Server...
    [java] [wls] <Oct 18, 2002 2:24:40 PM CDT> <Info> <Management> <141089> <Bootstrapping Server based on WebLog
    ic Server 6.X configuration directory structure.>
    [java] [wls] [GC 9250K->1834K(130112K), 0.0201794 secs]
    [java] [wls] [Full GC 2037K->1817K(130112K), 0.0639551 secs]
    [java] [wls] [GC 10360K->3046K(130176K), 0.0128921 secs]
    [java] [wls] [GC 11238K->3947K(130176K), 0.0238743 secs]
    [java] [wls] <Oct 18, 2002 2:24:43 PM CDT> <Notice> <Management> <140005> <Loading configuration C:\expenseli
    nk\weblogic\.\config\mydomain\config.xml>
    [java] [wls] [GC 12137K->4563K(130176K), 0.0201763 secs]
    [java] [wls] [GC 12755K->4900K(130176K), 0.0123613 secs]
    [java] [wls] [GC 13091K->5156K(130176K), 0.0069405 secs]
    [java] [wls] [GC 13348K->5525K(130176K), 0.0112204 secs]
    [java] [wls] [GC 13717K->5762K(130176K), 0.0100256 secs]
    [java] [wls] [GC 13948K->5754K(130176K), 0.0060745 secs]
    [java] [wls] [GC 13946K->5804K(130176K), 0.0042282 secs]
    [java] [wls] <Oct 18, 2002 2:24:46 PM CDT> <Warning> <Management> <141087> <Unrecognized property: system.hom
    e>
    [java] [wls] [GC 13996K->5980K(130176K), 0.0054809 secs]
    [java] [wls] [GC 14172K->6173K(130176K), 0.0065056 secs]
    [java] [wls] [Full GC 13232K->6252K(130176K), 0.1378751 secs]
    [java] [wls] <Oct 18, 2002 2:24:47 PM CDT> <Info> <Logging> <000000> <FileLogger Opened at C:\expenselink\web
    logic\config\mydomain\logs\weblogic.log>
    [java] [wls] [GC 14444K->8509K(130176K), 0.0144854 secs]
    [java] [wls] [GC 11767K->8678K(130176K), 0.0058049 secs]
    [java] [wls] [Full GC 8678K->8678K(130176K), 0.1476959 secs]
    [java] [wls] [Full GC[Unloading class sun.reflect.GeneratedMethodAccessor7]
    [java] [wls] [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor31]
    [java] [wls] [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor37]
    [java] [wls] [Unloading class sun.reflect.GeneratedMethodAccessor14]
    [java] [wls] [Unloading class sun.reflect.GeneratedConstructorAccessor24]
    [java] [wls] [Unloading class sun.reflect.GeneratedConstructorAccessor12]
    [java] [wls] [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor18]
    [java] [wls] [Unloading class sun.reflect.GeneratedConstructorAccessor20]
    [java] [wls] [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor55]
    [java] [wls] [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor50]
    [java] [wls] 8678K->7500K(251136K), 0.8280038 secs]
    [java] [wls] java.lang.OutOfMemoryError

    As things would turn out added memory just caused it to fill up more memory. The problem was with accessing a file. Once I deleted to mydomain tree I was able to start the webserver again. Thanks for your help.

  • Getting java.lang.OutOfMemoryError: PermGen space

    Hi,
    In JCAPS5.1.1 after deploying my project, i am getting following error.
    #|2007-02-20T16:38:48.319+0530|SEVERE|IS5.1.1|STC.eWay.batch.com.stc.connector.batchadapter.system.BatchInboundWork|_ThreadID=50; ThreadName=Worker: 140;stacktrace-id=13;|Exception in BatchInboundWork, BatchInboundWork terminated, e=java.lang.OutOfMemoryError: PermGen space
    java.lang.OutOfMemoryError: PermGen space
    |#]
    Earlier also i have deployed projects but never
    faced this type of error.
    Please let me know Is there any work around to
    rectify this kind of OutOf memory error.
    Thanks
    Venkatesh.S
    Message was edited by:
    VenkateshSampoornam

    Hi moonsit !
    Yes, currently our PermSize is set to 384mb (-XX:MaxPermSize=384m).
    Hi Alan !
    Yes, we get the same conclusion, after deploy or redeploy projects we get the OOME, but I was expecting that SUN support resolve this issue and not use the stop/start as a way to fix that, since sometimes it will impact our production environment.
    I searched over internet and discover that some thirdpart libraries version has memory leaks. It's the case of apache commons-logging 1.0.6 and apache commons-beanutils 1.6. I found them in the lib directory of Integration Server in JCAPS 5.1.3 and may be there is more thinks like that. Both libraries has newer version with this issue fixed. Maybe SUN need to be adviced about that.
    Does anyone else found a way to fix that ? Or a workaround that we can do to avoid the restart of LH ?
    Thanks !
    Thiago

Maybe you are looking for

  • How to dynamically update the Table?

    Hi All, Hope somebody will help me out ot resolve my issue. In my application, about 10 analog channels data coming in. Out of which two parameter needs to get updated dynamically on the table. (For each Rpm between 500-1000, in steps of 50, have to

  • Fifth Generation Airpot Extreme MD031LL/A can't connect more than one device

    I just came back from the Apple Store @ Cambridge, MA where I got a second fifth generation Airport Extreme Base Station (MD031LL/A) which is recognized by all the devices I have (Mac Pro, 2 iPhones and 1 Power Book) but I can only connect to the Int

  • Rescuing my home folder by creating a new name

    Please, I need help. For the longest time my home folder was called, "Pappa Moosie".  That's right: two caps and a space. Everything worked fine, but within the last few months my browsers got wonky, and things started crashing. I tried a backup and

  • Customise button wording for 'NEXT' that appears with Photo Gallery Thumbnails

    Is it possible to customise the wording of the 'NEXT' button that appears with the photo gallery thumbnails? ie, if you only have 5 thumbnails on page, but the gallery has more pics, a NEXT button is generated, but we'd like it to say MORE IMAGES ins

  • Anyone use this FM  BAPI_SLSTRANSACT_CHANGEMULTI ????

    hello everyone, I hav a problem that I want to update a status field in service order in SAP CRM. and  I am using this BAPI (BAPI_SLSTRANSACT_CHANGEMULTI). but this is not updating the status of service order.Anyone knows the procedure for that.Plz h