You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Neuenschwander <an...@andi.ch> on 2001/06/21 10:58:10 UTC
Re: HostSelector broken (Sitemap Issue)
> > It seems that the HostSelector sitemap component is broken.
> > With my previous version of cocoon (2.0a7) it worked fine.
> >
> > Can someone fix this problem?
>
> A patch would be appreciated.
>
> Giacomo
>
I seems that the HostSelector sitemap component works fine.
I found only a an error in the Javadoc comment. A patch for this is applied.
The sitemap won't compile when I insert the following statements in the
sitemap.xmap:
<map:pipeline>
...
<map:select type="host">
<map:when test="mydomain.com">
do something here...
</map:when>
<map:otherwise>
do something else here...
</map:otherwise>
</map:select>
...
</map:pipeline>
I don't know much about the internals of sitemap compilation.
> > org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
It looks like the <map:when> function is broken not the
HostSelectorComponent.
> > --------------------------
> >
> > type internal-server-error
> >
> > message Exception in Handler
> >
> > description org.apache.cocoon.ProcessingException: Exception in
> > Handler:org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap: Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected. if (hostSelect(selector_host_N15E_expr, objectModel,
> > emptyParam)) { ^
> >
> > sender org.apache.cocoon.servlet.CocoonServlet
> >
> > source Cocoon servlet
> >
> > request-uri
> >
> > /
> >
> > embedded exception
> >
> > org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> >
> > embedded exception stacktrace
> >
> > org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > ogramGeneratorImpl.java:162)
> > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > at java.lang.Thread.run(Thread.java:484)
> > org.apache.cocoon.components.language.LanguageException: Error compiling
> > sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> > at
> >
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
> > JavaLanguage.java:203)
> > at
> >
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
> > e.load(CompiledProgrammingLanguage.java:131)
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> > eResource(ProgramGeneratorImpl.java:250)
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > ogramGeneratorImpl.java:159)
> > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > at java.lang.Thread.run(Thread.java:484)
> >
> >
> > exception
> >
> > org.apache.cocoon.ProcessingException: Exception in
> > Handler:org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> >
> > path-info
> >
> >
> >
> > stacktrace
> >
> > org.apache.cocoon.ProcessingException: Exception in
> > Handler:org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> > at
> >
org.apache.cocoon.sitemap.Handler.throwEventualException(Handler.java:246)
> > at org.apache.cocoon.sitemap.Handler.regenerate(Handler.java:161)
> > at org.apache.cocoon.sitemap.Manager.getHandler(Manager.java:168)
> > at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:93)
> > at org.apache.cocoon.Cocoon.process(Cocoon.java:328)
> > at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:488)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
com.mortbay.HTTP.Handler.Servlet.ServletHolder.handle(ServletHolder.java:474
> > )
> > at
> >
com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:4
> > 30)
> > at
> >
com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:2
> > 86)
> > at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:1087)
> > at com.mortbay.HTTP.HttpServer.service(HttpServer.java:662)
> > at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:457)
> > at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:317)
> > at
com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:99)
> > at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:254)
> > at
com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:601)
> > at java.lang.Thread.run(Thread.java:484)
> > org.apache.cocoon.ProcessingException: Language
> > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > compiling sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > ogramGeneratorImpl.java:162)
> > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > at java.lang.Thread.run(Thread.java:484)
> > org.apache.cocoon.components.language.LanguageException: Error compiling
> > sitemap_xmap:
> > Line 0, column 0:
> > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > Type expected.
> > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > ^
> >
> > at
> >
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
> > JavaLanguage.java:203)
> > at
> >
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
> > e.load(CompiledProgrammingLanguage.java:131)
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> > eResource(ProgramGeneratorImpl.java:250)
> > at
> >
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > ogramGeneratorImpl.java:159)
> > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > at java.lang.Thread.run(Thread.java:484)
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
Re: HostSelector broken (Sitemap Issue)
Posted by giacomo <gi...@apache.org>.
On Thu, 21 Jun 2001, Andreas Neuenschwander wrote:
> > Andreas,
> >
> > FYI. I had no problem with the sitemap when i added a map:select with
> embedded map:when's......See
> > attached sitemap.xmap.
> >
> > Yes, i have checked in your patch for javadoc.
> >
> > Thanks,
> > dims
>
> Thanks a lot for your input dims,
>
> I tried your stylesheet and it worked.
>
> So my way to include HostSelector like this...
>
> <map:pipenline>
> <map:select type="host">
> <map:when test="mydomain">
>
> </map:when>
> </map:select>
> </map:pipeline>
>
> ...can't be compiled.
>
> This way it works:
>
> <map:pipeline>
> <map:match pattern="**">
> <map:select type="host">
> <map:when test="mydomain">
>
> </map:when>
> </map:select>
> </map:match>
> </map:pipeline>
>
>
> This means, map:select is only possible inside a map:match element?
>
> Is this behaviour correct?
Yes. The <map:pipeline> element can only have <map:match> elements as
children.
Giacomo
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: HostSelector broken (Sitemap Issue)
Posted by Davanum Srinivas <di...@yahoo.com>.
Giacomo,
Is this behavior correct?
Thanks,
dims
--- Andreas Neuenschwander <an...@andi.ch> wrote:
> > Andreas,
> >
> > FYI. I had no problem with the sitemap when i added a map:select with
> embedded map:when's......See
> > attached sitemap.xmap.
> >
> > Yes, i have checked in your patch for javadoc.
> >
> > Thanks,
> > dims
>
> Thanks a lot for your input dims,
>
> I tried your stylesheet and it worked.
>
> So my way to include HostSelector like this...
>
> <map:pipenline>
> <map:select type="host">
> <map:when test="mydomain">
>
> </map:when>
> </map:select>
> </map:pipeline>
>
> ...can't be compiled.
>
> This way it works:
>
> <map:pipeline>
> <map:match pattern="**">
> <map:select type="host">
> <map:when test="mydomain">
>
> </map:when>
> </map:select>
> </map:match>
> </map:pipeline>
>
>
> This means, map:select is only possible inside a map:match element?
>
> Is this behaviour correct?
>
>
> Andi
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: HostSelector broken (Sitemap Issue)
Posted by Andreas Neuenschwander <an...@andi.ch>.
> Andreas,
>
> FYI. I had no problem with the sitemap when i added a map:select with
embedded map:when's......See
> attached sitemap.xmap.
>
> Yes, i have checked in your patch for javadoc.
>
> Thanks,
> dims
Thanks a lot for your input dims,
I tried your stylesheet and it worked.
So my way to include HostSelector like this...
<map:pipenline>
<map:select type="host">
<map:when test="mydomain">
</map:when>
</map:select>
</map:pipeline>
...can't be compiled.
This way it works:
<map:pipeline>
<map:match pattern="**">
<map:select type="host">
<map:when test="mydomain">
</map:when>
</map:select>
</map:match>
</map:pipeline>
This means, map:select is only possible inside a map:match element?
Is this behaviour correct?
Andi
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: HostSelector broken (Sitemap Issue)
Posted by Davanum Srinivas <di...@yahoo.com>.
Andreas,
FYI. I had no problem with the sitemap when i added a map:select with embedded map:when's......See
attached sitemap.xmap.
Yes, i have checked in your patch for javadoc.
Thanks,
dims
--- Andreas Neuenschwander <an...@andi.ch> wrote:
> > > It seems that the HostSelector sitemap component is broken.
> > > With my previous version of cocoon (2.0a7) it worked fine.
> > >
> > > Can someone fix this problem?
> >
> > A patch would be appreciated.
> >
> > Giacomo
> >
>
> I seems that the HostSelector sitemap component works fine.
> I found only a an error in the Javadoc comment. A patch for this is applied.
>
> The sitemap won't compile when I insert the following statements in the
> sitemap.xmap:
>
> <map:pipeline>
> ...
> <map:select type="host">
> <map:when test="mydomain.com">
> do something here...
> </map:when>
> <map:otherwise>
> do something else here...
> </map:otherwise>
> </map:select>
> ...
> </map:pipeline>
>
> I don't know much about the internals of sitemap compilation.
>
> > > org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
>
> It looks like the <map:when> function is broken not the
> HostSelectorComponent.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > > --------------------------
> > >
> > > type internal-server-error
> > >
> > > message Exception in Handler
> > >
> > > description org.apache.cocoon.ProcessingException: Exception in
> > > Handler:org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap: Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected. if (hostSelect(selector_host_N15E_expr, objectModel,
> > > emptyParam)) { ^
> > >
> > > sender org.apache.cocoon.servlet.CocoonServlet
> > >
> > > source Cocoon servlet
> > >
> > > request-uri
> > >
> > > /
> > >
> > > embedded exception
> > >
> > > org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
> > >
> > >
> > > embedded exception stacktrace
> > >
> > > org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
> > >
> > > at
> > >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > > ogramGeneratorImpl.java:162)
> > > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > > at java.lang.Thread.run(Thread.java:484)
> > > org.apache.cocoon.components.language.LanguageException: Error compiling
> > > sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
> > >
> > > at
> > >
> org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
> > > JavaLanguage.java:203)
> > > at
> > >
> org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
> > > e.load(CompiledProgrammingLanguage.java:131)
> > > at
> > >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> > > eResource(ProgramGeneratorImpl.java:250)
> > > at
> > >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> > > ogramGeneratorImpl.java:159)
> > > at org.apache.cocoon.sitemap.Handler.run(Handler.java:214)
> > > at java.lang.Thread.run(Thread.java:484)
> > >
> > >
> > > exception
> > >
> > > org.apache.cocoon.ProcessingException: Exception in
> > > Handler:org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
> > >
> > >
> > > path-info
> > >
> > >
> > >
> > > stacktrace
> > >
> > > org.apache.cocoon.ProcessingException: Exception in
> > > Handler:org.apache.cocoon.ProcessingException: Language
> > > Exception:org.apache.cocoon.components.language.LanguageException: Error
> > > compiling sitemap_xmap:
> > > Line 0, column 0:
> > > /tmp/JettyContext36400.tmp/org/apache/cocoon/www/sitemap_xmap.java:1820:
> > > Type expected.
> > > if (hostSelect(selector_host_N15E_expr, objectModel, emptyParam)) {
> > > ^
> > >
> > > at
> > >
> org.apache.cocoon.sitemap.Handler.throwEventualException(Handler.java:246)
> > > at org.apache.cocoon.sitemap.Handler.regenerate(Handler.java:161)
> > > at org.apache.cocoon.sitemap.Manager.getHandler(Manager.java:168)
> > > at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:93)
> > > at org.apache.cocoon.Cocoon.process(Cocoon.java:328)
> > > at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:488)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
> com.mortbay.HTTP.Handler.Servlet.ServletHolder.handle(ServletHolder.java:474
> > > )
> > > at
> > >
> com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:4
> > > 30)
> > > at
> > >
> com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:2
> > > 86)
> > > at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:1087)
> > > at com.mortbay.HTTP.HttpServer.service(HttpServer.java:662)
> > > at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:457)
> > > at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:317)
> > > at
> com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:99)
> > > at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:254)
> > > at
> com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:601)
> > > at java.lang.Thread.run(Thread.java:484)
> > > org.apache.cocoon.ProcessingException: Language
>
=== message truncated ===> RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/selection/HostSelectorFactory.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 HostSelectorFactory.java
> --- HostSelectorFactory.java 2001/05/09 20:49:28 1.1.1.1
> +++ HostSelectorFactory.java 2001/06/21 08:54:33
> @@ -20,7 +20,7 @@
> * This class generates source code to implement a selector that
> * matches a string from within the host parameter of the HTTP request
> *
> - * <map:selector name="host" factory="org.apache.cocoon.selection.HostSelectorFactory">
> + * <map:selector name="host" src="org.apache.cocoon.selection.HostSelectorFactory">
> * <host name="uk-site" value="www.foo.co.uk"/>
> * </map:selector>
> *
>
>
> > ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/