• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Ireport, PermGem space

 
Dennis Faggiani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dennis Faggiani
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for the reply, i'll change the path and see how it goes.
thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic