GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes Problem with Ireport, PermGem space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problem with Ireport, PermGem space" Watch "Problem with Ireport, PermGem space" New topic
Author

Problem with Ireport, PermGem space

Dennis Faggiani
Greenhorn

Joined: Sep 21, 2011
Posts: 4
Hi guys, i'm getting an exception and i don't know how to fix it.
This started after i insert the ireport into my project.
I've already tryed to increase the JVM memory from the eclipse.ini, and tryed to pass arguments to Tomcat, but notthing seems to work, my project is over 30mb, i don't know if that's the problem, this is the exception i'm getting



does anyone can help me? i'm kind of desperate, it's been three days trying to fix it, and i'm not getting any success.
Thank you.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

You are getting a permgen space error, not a heap space error, so setting heap sizes will have no effect. You need to increase the permgen size using the -XX:MaxPermGen option.

Assuming that it is Tomcat that is blowing up with this error, open the Tomcat server (right-click on Tomcat in Server view and select open) then click Open Launch Configuration. On the Arguments tab, add "-XX:MaxPermSize=256M" to the VM Arguments.

If it is Eclipse that is blowing up, edit the value after the "--launcher.XXMaxPermSize" line in eclipse.ini.


JBoss In Action
Dennis Faggiani
Greenhorn

Joined: Sep 21, 2011
Posts: 4
Peter Johnson wrote:You are getting a permgen space error, not a heap space error, so setting heap sizes will have no effect. You need to increase the permgen size using the -XX:MaxPermGen option.

Assuming that it is Tomcat that is blowing up with this error, open the Tomcat server (right-click on Tomcat in Server view and select open) then click Open Launch Configuration. On the Arguments tab, add "-XX:MaxPermSize=256M" to the VM Arguments.

If it is Eclipse that is blowing up, edit the value after the "--launcher.XXMaxPermSize" line in eclipse.ini.

Hi, this works perfectly!!
Thank you very much.
Now iém getting this



I created the file "contas.jasper" in this path "/Users/DennisFaggiani/Documents/workspace/FinanceiroWeb/financeiro/relatorios/contas.jasper" But it seems that it looking for in the wrong place, this is my class where i generate the report


Any ideas?
Thank you very much.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Be careful with creating and reading files in web applications - the current working directory is never what you thing it is. Usually, you want to deal with files relative to the web app's base directory. Either than, or use web.xml to pass a parameter to the app telling the app where to look for files.

This statement defines the file's location:

Then caminhoRelatorio was defined here:

This statement returns a directory relative to the base directory of you web application. And since you are running the app on Tomcat from within Eclipse, the web app's base directory is:
/Users/DennisFaggiani/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/FinanceiroWeb/

I assume you created /Users/DennisFaggiani/Documents/workspace/FinanceiroWeb/financeiro/relatorios/contas.jasper within your Eclipse project. Where you really wanted to create it is within the WebContent directory (at workspace/FinanceiroWeb/WebContent/relatorios/contas.jasper) so that it would become part of the web app that was deployed.
Dennis Faggiani
Greenhorn

Joined: Sep 21, 2011
Posts: 4
thank you for the reply, i'll change the path and see how it goes.
thanks
 
jQuery in Action, 2nd edition
 
subject: Problem with Ireport, PermGem space