tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: [SOLVEDRE] : UNIX+Apache+Tomcat Situtation
Date Wed, 22 Oct 2003 19:35:19 GMT

Just out of curiosity, why couldn't you move to JDK 1.4 (so you could

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: []
>Sent: Wednesday, October 22, 2003 3:29 PM
>Subject: [SOLVEDRE] : UNIX+Apache+Tomcat Situtation
>Thank you for your excellent response. :) By the time I got it though I
>pretty much resolved to the idea that it was not a UNIX permission
issue at
>all. As I had many hours(read sore shoulder) into throwing every UNIX
>permission switch in the book. Btw, it an HP environment but this
>could apply to any *NIX setup.
>The error was actually occuring in the graphics library JFreeChart.
>developer logged into the workstation physically at the console and
>started Tomcat the graphics libraries in JFreeChart were able to draw
>X11. There was a 'head'. But remote users like root or tomcat_user were
>'headless'. Hence the graphics methods failed because they were unable
>draw to a 'window'.
>The solution is to install PJA libraries from
>which remedy the need to draw to a window. Note, this issue is resolved
>installing JDK 1.4 too but this was not an option. The situation is
>better explained by this para from the PJA site;
>"When no X11 Display is available on a UNIX machine (also called
>environment) or when GDI resources are low on Windows, it is impossible
>compute off-screen images with java.awt.Graphics methods under a JDK
>< 1.4, even if your program doesn't need to display these images.
>this situation happens for servlets returning dynamically generated
>like pies, charts or web counters.
>With PJA, you don't need to change your Java programs that you expected
>run : setting java.awt system property to com.eteks.awt.PJAToolkit is
>only required modification to your program with Java 1.1 (see PJA FAQ
>com.eteks.awt.PJAToolkit class documentation for more information)."
>-----Original Message-----
>From: Daniel Gibby []
>Sent: Tuesday, October 21, 2003 3:48 PM
>To: Tomcat Users List
>Subject: Re: UNIX+Apache+Tomcat Situtation
>This really sounds like it is a unix permissions issue, but it could be
>a Security issue with java as well. I don't know as much about the java
>Security model, but I can tell you things to check for with unix
>So if 'developer' is the owner of the tomcat directory, and your
>and all files that are trying to be written are under that directory,
>sounds like it works fine for you when 'developer' starts tomcat- so
>tomcat is run as the developer user, and since developer has rights to
>create files under that directory, it works fine.
>On the other hand your tomcat user doesn't sound like it has rights.
>I would suggest that you always run tomcat as the tomcat user, and make
>developer and root start it as the tomcat user.
>That can be easily done with a startup script instead of calling
>$TOMCAT_HOME/bin/ directly or whatever it is.
>I would make sure that the directories all have the tomcat user as the
>owner and group, and then add root and developer to that group.
>What Unix is this? Linux? Solaris?
>Here is the format to make tomcat run as the tomcat user with a
>I also have catalina.out automatically rotated every time I start
> ##################################################################
># Comments to support chkconfig on RedHat Linux
># chkconfig: 2345 84 84
># description: A very fast and reliable J2EE Servlet Container.
>timestamp=`date +%Y-%m-%d-%H%M%S`
>echo "timestamp= $timestamp"
>export JAVA_HOME
>#CATALINA_OPTS="-Xms196m -Xmx896m -Dbuild.compiler.emacs=true"
> case $1 in
> 'start')
>     su tomcat4 -c "mv $TOMCAT_HOME/logs/catalina.out
>     su tomcat4 -c "$TOMCAT_HOME/bin/"
>     sleep 10
>     /usr/sbin/apachectl graceful
>     ;;
> 'stop')
>     su tomcat4 -c "$TOMCAT_HOME/bin/"
>     ;;
> 'status')
>     ps auxw | fgrep tomcat | fgrep -v status | fgrep -v grep | fgrep
>     ;;
> *)
>     echo "usage: $0 {start|stop|status}"
>     ;;
> esac
># END OF /etc/rc.d/tomcat
> wrote:
>>I have a situation where if a developer owns Tomcat 3 and stops/starts
>>server the apps on that server all j2ee web-apps run fine. If I as
root or
>>'tomcat_user' or su to developer id stop/start Tomcat 3 then all j2ee
>>web-apps run except modules that produce .jpegs dynamically. In the
>>case Tomcat was setup so that the user who stop/started Tomcat owned
>>My first response was to make all files/directories world
>>read,write,execute. It must be a UNIX permission thing right. Also I
>>and source'd the UNIX personal env of each user to be world
>>read,write,execute on any directories/files created but still no
>>the graphs are not displayed. The graph libs are using JFreechart,
>>This is a long running issue and I would appreciate any help as I am
>>sure if this is a UNIX or Tomcat or JFreechart issue. Any suggestions?
>>would I not be able to remotely log into box, su - to developer id and
>>stop/start Tomcat with all apps functioning? Also, developer's
>>acct is basic stock settings with no extra frills.
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message