Thanks Steve. I applied the patch, it seems to fix the problem.
I also replaced the hard-coded "/" with PATH_SEPARATOR
-------------------------------------
David Sean Taylor
[EMAIL PROTECTED]
-------------------------------------
http://jakarta.apache.org/jetspeed
-------------------------------------
> -----Original Message-----
> From: Steve Davis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 8:52 PM
> To: [EMAIL PROTECTED]
> Subject: RE: JetspeedProfilerService
>
>
> Ok, I think I have figured this one out. In the
> JetspeedProfilerService an extra "/" is being added
> to the fullpath in the method locateTemplate. Evidently
> the new servlet api can handle a path with a "//" in
> in when doing a getServletContext().getRealPath. Where
> the servlet api used for Tomcat 3.2.1 on Linux can
> not resolve the path.
>
> The bug occurs because when templateRoot is defined
> the code makes sure a PATH_SEPARATOR is appended if
> there is not already one there. Then a "/" was hard
> coded to be appended to this in locateTemplate when
> computing the fullPath. The patch to fix this is
>
> ########################## START PATCH #####################
> Index: JetspeedProfilerService.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/
> services/p
> rofiler/JetspeedProfilerService.java,v
> retrieving revision 1.6
> diff -u -r1.6 JetspeedProfilerService.java
> --- JetspeedProfilerService.java 2001/06/09 15:37:32 1.6
> +++ JetspeedProfilerService.java 2001/06/19 03:35:05
> @@ -1051,7 +1051,7 @@
>
> StringBuffer fullPath = new StringBuffer( templateRoot );
>
> - fullPath.append("/").append(getTemplateExtension(template));
> + fullPath.append(getTemplateExtension(template));
> fullPath.append(resourceType);
>
> String basePath = fullPath.toString();
> ######################### END PATCH ##########################
>
> I noticed that the JetspeedProfilerService was very inconsistent
> on where it used PATH_SEPARATOR vs just a hard coded "/". I
> also made a patch where I replaced all the hard coded "/" with
> PATH_SEPARATOR (See attached file for that patch). Once I made
> these patches I could drop the war file in webapps for both
> versions of Tomcat and it worked fine.
>
> I would appreciate it if one of the commiters could add the
> patch to CVS. Thanks.
>
> -- Steve Davis
>
>
>
> -----Original Message-----
> From: Steve Davis
> Sent: Mon 6/18/2001 2:30 PM
> To: [EMAIL PROTECTED]
> Cc:
> Subject: RE: JetspeedProfilerService
>
> I get this same error when using Tomcat 3.2.1 but it
> works fine if I use the Tomcat 4.0-b6-dev that ships
> with Turbine. I am just dropping the jetspeed.war in
> the webapps directory for both so the permissions on
> the psml and template files are the same.
>
> I am still trying to debug why but if anyone with more
> jetpeed/tomcat experience wants to hazzard a guess as to
> what the problem might be I would appreciate the help.
>
> -- Steve Davis
>
> -----Original Message-----
> From: David Sean Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 9:38 AM
> To: [EMAIL PROTECTED]
> Subject: Re: JetspeedProfilerService
>
>
> I've seen this happen on linux when you don't have read access to the
> PSML
> files. Make sure that you have read access to your templates and psml
> directories.
>
> I will verify it tonight when I have access to a linux machine
>
> ----- Original Message -----
> From: "Berger, Jochen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, June 17, 2001 10:33 PM
> Subject: AW: JetspeedProfilerService
>
>
> > Hi,
> >
> > heres the relevant part of the jetspeed.log with DEBUG-Level:
> >
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- INFO -- Created a
> CapabilityMap
> for
> > agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- DEBUG --
> JetspeedTemplatePage:
> > requested template = /Home.jsp
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- INFO -- Created a
> CapabilityMap
> for
> > agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- DEBUG --
> JetspeedTemplatePage:
> > calculated template = null
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- INFO -- Created a
> CapabilityMap
> for
> > agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- ERROR --
> Turbine.handleException:
> > null
> > [Mon Jun 18 08:05:19 GMT+02:00 2001] -- ERROR --
> > Exception: java.lang.NullPointerException
> > Stack Trace follows:
> > java.lang.NullPointerException
> > at java.util.Hashtable.put(Hashtable.java:377)
> > at
> >
> org.apache.turbine.util.template.TemplateInfo.setTemp(Template
> Info.java:
> 274)
> > at
> >
> org.apache.turbine.util.template.TemplateInfo.setLayoutTemplat
> e(Template
> Info
> > .java:184)
> > at
> >
> org.apache.turbine.services.rundata.DefaultTurbineRunData.setL
> ayoutTempl
> ate(
> > DefaultTurbineRunData.java:715)
> > at
> >
> org.apache.jetspeed.modules.pages.JetspeedTemplatePage.doBuild
> AfterActio
> n(Je
> > tspeedTemplatePage.java:178)
> > at
> >
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa
> ge.java:15
> 2)
> > at org.apache.turbine.modules.Page.build(Page.java:90)
> > at
> org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> > at org.apache.turbine.Turbine.doGet(Turbine.java:447)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandl
> er.java:50
> 0)
> > at org.apache.tomcat.core.Handler.service(Handler.java:223)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler
> .java:448)
> > at
> >
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Reque
> stDispatch
> erIm
> > pl.java:252)
> > at
> >
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(Request
> Dispatcher
> Impl
> > .java:172)
> > at
> >
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextI
> mpl.java:4
> 20)
> > at index_1._jspService(index_1.java:51)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandl
> er.java:50
> 0)
> > at org.apache.tomcat.core.Handler.service(Handler.java:223)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler
> .java:448)
> > at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextM
> anager.jav
> a:78
> > 8)
> > at
> >
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)
> > at
> >
> org.apache.tomcat.modules.server.Http10Interceptor.processConn
> ection(Htt
> p10I
> > nterceptor.java:143)
> > at
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:42
> 4)
> > at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool
> .jav
> > a:497)
> > at java.lang.Thread.run(Thread.java:475)
> >
> > [Mon Jun 18 08:05:20 GMT+02:00 2001] -- INFO --
> JetspeedJspLayout: set
> > response content type to text/html
> > [Mon Jun 18 08:05:20 GMT+02:00 2001] -- INFO --
> JetspeedJspLayout: set
> > 'screenJSP' to: /WEB-INF/templates/jsp/screensError
> > [Mon Jun 18 08:05:20 GMT+02:00 2001] -- INFO -- JetspeedJspLayout:
> forward
> > request to: /layouts/default.jsp
> > [Mon Jun 18 08:05:20 GMT+02:00 2001] -- ERROR -- Template
> > /layouts/default.jsp not found in template paths
> > Exception:
> org.apache.turbine.util.TurbineException: Template
> > /layouts/default.jsp not found in template paths
> > Stack Trace follows:
> > org.apache.turbine.util.TurbineException: Template
> > /layouts/default.jsp not found in template paths
> > at
> >
> org.apache.turbine.services.jsp.TurbineJspService.handleReques
> t(TurbineJ
> spSe
> > rvice.java:172)
> > at
> >
> org.apache.jetspeed.modules.layouts.JetspeedJspLayout.doBuild(
> JetspeedJs
> pLay
> > out.java:101)
> > at org.apache.turbine.modules.Layout.build(Layout.java:91)
> > at
> > org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:123)
> > at
> >
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa
> ge.java:16
> 6)
> > at org.apache.turbine.modules.Page.build(Page.java:90)
> > at
> org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> > at
> org.apache.turbine.Turbine.handleException(Turbine.java:591)
> > at org.apache.turbine.Turbine.doGet(Turbine.java:501)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandl
> er.java:50
> 0)
> > at org.apache.tomcat.core.Handler.service(Handler.java:223)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler
> .java:448)
> > at
> >
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Reque
> stDispatch
> erIm
> > pl.java:252)
> > at
> >
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(Request
> Dispatcher
> Impl
> > .java:172)
> > at
> >
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextI
> mpl.java:4
> 20)
> > at index_1._jspService(index_1.java:51)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandl
> er.java:50
> 0)
> > at org.apache.tomcat.core.Handler.service(Handler.java:223)
> > at
> >
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler
> .java:448)
> > at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextM
> anager.jav
> a:78
> > 8)
> > at
> >
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)
> > at
> >
> org.apache.tomcat.modules.server.Http10Interceptor.processConn
> ection(Htt
> p10I
> > nterceptor.java:143)
> > at
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:42
> 4)
> > at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool
> .jav
> > a:497)
> > at java.lang.Thread.run(Thread.java:475)
> >
> > Thanks so far
> >
> > J.Berger
> > -----Urspr�ngliche Nachricht-----
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]
> > Gesendet: Samstag, 16. Juni 2001 10:50
> > An: [EMAIL PROTECTED]
> > Betreff: Re: JetspeedProfilerService
> >
> >
> > "Berger, Jochen" wrote:
> > >
> > > Hello Out There,
> > >
> > > I have problems in running the current CVS version on Linux, the
> > > JetspeedProfilerService always calculates "null" when
> trying to find
> the
> > > right template. Under WinNT everything works fine.
> > >
> >
> > Can you try to run Jetspeed with DEBUG logging level and send the
> relevant
> > jetspeed.log extract to the list ?
> >
> > --
> > Rapha�l Luta - [EMAIL PROTECTED]
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]