Matt,
You're right.  When I scanned the repository before, I didn't see the
check.  It is there and that does work.

Thanx,
LES

http://www.mindmeld.ws
[EMAIL PROTECTED]

-----Original Message-----
From: Matt Ho [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2003 7:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] VelocityManager Issue/Bug

Is this with the current CVS version?  A fix for this was put in 
recently so that the return value from context.getRealPath() is checked 
for null-ness.

M

[EMAIL PROTECTED] wrote:
> In order for me to get the deploy/undeploy manager functionality in
> tomcat to work, I have to run it with the host setting of unpacking
set
> to false.  This creates an issue in the VelocityManager.  In the code
> (around line 153), context.getRealPath is called (several times).  The
> servlet spec, though, specifies that the app server "must return null"
> for these methods if the servlet is being executed from an archive
> (section SRV.4.5). Now this all happens in a try catch block.
However,
> when you construct a File with null you get a NullPointerException
(not
> the IOException that is caught).  As a result, the whole app crashes.
> I've put the stack trace below.  However, this could be easily fixed
by
> catching the npe.  Alternatively, depending on the getRealPath method
> anywhere in the servlet is a bad idea.  So, it should be replaced with
> getResource with everything in the class path.  That is, unless,
someone
> can tell me a reliable mechanism for getting actual file system paths
in
> an archived servlet (would love to know this :)).
> 
> Thanx,
> LES
> 
>
//======================================================================
> =
> //                                    Stack Trace
>
//======================================================================
> =
> 2003-06-07 16:21:41 StandardWrapperValve[webwork]: Allocate exception
> for servlet webwork
> javax.servlet.ServletException: Servlet.init() for servlet webwork
threw
> exception
>       at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:963)
>       at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:6
> 68)
>       at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> 5)
>       at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :180)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lve.java:171)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>       at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :172)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:174)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>       at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
> 4)
>       at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:392)
>       at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
> 5)
>       at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:619)
>       at java.lang.Thread.run(Thread.java:536)
> ----- Root Cause -----
> java.lang.NullPointerException
>       at java.io.File.<init>(File.java:180)
>       at
>
com.opensymphony.webwork.views.velocity.VelocityManager.loadConfiguratio
> n(VelocityManager.java:153)
>       at
>
com.opensymphony.webwork.views.velocity.VelocityManager.newVelocityEngin
> e(VelocityManager.java:240)
>       at
>
com.opensymphony.webwork.views.velocity.VelocityManager.init(VelocityMan
> ager.java:106)
>       at
>
com.opensymphony.webwork.dispatcher.ServletDispatcher.init(ServletDispat
> cher.java:62)
>       at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:935)
>       at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:6
> 68)
>       at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
> 5)
>       at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :180)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lve.java:171)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>       at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :172)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:174)
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643)
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80)
>       at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>       at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>       at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
> 4)
>       at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:392)
>       at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
> 5)
>       at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:619)
>       at java.lang.Thread.run(Thread.java:536)  
> 
> 
> -----Original Message-----
> From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 06, 2003 9:21 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Request to core developers
> 
> Erik,
> 
> OK - good idea. Any particular issues you want to point us at?
> 
> M
> 
> On 6/6/03 10:21 PM, "Erik Beeson" ([EMAIL PROTECTED]) penned the
> words:
> 
> 
>>It would be nice if the core developers could make comments on JIRA
> 
> issues
> 
>>as they come in. I'm fairly familiar with the codebase as I've been
>>involved with it from the start, and it would be easy for me to fix a
> 
> lot
> 
>>of the issues in JIRA, but I'm always afraid that a proposed solution
>>isn't a good one, or that some other thing in development will fix a
>>particular issue or something like that. It would be nice if issues
> 
> had a
> 
>>little comment, "This looks good" "Let's rethink this" "This isn't a
> 
> good
> 
>>idea", etc. Then anybody who knows the code can jump in anywhere
> 
> without
> 
>>worrying about breaking things.
>>
>>Because I'm sure the core team doesn't have enough to do ;)
>>
>>--Erik
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by:  Etnus, makers of TotalView, The
> 
> best
> 
>>thread debugger on the planet. Designed with thread debugging features
>>you've never dreamed of, try TotalView 6 free at www.etnus.com.
>>_______________________________________________
>>Opensymphony-webwork mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The
best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The
best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to