2 Replies Latest reply on Dec 4, 2007 5:15 AM by avonwyss

    java.lang.OutOfMemoryError Java heap space in /clearspace/doc-create.jspa

      I received the following error "java.lang.OutOfMemoryError Java heap space in /clearspace/doc-create.jspa" (see attached) when trying to attach a 14mb file to a document. This has not occurred with this file before, it is a test pdf that I have used several other times. I noticed that clearspace-service.exe was using about 180mb of mem and after a quick search of the forums and google with no ideas I shutdown and restarted the service.

       

      After the restart I can now upload files and it works, however if we are going to use this in production I need to know whats wrong. Is it my os? Settings? Attached is the error and my system specs. Thanks in advance for any help you can give.

       

      Sincerely,

       

      Carlan Wray

       

       


      Pentium D 3.2Ghz

      2GB of RAM

      XP PRO

       

      System Error

       

      We're sorry but a serious error has occurred in the system. If you are a system administrator please click "more details" below for more information about this error.

      More Details

       

           

      • Status Code: 500

           

      • Exception Type: class java.lang.OutOfMemoryError

           

      • Error Message: Java heap space

           

      • Request URI: /clearspace/doc-create.jspa

           

      • Stack Trace:

                o com.mysql.jdbc.Buffer.ensureCapacity(Buffer.java:157)

                o com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1731)

                o com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1685)

                o com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:806)

                o com.jivesoftware.community.impl.dao.DbAttachmentDAO.saveAttachmentData(DbAttachmentDAO.java:278)

                o com.jivesoftware.community.impl.DbAttachment.insert(DbAttachment.java:429)

                o com.jivesoftware.community.impl.DbAttachment.<init>(DbAttachment.java:85)

                o com.jivesoftware.community.impl.DbDocument.createAttachment(DbDocument.java:1349)

                o com.jivesoftware.community.proxy.DocumentProxy.createAttachment(DocumentProxy.java:346)

                o com.jivesoftware.community.action.DocCreateAction.addAttachments(DocCreateAction.java:1065)

                o com.jivesoftware.community.action.DocCreateAction.validate(DocCreateAction.java:345)

                o com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:154)

                o com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

                o com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.jivesoftware.community.web.webwork.JiveObjectLoaderInterceptor.intercept(JiveObjectLoaderInterceptor.java:55)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:233)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

                o com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)

                o com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)

           

      • java.lang.OutOfMemoryError: Java heap space

       

      Jive Home:         C:\Documents and Settings\LocalService\Local Settings\Application Data\Jive Software\Clearspace\jiveHome

      Uptime:      9 minutes 13 seconds

      Clearspace Version:      1.8.0

      JVM Version and Vendor:      1.6.0 Sun Microsystems Inc.

      Application server:      jetty-6.1.0

      Operating System:      Windows XP

      Hardware:      x86

      Country database version:      GeoIP Country Edition 07/2007    (Update Country Database)

      User Manager:      com.jivesoftware.base.profile.UserManagerImpl

      Group Manager:      com.jivesoftware.base.database.DbGroupManager

      Auth Manager:      com.jivesoftware.base.profile.BasicAuthFactory

       

      Datasource Info

      Database Name and Version:      MySQL 5.0.45-community-nt

      JDBC Driver and Version:      MySQL-AB JDBC Driver mysql-connector-java-5.0.8 ( Revision: ${svn.Revision} )

      Subqueries supported:      Yes

      Transactions supported:      No

      Connection Pool:      Default Clearspace Connection Pool

      Min DB Connections:      5      

      Max DB Connections:      25

      DB Connections Open:      5

      Active DB Connections:      1

      DB User:      clearspace

      DB Password      Hidden

      Connection URL:      jdbc:mysql://localhost:3306/clearspace

      Connection Timeout (days):      1.0

       

      Java System Properties - hidden by default, click to show

      app.name      Clearspace

      appdir      C:\Program Files\Clearspace\bin\

      awt.toolkit      sun.awt.windows.WToolkit

      clearspace.admin.location      clearspace/admin/main.jsp

      clearspace.jiveHome      C:\Documents and Settings\LocalService\Local Settings\Application Data\Jive Software\Clearspace\jiveHome

      clearspace.logViewer.location      clearspace/admin/system-logviewer.jsp

      clearspace.server.context      /clearspace

      clearspace.server.domain      winet1

      clearspace.server.port      8080

      clearspace.server.webapp      C:\Program Files\Clearspace\server\webapps\ROOT\clearspace

      exe4j.consoleCodepage      cp0

      exe4j.isInstall4j      true

      exe4j.isService      true

      exe4j.launchName      C:\Program Files\Clearspace\bin\clearspace-service.exe

      exe4j.moduleName      C:\Program Files\Clearspace\bin\clearspace-service.exe

      exe4j.processCommFile      C:\WINDOWS\TEMP\e4j_p1652.tmp

      exe4j.tempDir      

      exe4j.unextractedPosition      0

      file.encoding      Cp1252

      file.encoding.pkg      sun.io

      file.separator      \

      install4j.appDir      C:\Program Files\Clearspace\

      install4j.exeDir      C:\Program Files\Clearspace\bin\

      java.awt.graphicsenv      sun.awt.Win32GraphicsEnvironment

      java.awt.printerjob      sun.awt.windows.WPrinterJob

      java.class.path      C:\Program Files\Clearspace\.install4j\i4jruntime.jar; C:\Program Files\Clearspace\bin\..\server\lib\bouncycastle.jar; C:\Program Files\Clearspace\bin\..\server\lib\commons-el.jar; C:\Program Files\Clearspace\bin\..\server\lib\commons-logging.jar; C:\Program Files\Clearspace\bin\..\server\lib\jasper-compiler-jdt.jar; C:\Program Files\Clearspace\bin\..\server\lib\jasper-compiler.jar; C:\Program Files\Clearspace\bin\..\server\lib\jasper-runtime.jar; C:\Program Files\Clearspace\bin\..\server\lib\jdic.jar; C:\Program Files\Clearspace\bin\..\server\lib\jetty-util.jar; C:\Program Files\Clearspace\bin\..\server\lib\jetty.jar; C:\Program Files\Clearspace\bin\..\server\lib\jsp-api.jar; C:\Program Files\Clearspace\bin\..\server\lib\mysql-connector-java-5.0.8-bin.jar; C:\Program Files\Clearspace\bin\..\server\lib\servletapi.jar; C:\Program Files\Clearspace\bin\..\server\lib\startup.jar;

      java.class.version      50.0

      java.endorsed.dirs      c:\program files\clearspace\jre\lib\endorsed

      java.ext.dirs      c:\program files\clearspace\jre\lib\ext; C:\WINDOWS\Sun\Java\lib\ext

      java.home      c:\program files\clearspace\jre

      java.io.tmpdir      C:\WINDOWS\TEMP\

      java.library.path      C:\Program Files\Clearspace\bin; .; C:\WINDOWS\Sun\Java\bin; C:\WINDOWS\system32; C:\WINDOWS; C:\Program Files\Windows Resource Kits\Tools\; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\Program Files\Intel\DMIX; C:\Program Files\QuickTime\QTSystem\; c:\program files\clearspace\jre\bin

      java.runtime.name      Java(TM) SE Runtime Environment

      java.runtime.version      1.6.0-b105

      java.specification.name      Java Platform API Specification

      java.specification.vendor      Sun Microsystems Inc.

      java.specification.version      1.6

      java.vendor      Sun Microsystems Inc.

      java.vendor.url      http://java.sun.com/

      java.vendor.url.bug      http://java.sun.com/cgi-bin/bugreport.cgi

      java.version      1.6.0

      java.vm.info      mixed mode, sharing

      java.vm.name      Java HotSpot(TM) Client VM

      java.vm.specification.name      Java Virtual Machine Specification

      java.vm.specification.vendor      Sun Microsystems Inc.

      java.vm.specification.version      1.0

      java.vm.vendor      Sun Microsystems Inc.

      java.vm.version      1.6.0-b105

      jiveHome      C:\Documents and Settings\LocalService\Local Settings\Application Data\Jive Software\Clearspace\jiveHome

      line.separator      \r\n

      org.apache.commons.logging.LogFactory      com.jivesoftware.base.log.util.CommonsLogFactory

      org.mortbay.log.class      org.jivesoftware.util.log.util.JettyLog

      os.arch      x86

      os.name      Windows XP

      os.version      5.1

      path.separator      ;

      sun.arch.data.model      32

      sun.boot.class.path      c:\program files\clearspace\jre\lib\resources.jar; c:\program files\clearspace\jre\lib\rt.jar; c:\program files\clearspace\jre\lib\sunrsasign.jar; c:\program files\clearspace\jre\lib\jsse.jar; c:\program files\clearspace\jre\lib\jce.jar; c:\program files\clearspace\jre\lib\charsets.jar; c:\program files\clearspace\jre\classes

      sun.boot.library.path      c:\program files\clearspace\jre\bin

      sun.cpu.endian      little

      sun.cpu.isalist      

      sun.desktop      windows

      sun.io.unicode.encoding      UnicodeLittle

      sun.jnu.encoding      Cp1252

      sun.management.compiler      HotSpot Client Compiler

      sun.os.patch.level      Service Pack 2

      user.country      US

      user.dir      C:\Program Files\Clearspace\bin

      user.home      C:\Documents and Settings\LocalService

      user.language      en

      user.name      SYSTEM

      user.timezone      America/Los_Angeles

      user.variant      

      xwork.saxParserFactory      org.apache.xerces.jaxp.SAXParserFactoryImpl

      xwork.saxTransformerFactory      org.apache.xalan.processor.TransformerFactoryImpl

        • Re: java.lang.OutOfMemoryError Java heap space in /clearspace/doc-create.js
          scott.hirdes

          Hi,

           

          This error means that the JVM that is running Clearspace (which is actually the JVM that is running your application server) ran out of heap space. 

           

          To fix this, you will need to increase the amount of heap space that the JVM used for your application server is allowed to use.  This is done by specifying the Xms and Xmx parameters to the JVM.

           

          thanks,

           

          Scott

          • Re: java.lang.OutOfMemoryError Java heap space in /clearspace/doc-create.js

            I was struggeling with the same, but didn't find any documentation on how to achieve that for the executable running as service.

             

            Finally, I managed to achieve it like this:

            Create a file "clearspace-service.vmoptions" (vmoptions is the extension) in the same directory where the service executable is (C:\Program Files\Clearspace\bin or so).

             

            In this file, add the following lines:

            -server

            -Xms256m

            -Xmx512m

            -XX:MaxPermSize=128m

            -XX:+UseParNewGC

            -XX:+UseConcMarkSweepGC

             

            That should do the trick; you may want to add mode memory (Xms and Xmx) if you're running the database on another machine.