java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 25631080用的是jrockit
2012-7-26 15:02:09 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet contract threw exception
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 25631080
at com.mysql.jdbc.Buffer.getBytes(Buffer.java:209)
at com.mysql.jdbc.Buffer.readLenByteArray(Buffer.java:329)
at com.mysql.jdbc.BufferRow.getColumnValue(BufferRow.java:333)
at com.mysql.jdbc.ResultSetImpl.getBytes(ResultSetImpl.java:1914)
at com.mysql.jdbc.ResultSetImpl.getBytes(ResultSetImpl.java:1892)
at com.mysql.jdbc.ResultSetImpl.getBytes(ResultSetImpl.java:1932)
at org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:291)
at org.apache.commons.dbcp.DelegatingResultSet.getBytes(DelegatingResultSet.java:291)
at org.hibernate.type.AbstractBynaryType.get(AbstractBynaryType.java:103)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:186)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:175)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2267)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1443)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1371)
at org.hibernate.loader.Loader.getRow(Loader.java:1271)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619)
at org.hibernate.loader.Loader.doQuery(Loader.java:745)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2192)
at org.hibernate.loader.Loader.list(Loader.java:2187)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:241)
at com.gpdi.contract.domain.FileBlob_Roo_Entity.findAllFileBlobs_aroundBody4(FileBlob_Roo_Entity.aj:97)
at com.gpdi.contract.domain.FileBlob_Roo_Entity.ajc$interMethod$com_gpdi_contract_domain_FileBlob_Roo_Entity$com_gpdi_contract_domain_FileBlob$findAllFileBlobs(FileBlob_Roo_Entity.aj:1)
at com.gpdi.contract.domain.FileBlob.findAllFileBlobs(FileBlob.java:1)
at com.gpdi.contract.domain.FileBlob_Roo_Entity.ajc$interMethodDispatch1$com_gpdi_contract_domain_FileBlob_Roo_Entity$com_gpdi_contract_domain_FileBlob$findAllFileBlobs(FileBlob_Roo_Entity.aj)
at com.gpdi.contract.web.DocumentationController_Roo_Controller.ajc$interMethod$com_gpdi_contract_web_DocumentationController_Roo_Controller$com_gpdi_contract_web_DocumentationController$populateFileBlobs(DocumentationController_Roo_Controller.aj:84)
at com.gpdi.contract.web.DocumentationController.populateFileBlobs(DocumentationController.java:1)
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:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:161)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:774)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:477)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
请问这个问题allocLargeObjectOrArray怎么解决
[解决办法]
如果一条简单的数据库操作都报这个错,那下载个新点的JDBC驱动试试。
[解决办法]
你不会把二进制文件存数据库里了吧。。
如果有太多这样的数据频繁在TOMCAT里跑他是得内存不足,先加大TOMCAT内存吧
catalina.sh 或者.bat里面
# OS specific support. $var _must_ be set to either true or false.
这下面加上
CATALINA_OPTS="-server -Xms512m -Xmx2046m"