Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes Java heap space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Java heap space" Watch "Java heap space" New topic
Author

Java heap space

phani kon
Ranch Hand

Joined: Apr 06, 2005
Posts: 251
I am trying to open 3.24MB Quaterly.xsl from jsp.

Here is the code

<%@ page import="org.apache.poi.hssf.usermodel.HSSFSheet"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFWorkbook"%>
<%@ page import="org.apache.poi.poifs.filesystem.POIFSFileSystem"%>
<%@ page contentType="application/vnd.ms-excel" %>
<%@ page import="java.io.*" %>
<%
try{
POIFSFileSystem fs=new POIFSFileSystem(new FileInputStream
("c:\\excel\\Quarterly2007.xls"));
HSSFWorkbook wb=new HSSFWorkbook(fs);
FileOutputStream fileOut = new FileOutputStream(
"c:\\excel\\readingWriting.xls");
wb.write(fileOut);
fileOut.close();
out.println("Your excel file has been generated");

} catch ( Exception ex ) {
}
%>


I got this errors:

java.lang.OutOfMemoryError: Java heap space
13:53:13,953 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.SecurityException: SHA1 digest error for javax/mail/SecuritySupport12.class
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:196)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:201)
at java.util.jar.JarVerifier.update(JarVerifier.java:188)
at java.util.jar.JarInputStream.read(JarInputStream.java:176)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:118)
at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:149)
at org.jboss.web.tomcat.tc5.jasper.TagLibCache.scanJar(TagLibCache.java:324)
at org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268)
at org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
at org.jboss.web.tomcat.tc5.jasper.TagLibCache.init(TagLibCache.java:101)
at org.jboss.web.tomcat.tc5.jasper.TagLibCache.getLocation(TagLibCache.java:83)
at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:526)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:212)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

How would I handle this errors in java.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9318
    
109

You can set the appropriate heap size in the run.bat file which is present in %JBOSS_HOME%/bin folder. Something like this:



Restart JBoss after changing this file.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java heap space
 
Similar Threads
JSTL with struts?
excel
Unable to read TLD "META-INF/tld/tiles-jsp.tld" from JAR file
struts 1.2 problem
Unable to read TLD "META-INF/tld/tiles-jsp.tld" from JAR file