Jump to content
Changes to the Jaspersoft community edition download ×

Problem on Solaris [web application ]

2004 IR Help

Recommended Posts

By: santaperera - dilanperera

Problem on Solaris [web application ]

2005-09-14 02:55

I have developed a web application just according to the way that is shown in samples-->webapp-->applet example provided with

jasperreport distribution archive. So what i am doing is that i am showing the report to the user on an applet. When i host my application on a windows or linux server and access the site from a remote machine i am able to view reports without any problem. But when i host it on the Solaris machine and when i access the web application from a remote

machine, i get the following error.



[type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.




javax.servlet.ServletException: Servlet execution threw an exception



root cause



at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:115)











at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:68)





at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



note The full stack trace of the root cause is available in the Tomcat logs.





Software i am using are


Java 2 Runtime Environment, Standard Edition (build 1.3.1_13-b03)

Java HotSpot Client VM (build 1.3.1_13-b03, mixed mode)


MySQL <-- no problem connecting to mysql db


Tomcat 5.x


jasperreports 0.6.7 /0.6.8/0.6.5 <-- all these versions i have same problem


please help me because i cant seem to find a reason why this is happening.








By: Andres Ederra - andres

RE: Problem on Solaris [web application ]

2005-09-14 03:47



Its seems you are suffering a quite common problem when you use java in a unix server.

The problem may be that your java process want to connecto to your XWindow server and it doesnt fint it.


Check this thread in one of my projects forums it looks the same problem, check it out in case it applyes:







By: Denny Valliant - xenden

RE: Problem on Solaris [web application ]

2005-09-14 03:48

do a search for "headless" or java.awt in this forum, and see if that is what the problem is.





By: santaperera - dilanperera

RE: Problem on Solaris [web application ]

2005-09-16 03:16

Thanks guys , you were right, it was the headless problem.


the solaris machine already had the Xsun installed so all i had to do is what was said below (found the below instrunction from web)


The catalina.sh shell script file literally starts the execution of Tomcat

by invoking a Java Virtual Machine (JVM) instance. Given this fact, it is

the catalina.sh shell script file that needs to be modified for running

Tomcat perpetually; i.e. in order to continue Tomcat's execution even upon

user "logout." The modification that will allow this is such, that it will

force the JVM to be run using the UNIX "nohup" command. The UNIX nohup

command tells a program (i.e. in this case Tomcat) to ignore SIGHUP and

SIGQUIT signals, which are generated when a user logs out from their

account. This is what keeps Tomcat running. The modification steps are

given below:


Within the catalina.sh shell script file, scroll down until the following

text is found (i.e. highlighted in red):


elif [ "$1" = "run" ]; then



if [ "$1" = "-security" ] ; then

echo "Using Security Manager"



-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"






org.apache.catalina.startup.Bootstrap "$@" start



-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"




org.apache.catalina.startup.Bootstrap "$@" start



Change this text to the following values (in blue), which force the JVM to

run in "headless mode" via the "nohup" UNIX utility program:


nohup "$_RUNJAVA" -Djava.awt.headless=true $JAVA_OPTS $CATALINA_OPTS


Once this change has been made, Tomcat can then be restarted and the user

can safely logout from their UNIX account. Any debug messages generated by

Tomcat during its lifetime will be output to a text file named

"nohup.out." The nohup.out text file, which is automatically generated by

the nohup command for the process it is running, will exist in the

directory from which nohup was invoked. Specifically, if the MapXtremeJava

"startup.sh" file is used to start Tomcat (i.e. via nohup by calling the

catalina.sh file, directly), then the nohup.out text file will be created

at the same directory level. Since this is the case, the following two

files would therefore exist:






Caveat: if the Tomcat JVM is not started in headless mode, then the below

exception (in red) can be thrown if remote map rendering occurs.

Specifically, users would see this stacktrace within the "nohup.out" text




at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:130)



at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1053)

at com.mapinfo.mapxtreme.ImageHandlerServlet.b(Unknown Source)

at com.mapinfo.mapxtreme.ImageHandlerServlet.sendResponse(Unknown Source)

at com.mapinfo.mapxtreme.ImageHandlerServlet.service(Unknown Source)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)







at com.mapinfo.mapxtreme.MapXtremeServlet.a(Unknown Source)

at com.mapinfo.mapxtreme.MapXtremeServlet.doPost(Unknown Source)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...