3

I installed the jasperserver(version: 5.6) in Windows 7 through the official document, use an exsiting Tomcat(version: 7) and an existing PostgreSQL(version: 9.2.8), I checked the installation.log file in JasperServer's installation path, and everything is OK. But when I starting the Tomcat by double click 'Tomcat.exe' and it always says the following error:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI TCP Connection(idle)"

I searched for these problem and some says to configure the JVM options in %CATALINA_HOME%\bin\setenv.bat or %CATALINA_HOME\bin\%catalina.bat, but I can't find any one of them. I think this is because I'm using an exsiting Tomcat and the installation of JasperServer modified some files in %CATALINA_HOME%. So I searched 'setenv.bat' from %JasperServer% and find it in %JasperServer%\scripts. Here is my configuration:

set JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx3072m -XX:PermSize=1024m -XX:MaxPermSize=2048m -Xss2m -XX:+UseCompressedOoops -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled         

Also, I did followed the official document here, and nothing helps, Error exists.

Is there anyone who met the same problem? What should I do? I really need help. Thanks.

Alex K
  • 22,315
  • 19
  • 108
  • 236
Alvis
  • 109
  • 3
  • 13

2 Answers2

1

It seems like the memory parameters you have specified have not been picked up? Check it out, for example by looking at the process table similar to following example:

ivos-mbp:demo ivomagi$ jps
1562 start.jar
1572 Jps
my-mbp:demo me$ ps axu 1562
USER      PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
me  1562   0.2  2.8  2965576 230784 s001  S    12:17PM   0:22.62 /usr/bin/java -Dcom.sun.management.jmxremote -Xmx168m

In case you do not see the specified -Xmx3072m in the printout, you need to doublecheck where from the configuration is loaded.

Flexo
  • 87,323
  • 22
  • 191
  • 272
Ivo
  • 444
  • 3
  • 7
  • Thanks for your quick answer and sorry for the late reply, but I'am running JasperServer on Windows system, so I can't run `ps axu` command. Thank you again for your reply. – Alvis Aug 30 '14 at 16:25
-1

Please, set CATALINA_OPTS instead of JAVA_OPS. Tomcat refers to CATALINA_OPTS on the start:

set "CATALINA_OPTS= -Xms2048m -Xmx3072m -XX:PermSize=1024m -XX:MaxPermSize=2048m -Xss2m -XX:+UseCompressedOoops -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"    
Anton Dovzhenko
  • 2,399
  • 11
  • 16