You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2004/07/28 12:25:56 UTC

weird error with jakarta-tomcat-5.0.27

Hello group,

a friend of mine started a hosting server for cocoon/lenya/forrest.

He installed a new server and installed lenya :). But now he got an 
error that I never have seen before! Maybe somebody has an idea what 
that can be:
 From /logs/catalina.out >

SEVERE: The scratchDir you specified: 
/Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/lenya is unusable.

and in the browser:

javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw 
exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 


org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) 


org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 

java.lang.Thread.run(Thread.java:552)


*root cause*
java.lang.NullPointerException

org.apache.cocoon.servlet.multipart.RequestFactory.<init>(RequestFactory.java:61) 


org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:473)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 


org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) 


org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 

java.lang.Thread.run(Thread.java:552)

Any ideas where the problem could be?

King regards
thorsten


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: weird error with jakarta-tomcat-5.0.27

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
Thanks Jan and Andreas for the quick reply!

I will have a look and report back!

cheers
thorsten

Andreas Hartmann wrote:

> Jann Forrer wrote:
>
>> Thorsten Scherler wrote:
>>
>>> Hello group,
>>>
>>> a friend of mine started a hosting server for cocoon/lenya/forrest.
>>>
>>> He installed a new server and installed lenya :). But now he got an 
>>> error that I never have seen before! Maybe somebody has an idea what 
>>> that can be:
>>> From /logs/catalina.out >
>>>
>>> SEVERE: The scratchDir you specified: 
>>> /Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/lenya is 
>>> unusable.
>>
>>
>>
>>
>> Somtimes ago I had similar problem but unfortunately I forget whether 
>> (or how) I solved it but I found the following URL at that time:
>> http://www.intellij.net/forums/thread.jsp?forum=4&thread=51818&message=614958 
>>
>> It seems that the process tries to write into an Dircecory which does 
>> not exist at that time.
>
>
> In CocoonServlet.java, the upload directory should be created:
>
> this.uploadDir.mkdirs();
>
> The offending line in RequestFactory:
>
>            File[] files = uploadDirectory.listFiles();
>       ->   for (int i = 0; i < files.length; i++) {
>
> From the javadocs of File.listFiles():
>
> "Returns null if this abstract pathname does not denote a directory"
>
> Quite strange, but
> a) the uploadDir has not been created or
> b) the field was modified after the creation.
>
> No idea, but maybe this helps to trace it.
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: weird error with jakarta-tomcat-5.0.27

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
Ken Blackler wrote:

>Perhaps check that the user tomcat is running under has sufficient
>permissions for this directory?
>
>Ken 
>
>  
>

Yeah, I will check it again, but he should have!
cheers Ken

King regards
thorsten

>>   -----Original Message-----
>>   From: news [mailto:news@sea.gmane.org] On Behalf Of 
>>   Andreas Hartmann
>>   Sent: 28 July 2004 13:55
>>   To: lenya-user@cocoon.apache.org
>>   Subject: Re: weird error with jakarta-tomcat-5.0.27
>>   
>>   Jann Forrer wrote:
>>   
>>   > Thorsten Scherler wrote:
>>   > 
>>   >> Hello group,
>>   >>
>>   >> a friend of mine started a hosting server for 
>>   cocoon/lenya/forrest.
>>   >>
>>   >> He installed a new server and installed lenya :). But 
>>   now he got an 
>>   >> error that I never have seen before! Maybe somebody has 
>>   an idea what 
>>   >> that can be:
>>   >> From /logs/catalina.out >
>>   >>
>>   >> SEVERE: The scratchDir you specified: 
>>   >> 
>>   /Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/leny
>>   a is unusable.
>>   > 
>>   > 
>>   > 
>>   > Somtimes ago I had similar problem but unfortunately I 
>>   forget whether 
>>   > (or how) I solved it but I found the following URL at that time:
>>   > 
>>   http://www.intellij.net/forums/thread.jsp?forum=4&thread=51
>>   818&message
>>   > =614958
>>   > 
>>   > It seems that the process tries to write into an 
>>   Dircecory which does 
>>   > not exist at that time.
>>   
>>   In CocoonServlet.java, the upload directory should be created:
>>   
>>   this.uploadDir.mkdirs();
>>   
>>   The offending line in RequestFactory:
>>   
>>               File[] files = uploadDirectory.listFiles();
>>          ->   for (int i = 0; i < files.length; i++) {
>>   
>>    From the javadocs of File.listFiles():
>>   
>>   "Returns null if this abstract pathname does not denote a 
>>   directory"
>>   
>>   Quite strange, but
>>   a) the uploadDir has not been created or
>>   b) the field was modified after the creation.
>>   
>>   No idea, but maybe this helps to trace it.
>>   
>>   -- Andreas
>>   
>>   
>>   -----------------------------------------------------------
>>   ----------
>>   To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>>   For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>>   
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


RE: weird error with jakarta-tomcat-5.0.27

Posted by Ken Blackler <ke...@jrc.it>.
Perhaps check that the user tomcat is running under has sufficient
permissions for this directory?

Ken 

>    -----Original Message-----
>    From: news [mailto:news@sea.gmane.org] On Behalf Of 
>    Andreas Hartmann
>    Sent: 28 July 2004 13:55
>    To: lenya-user@cocoon.apache.org
>    Subject: Re: weird error with jakarta-tomcat-5.0.27
>    
>    Jann Forrer wrote:
>    
>    > Thorsten Scherler wrote:
>    > 
>    >> Hello group,
>    >>
>    >> a friend of mine started a hosting server for 
>    cocoon/lenya/forrest.
>    >>
>    >> He installed a new server and installed lenya :). But 
>    now he got an 
>    >> error that I never have seen before! Maybe somebody has 
>    an idea what 
>    >> that can be:
>    >> From /logs/catalina.out >
>    >>
>    >> SEVERE: The scratchDir you specified: 
>    >> 
>    /Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/leny
>    a is unusable.
>    > 
>    > 
>    > 
>    > Somtimes ago I had similar problem but unfortunately I 
>    forget whether 
>    > (or how) I solved it but I found the following URL at that time:
>    > 
>    http://www.intellij.net/forums/thread.jsp?forum=4&thread=51
>    818&message
>    > =614958
>    > 
>    > It seems that the process tries to write into an 
>    Dircecory which does 
>    > not exist at that time.
>    
>    In CocoonServlet.java, the upload directory should be created:
>    
>    this.uploadDir.mkdirs();
>    
>    The offending line in RequestFactory:
>    
>                File[] files = uploadDirectory.listFiles();
>           ->   for (int i = 0; i < files.length; i++) {
>    
>     From the javadocs of File.listFiles():
>    
>    "Returns null if this abstract pathname does not denote a 
>    directory"
>    
>    Quite strange, but
>    a) the uploadDir has not been created or
>    b) the field was modified after the creation.
>    
>    No idea, but maybe this helps to trace it.
>    
>    -- Andreas
>    
>    
>    -----------------------------------------------------------
>    ----------
>    To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>    For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: weird error with jakarta-tomcat-5.0.27

Posted by Andreas Hartmann <an...@apache.org>.
Jann Forrer wrote:

> Thorsten Scherler wrote:
> 
>> Hello group,
>>
>> a friend of mine started a hosting server for cocoon/lenya/forrest.
>>
>> He installed a new server and installed lenya :). But now he got an 
>> error that I never have seen before! Maybe somebody has an idea what 
>> that can be:
>> From /logs/catalina.out >
>>
>> SEVERE: The scratchDir you specified: 
>> /Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/lenya is unusable.
> 
> 
> 
> Somtimes ago I had similar problem but unfortunately I forget whether 
> (or how) I solved it but I found the following URL at that time:
> http://www.intellij.net/forums/thread.jsp?forum=4&thread=51818&message=614958 
> 
> It seems that the process tries to write into an Dircecory which does 
> not exist at that time.

In CocoonServlet.java, the upload directory should be created:

this.uploadDir.mkdirs();

The offending line in RequestFactory:

            File[] files = uploadDirectory.listFiles();
       ->   for (int i = 0; i < files.length; i++) {

 From the javadocs of File.listFiles():

"Returns null if this abstract pathname does not denote a directory"

Quite strange, but
a) the uploadDir has not been created or
b) the field was modified after the creation.

No idea, but maybe this helps to trace it.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: weird error with jakarta-tomcat-5.0.27

Posted by Jann Forrer <ja...@id.unizh.ch>.
Thorsten Scherler wrote:

> Hello group,
>
> a friend of mine started a hosting server for cocoon/lenya/forrest.
>
> He installed a new server and installed lenya :). But now he got an 
> error that I never have seen before! Maybe somebody has an idea what 
> that can be:
> From /logs/catalina.out >
>
> SEVERE: The scratchDir you specified: 
> /Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/lenya is unusable.


Somtimes ago I had similar problem but unfortunately I forget whether 
(or how) I solved it but I found the following URL at that time:
http://www.intellij.net/forums/thread.jsp?forum=4&thread=51818&message=614958
It seems that the process tries to write into an Dircecory which does 
not exist at that time.

I would try to create 
/Library/jakarta-tomcat-5.0.27/work/Catalina/localhost/lenya before 
starting tomcat and if that works you can define the scratchdir in the 
web.xml File. However, I am not sure whether tomcat shutdown delets the 
scratchdir again.

Jann



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org