You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jakob Fix <ja...@gmail.com> on 2005/10/27 14:08:12 UTC

Existing XSP "not found" by Cocoon (only on Linux)

Hello,

I'm having a weird problem porting a web application to Linux.  The
application itself consists of Java 1.5 / Jetty / Cocoon 2.1.7 / Exist
XML database.  It was developped in a Windows environment, but now we
want to deploy it on a Linux server.  Almost everything went very
well, it's Java after all.

However, one persisting problem I have is this:  Cocoon appears to not
be able to compile one of the two XSP pages saying that it can't be found,
although it absolutely positively exists at the location indicated
(see attached core.log and access.log extracts).

I've added the tools.jar to my jre's lib/ directory because I read on
the cocoon website its absence may not allow to compile certain
jsp/xsp pages.  However, I have two XSP pages of which one functions
correctly while the other one cannot apparently be found and thus
compiled.

I've tested this on another Linux server (also Debian) with the same results.

I'm not really sure what other information I should provide (is the
actual XSP code interesting?).

This problem really puzzles me.  Any help is greatly appreciated.

--
cheers,
Jakob.



core.log ---------8<---------8<---------8<---------8<---------

INFO    (2005-10-27) 13:56.04:386 [core.program-generator]
(/dy/highlight/bv/rules/en_2005/doc/n00010001000100020004.xml)
        SocketListener0-1/ProgramGeneratorImpl: The serverpage
[file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
] could not be preloaded, will be re-created
(org.apache.cocoon.components.language.LanguageException: Unable to
preload program org/webapp/__/search/highlight_xsp_:
org.apache.cocoon.components.language.LanguageException: Could not
load class for program 'org/webapp/__/search/highlight_xsp_' due to a
java.lang.ClassNotFoundException: org.webapp.__.search.highlight_xsp_)
INFO    (2005-10-27) 13:56.04:567 [core.program-generator]
(/dy/highlight/bv/rules/en_2005/doc/n00010001000100020004.xml)
        SocketListener0-1/ProgramGeneratorImpl: The serverpage
[file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
] could not be preloaded, will be re-created
(org.apache.cocoon.components.language.LanguageException: Unable to
preload program org/webapp/__/search/highlight_xsp_:
org.apache.cocoon.components.language.LanguageException: Could not
load class for program 'org/webapp/__/search/highlight_xsp_' due to a
java.lang.ClassNotFoundException: org.webapp.__.search.highlight_xsp_)
INFO    (2005-10-27) 13:56.04:953 [core.program-generator]
(/dy/highlight/bv/rules/en_2005/ext/n00010001000100020004000100040003.xml)
        SocketListener0-1/ProgramGeneratorImpl: The serverpage
[file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
] could not be preloaded, will be re-created
(org.apache.cocoon.components.language.LanguageException: Unable to
preload program org/webapp/__/search/highlight_xsp_:
org.apache.cocoon.components.language.LanguageException: Could not
load class for program 'org/webapp/__/search/highlight_xsp_' due to a
java.lang.ClassNotFoundException: org.webapp.__.search.highlight_xsp_)


access.log ---------8<---------8<---------8<---------8<---------

WARN    (2005-10-27) 13:56.04:392 [access]
(/dy/highlight/bv/rules/en_2005/doc/n00010001000100020004.xml)
        SocketListener0-1/CocoonServlet: The resource was not found
org.apache.cocoon.ResourceNotFoundException: Resource not found.:
org.apache.excalibur.source.SourceNotFoundException:
file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
 doesn't exist.
	at org.apache.cocoon.components.source.SourceUtil.handle(SourceUtil.java:403)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:174)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:100)
	at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:139)
	at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:343)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateSourcecode(ProgramGeneratorImpl.java:436)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:275)
	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:170)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:385)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:620)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:503)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:455)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:405)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:472)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1457)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1409)
	at org.mortbay.http.HttpServer.service(HttpServer.java:889)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:829)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:998)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:846)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:345)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:530)
Caused by: org.apache.excalibur.source.SourceNotFoundException:
file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
 doesn't exist.
	at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:169)
	... 56 more
Caused by: java.io.FileNotFoundException:
/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
 (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)
	... 57 more
org.apache.excalibur.source.SourceNotFoundException:
file:/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
 doesn't exist.
	at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:169)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:100)
	at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:139)
	at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:343)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateSourcecode(ProgramGeneratorImpl.java:436)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:275)
	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:170)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:385)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:620)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:503)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:455)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:405)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:472)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1457)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1409)
	at org.mortbay.http.HttpServer.service(HttpServer.java:889)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:829)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:998)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:846)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:345)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:530)
Caused by: java.io.FileNotFoundException:
/var/www/dynaprism/lib/exist/webapp/../../../webapp/./search/highlight.xsp
 (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)
	... 57 more

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


Re: Existing XSP "not found" by Cocoon (only on Linux)

Posted by Lars Huttar <la...@sil.org>.
Jakob Fix wrote:

>Hello,
>
>I'm having a weird problem porting a web application to Linux.  The
>application itself consists of Java 1.5 / Jetty / Cocoon 2.1.7 / Exist
>XML database.  It was developped in a Windows environment, but now we
>want to deploy it on a Linux server.  Almost everything went very
>well, it's Java after all.
>
>However, one persisting problem I have is this:  Cocoon appears to not
>be able to compile one of the two XSP pages saying that it can't be found,
>although it absolutely positively exists at the location indicated
>(see attached core.log and access.log extracts).
>
>I've added the tools.jar to my jre's lib/ directory because I read on
>the cocoon website its absence may not allow to compile certain
>jsp/xsp pages.  However, I have two XSP pages of which one functions
>correctly while the other one cannot apparently be found and thus
>compiled.
>
>I've tested this on another Linux server (also Debian) with the same results.
>
>I'm not really sure what other information I should provide (is the
>actual XSP code interesting?).
>
>This problem really puzzles me.  Any help is greatly appreciated.
>
>--
>cheers,
>Jakob.
>
>
>  
>
I haven't looked at your details or log, but the problem sounds like one 
we had, based on case sensitivity issues:
The compiled XSP page exists but has the wrong casing; the piece of 
Cocoon thath would compile missing files case-insensitively recognizes 
its presence and therefore doesn't recompile it, but the piece of Cocoon 
that would execute the compile file case-sensitively declares it's not 
there. (The casing of the compiled file was wrong because we had changed 
the casing of the xsp file after having it compiled once; Cocoon was 
never able to handle that.)
This problem could be affected by having developed on Windows (which has 
more case insensitivity) and run on Linux.

We solved the problem under Tomcat by deleting the work/ folder, forcing 
a recompile of all XSP pages. Sounds like you would do this by deleting

/var/www/dynaprism/lib/exist/tools/jetty/work


If that doesn't help, let us know...

HTH,
Lars



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


Re: Existing XSP "not found" by Cocoon (only on Linux)

Posted by Jakob Fix <ja...@gmail.com>.
Lars,

thanks for your reply.  It's been quite some time, but I still have
the problem I described originally.  The most astonishing is that out
of two XSP pages, one ("search.xsp") is compiled correctly, while the
other one ("highlight.xsp") is not.

Although we had some problems with case sensitivity when moving from
Windows to Linux, this was unrelated to the XSP pages (some javascript
files were named using CamelCase, but called using simple
Capitalcase).

The temporary directory for Cocoon's compiled XSP pages on the Linux
machine is:
/tmp/Jetty__8080__/cocoon-files/org/webapp/__/search/

BTW, where is this temporary directory configured?

Currently, it contains only the search_xsp.class and search_xsp.java
files.  I tried to manually copy the two corresponding
highlight_xsp.(java,class) files from the Windows to this directory,
however they disappeared almost instantly when trying to access the
XSP page.

The two XSP pages are quite similar.  I can attach them if this would
help to analyse the problem.


On 04/11/05, Lars Huttar <la...@sil.org> wrote:
> Jakob Fix wrote:
>
> >Hello,
> >
> >I'm having a weird problem porting a web application to Linux.  The
> >application itself consists of Java 1.5 / Jetty / Cocoon 2.1.7 / Exist
> >XML database.  It was developped in a Windows environment, but now we
> >want to deploy it on a Linux server.  Almost everything went very
> >well, it's Java after all.
> >
> >However, one persisting problem I have is this:  Cocoon appears to not
> >be able to compile one of the two XSP pages saying that it can't be found,
> >although it absolutely positively exists at the location indicated
> >(see attached core.log and access.log extracts).
> >
> >I've added the tools.jar to my jre's lib/ directory because I read on
> >the cocoon website its absence may not allow to compile certain
> >jsp/xsp pages.  However, I have two XSP pages of which one functions
> >correctly while the other one cannot apparently be found and thus
> >compiled.
> >
> >I've tested this on another Linux server (also Debian) with the same results.
> >
> >I'm not really sure what other information I should provide (is the
> >actual XSP code interesting?).
> >
> >This problem really puzzles me.  Any help is greatly appreciated.
> >
[snip]
> >
> I haven't looked at your details or log, but the problem sounds like one
> we had, based on case sensitivity issues:
> The compiled XSP page exists but has the wrong casing; the piece of
> Cocoon thath would compile missing files case-insensitively recognizes
> its presence and therefore doesn't recompile it, but the piece of Cocoon
> that would execute the compile file case-sensitively declares it's not
> there. (The casing of the compiled file was wrong because we had changed
> the casing of the xsp file after having it compiled once; Cocoon was
> never able to handle that.)
> This problem could be affected by having developed on Windows (which has
> more case insensitivity) and run on Linux.
>
> We solved the problem under Tomcat by deleting the work/ folder, forcing
> a recompile of all XSP pages. Sounds like you would do this by deleting
>
> /var/www/dynaprism/lib/exist/tools/jetty/work
>
>
> If that doesn't help, let us know...

I'm doing it right now :-)  Thanks.

--
cheers,
Jakob.

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