cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drasko Kokic <drasko_ko...@yahoo.com>
Subject Re: Migration problems
Date Tue, 29 Aug 2000 17:42:44 GMT
Solved!

The problem was in usage of the following methode
XSPUtil.relativeFilename without supplying the
ServletContext object.

As written in the XSP document:

String relativeFilename(String filename,
HttpServletRequest request, ServletContext context).
This method is used to build a fully qualified
pathname for a filename relative to the request URI.
This is typically used to open operating system files
given a name relative to the request's virtual path 

String relativeFilename(String filename,
HttpServletRequest request).
This method is used to build a fully qualified
pathname for a filename relative to the request URI.
This is typically used to open operating system files
given a name relative to the request's virtual path.
This variant depends on the deprecated
HttpServletRequest.getRealPath method and exists only
for compatibility with older JSDK's in which the
ServletContext object did not provide a getRealPath()
method

I wonder why is it throwing NullPointerException ?!

Cheers,
Drasko


--- Drasko Kokic <drasko_kokic@yahoo.com> wrote:
> Hi everybody,
> 
> I am using Cocoon 1.7.4 over Tomcat 3.1 on my WinNT
> PC.
> My sample pages work fine.  I am trying to migrate
> an
> application from a Jserv to a Tomcat environment
> (both
> with same Cocoon version) ... and am getting the
> following error.
> 
>       Error found handling the request.
> 
>   java.lang.NullPointerException
>           at
> org.apache.cocoon.Utils.getBasename(Utils.java:266)
>           at
>
org.apache.cocoon.processor.xsp.XSPUtil.relativeFilename(XSPUtil.java:138)
>           at
>
org.apache.cocoon.processor.xsp.XSPUtil.relativeFilename(XSPUtil.java:150)
>           at
>
_D_._Apache_Group._jakarta_tomcat._webapps._pepsi._eService._hello.populateDocument(_hello.java:375)
>           at
>
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
>           at
>
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:456)
>           at
> org.apache.cocoon.Engine.handle(Engine.java:305)
>           at
> org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>           at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>           at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>           at
>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>           at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
>           at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
>           at java.lang.Thread.run(Thread.java:484)
> 
> 
> I am not clear where should the jar file for my
> application be installed/configured.  Right now,
> they
> are resting in a top level of a new directory tree
> under webapps.
> 
> Thanks in advance
> 
> Drasko
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from
> anywhere!
> http://mail.yahoo.com/


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message