You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Kevin McKenzie <km...@btinternet.com> on 2002/09/17 13:14:19 UTC

Linux: TDK vs. Apache-Tomcat4

Hi all,

I am trying (for the first time) to set up Newapp on a Linux box.

I started by loading tdk-2.1 and hitting http://myhost:8080/test/servlet/test, and all was 
well. 

However, when I try the same application on my ISP's Apache-Tomcat4 installation, I get:

PANIC : Error configuring AvalonLogSystem : java.io.FileNotFoundException: 
/home/virtual/site1/fst/var/www/html/logs/velocity.log (Permission denied)
PANIC : Error configuring AvalonLogSystem : java.io.FileNotFoundException: 
/home/virtual/site1/fst/var/www/html/logs/velocity.log (Permission denied)
java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.velocity.runtime.log.AvalonLogSystem.logVelocityMessage
(AvalonLogSystem.java)
        at org.apache.velocity.runtime.Runtime.log(Runtime.java)
        at org.apache.velocity.runtime.Runtime.dumpPendingMessages(Runtime.java)
        at org.apache.velocity.runtime.Runtime.initializeLogger(Runtime.java)
        at org.apache.velocity.runtime.Runtime.init(Runtime.java)
        at org.apache.velocity.app.Velocity.init(Velocity.java)
        at org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity
(TurbineVelocityService.java:460)
        at org.apache.turbine.services.velocity.TurbineVelocityService.init
(TurbineVelocityService.java:138)
        at org.apache.turbine.services.TurbineBaseService.init
(TurbineBaseService.java:108)
        at org.apache.turbine.services.BaseInitableBroker.initClass
(BaseInitableBroker.java:150)
        at org.apache.turbine.services.BaseServiceBroker.doInitService
(BaseServiceBroker.java:226)
        at org.apache.turbine.services.BaseServiceBroker.initServices
(BaseServiceBroker.java:195)
        at org.apache.turbine.Turbine.init(Turbine.java:185)
        at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:916)

I tried adding the following permission to site1.policy.custom:

grant codeBase "file:/home/virtual/site1/fst/var/www/html/WEB-INF/lib/-" {
  permission java.security.AllPermission;
};

and I also tried the individual jar files:

grant codeBase "file:/home/virtual/site1/fst/var/www/html/WEB-INF/lib/velocity-1.2-
dev.jar" {
  permission java.security.AllPermission;
};
grant codeBase "file:/home/virtual/site1/fst/var/www/html/WEB-INF/lib/turbine-
2.1.jar" {
  permission java.security.AllPermission;
};
grant codeBase "file:/home/virtual/site1/fst/var/www/html/WEB-INF/lib/log4j-1.1.jar" {
  permission java.security.AllPermission;
};

but it still fails as above.

My environment:
Apache/1.3.22
Tomcat4.0.3
Turbine 2.1

Has anyone come across this?  Any ideas what I am doing wrong?

Regards,
Kevin McKenzie




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Linux: TDK vs. Apache-Tomcat4

Posted by Kevin McKenzie <km...@btinternet.com>.
>>> PANIC : Error configuring AvalonLogSystem : 
>java.io.FileNotFoundException:
>>> /home/virtual/site1/fst/var/www/html/logs/velocity.log 
>(Permission denied)
>>
>>Does the user that is running catalina have the file system 
>>privileges necessary to create the above file?
>
>Now you're testing my Linux knowledge - I used chmod ugo+w on 
>the /home/virtual/site1/fst/var/www/html/logs directory to make 
>it wide open.  Catalina is being run by a user called tomcat4.  I 
>don't know how to check this user's privileges, but I hoped that 
>setting write permission on the log directory would do it.

Doh!   I had run catalina as root at some stage, which means that 
velocity.log and turbine.log were created by root.  I deleted these 
files then restarted catalina and new log files were created.

Now I am getting java.lang.IllegalStateException: Current state = 
FLUSHED, new state = CODING_END, but I saw posting from 
March suggesting that this is an issue with Tomcat4.0.3 and  
JDK1.4, so I will try JDK1.3.

-kevin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Linux: TDK vs. Apache-Tomcat4

Posted by Kevin McKenzie <km...@btinternet.com>.
17/09/2002 13:03:41, Scott Eade 
<se...@backstagetech.com.au> wrote:

>> PANIC : Error configuring AvalonLogSystem : 
java.io.FileNotFoundException:
>> /home/virtual/site1/fst/var/www/html/logs/velocity.log 
(Permission denied)
>
>Does the user that is running catalina have the file system 
>privileges necessary to create the above file?

Now you're testing my Linux knowledge - I used chmod ugo+w on 
the /home/virtual/site1/fst/var/www/html/logs directory to make it 
wide open.  Catalina is being run by a user called tomcat4.  I don't 
know how to check this user's privileges, but I hoped that setting 
write permission on the log directory would do it.

-kevin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Linux: TDK vs. Apache-Tomcat4

Posted by Scott Eade <se...@backstagetech.com.au>.
> From: Kevin McKenzie <km...@btinternet.com>
> 
> PANIC : Error configuring AvalonLogSystem : java.io.FileNotFoundException:
> /home/virtual/site1/fst/var/www/html/logs/velocity.log (Permission denied)

Does the user that is running catalina have the file system privileges
necessary to create the above file?

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>