You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Conrad F. D'Cruz" <co...@netswirl.com> on 2002/04/26 05:45:28 UTC

Sub sitemap pains

Greetings all,

I am trying to solve all the mysteries of the universe ... but I first
wanted to conquer
sub sitemaps!!! and I could use some collective wisdom of this list on
this ....

I got an example of an XSL and XML working in the main sitemap but
decided
to get elegant and moved the pipeline to the sub sitemap in the
sub-directory.

the directory structure is cocoon --> c2 --> vcard

The main sitemap in /cocoon (pipeline only shown below) now looks like
this:
   <map:pipeline>

     <map:match pattern="vcard/**">

        <map:mount uri-prefix="vcard"
                 check-reload="yes"
                 reload-method="synchron"
                 src="c2/vcard/sitemap.xmap"/>

        <map:mount uri-prefix="vcard/**"
                 check-reload="yes"
                 reload-method="synchron"
                 src="c2/vcard/sitemap.xmap"/>
     </map:match>
   </map:pipeline>

Note:  I have also tried ... src="c2/vcard/"
without the sitemap.xmap explicityly specified

*************************************
the sub sitemap in vcard is shown below
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="">
        <map:generate src="documents/vcard.xml"/>
        <map:transform src="stylesheets/vcard_one.xsl"/>
        <map:serialize type="html"/>
      </map:match>
   </map:pipeline>
 </map:pipelines>

This worked perfectly when the pipeline was in the main sitemap
*************************************

Now in the browser I am getting the following fatal error

--------------------------------------------------------------------------------

type fatal

message Language Exception

description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Could not load
class for program 'org\apache\cocoon\www\sitemap_xmap' due to a
java.lang.ClassNotFoundException: org.apache.cocoon.www.sitemap_xmap

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/vcard

path-info

vcard
********************

In the Tomcat shell window I am getting the following exception

java.lang.RuntimeException: Stylesheet directed termination at
org.apache.xalan.transformer.TransformerImpl.run
(TranformerImpl.java:3174) at java.lang.Thread.run(Unknown source)

**********************

I have looked at the FAQ and have tried the suggestions from the
userdocs.

I had seen an archived message that suggested to some other person
with the same problem that the problem should be at line 3174 of
sitemap_xmap.java ...
There weren't that many lines in that file and I could not locate
TransformerImpl.java.

Nothing seems to work and I am at my wits end.

Any suggestions would help.

Thanks
Conrad








---------------------------------------------------------------------
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: Closure and feedback ... Re: Sub sitemap pains

Posted by Erwin <er...@supermachien.kotnet.org>.
On Fri, 26 Apr 2002, Conrad F. D'Cruz wrote:

> One area of confusion is the use of the "*" and "**" ... is it just my
> imagination
> that * in a sitemap does not mean the same as * in a regular expression
> (expands
> to match zero or more characters???) ... there used to be a page that
> described that
> it has moved and I cannot find it.
>
You can find it here:
http://xml.apache.org/cocoon/userdocs/matchers/matchers.html



---------------------------------------------------------------------
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>


Closure and feedback ... Re: Sub sitemap pains

Posted by "Conrad F. D'Cruz" <co...@netswirl.com>.
Greetings all,

Thank you both .. Vadim and Erwin for pointing me in the right direction.

After careful study of both sitemaps I found the following ...

the sub-sitemap (in vcard) was missing one component

<map:selectors default="browser"/>

I guess it was cut and paste that proved to be my nemesis ... and also
staring at a monitor for 19 hours at a stretch ...

... I added the missing line in the sitemap  ... and everything started
working fine.

One area of confusion is the use of the "*" and "**" ... is it just my
imagination
that * in a sitemap does not mean the same as * in a regular expression
(expands
to match zero or more characters???) ... there used to be a page that
described that
it has moved and I cannot find it.

Anyway ... Cocoon is behaving now and life is good !!

Now it is on to bigger and better (i.e. more complicated) sub-sitemaps

Thanks again ...
Conrad


Vadim Gritsenko wrote:

> > From: Conrad F. D'Cruz [mailto:conrad.dcruz@netswirl.com]
> >
> >
> >
> > Erwin wrote:
> >
> > > On Thu, 25 Apr 2002, Conrad F. D'Cruz wrote:
> > > >
> > > >      <map:match pattern="vcard/**">
> > > >
> > > >         <map:mount uri-prefix="vcard"
> > > >                  check-reload="yes"
> > > >                  reload-method="synchron"
> > > >                  src="c2/vcard/sitemap.xmap"/>
> > > >
> > > >         <map:mount uri-prefix="vcard/**"
> > > >                  check-reload="yes"
> > > >                  reload-method="synchron"
> > > >                  src="c2/vcard/sitemap.xmap"/>
> > > >      </map:match>
> > > >    </map:pipeline>
> > > >
> > > Try with one map:mount element under map:match, i.e. comment out or
> remove
> > > the second one.
> >
> > That's what I started out with .... and thought I needed the other
> one.
> > I went ahead and commented it out as directed.
> >
>
> Uncomment last mount, remove first one. Log file should have a reason
> logged.
>
> Vadim
>
> ---------------------------------------------------------------------
> 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: Sub sitemap pains

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Conrad F. D'Cruz [mailto:conrad.dcruz@netswirl.com]
> 
> 
> 
> Erwin wrote:
> 
> > On Thu, 25 Apr 2002, Conrad F. D'Cruz wrote:
> > >
> > >      <map:match pattern="vcard/**">
> > >
> > >         <map:mount uri-prefix="vcard"
> > >                  check-reload="yes"
> > >                  reload-method="synchron"
> > >                  src="c2/vcard/sitemap.xmap"/>
> > >
> > >         <map:mount uri-prefix="vcard/**"
> > >                  check-reload="yes"
> > >                  reload-method="synchron"
> > >                  src="c2/vcard/sitemap.xmap"/>
> > >      </map:match>
> > >    </map:pipeline>
> > >
> > Try with one map:mount element under map:match, i.e. comment out or
remove
> > the second one.
> 
> That's what I started out with .... and thought I needed the other
one.
> I went ahead and commented it out as directed.
> 

Uncomment last mount, remove first one. Log file should have a reason
logged.

Vadim


---------------------------------------------------------------------
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: Sub sitemap pains

Posted by "Conrad F. D'Cruz" <co...@netswirl.com>.

Erwin wrote:

> On Thu, 25 Apr 2002, Conrad F. D'Cruz wrote:
> >
> >      <map:match pattern="vcard/**">
> >
> >         <map:mount uri-prefix="vcard"
> >                  check-reload="yes"
> >                  reload-method="synchron"
> >                  src="c2/vcard/sitemap.xmap"/>
> >
> >         <map:mount uri-prefix="vcard/**"
> >                  check-reload="yes"
> >                  reload-method="synchron"
> >                  src="c2/vcard/sitemap.xmap"/>
> >      </map:match>
> >    </map:pipeline>
> >
> Try with one map:mount element under map:match, i.e. comment out or remove
> the second one.

That's what I started out with .... and thought I needed the other one.
I went ahead and commented it out as directed.

> > Note:  I have also tried ... src="c2/vcard/"
> > without the sitemap.xmap explicityly specified
> >
> [stuff deleted for space]>
> > This worked perfectly when the pipeline was in the main sitemap
> > *************************************
> >
> Have you also specified the following in the subsitemap:
>
> <map:components>
>   <map:generators default="file"/>
>   <map:transformers default="xslt"/>
>   <map:serializers default="html"/>
>   <map:selectors default="browser"/>
>   <map:matchers default="wildcard"/>
>   <map:readers default="resource"/>
> </map:components>

> This is the minimal of components you should specify in every subsitemap.

I just did not want to clutter the message so I only cut and pasted
the pipeline ... and the and the answer is yes ... the main sitemap
in (webapps/cocoon) does have the details of all the components and
the sub sitemap in webapps/cocoon/c2/vcard does have the
minimal list shown above.

> > Now in the browser I am getting the following fatal error
> >
> <snip/>
> >
> > In the Tomcat shell window I am getting the following exception
> >
> <snip/>
>
> What do the logs say?
> They are located in $TOMCAT_HOME/webapps/cocoon/WEB-INF/logs/

(/cocoon/vcard) HttpProcessor [8080][4] RuntimeException with the following
detail
org.apache.cocoon.environment.AbstractEnvironment.changecontext

"The current URI does not start with given prefix" /cocoon/vcard


Note: the uri I was using http://localhost:8080/cocoon/vcard

Conrad


---------------------------------------------------------------------
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: Sub sitemap pains

Posted by Erwin <er...@supermachien.kotnet.org>.
On Thu, 25 Apr 2002, Conrad F. D'Cruz wrote:

> Greetings all,
>
> I am trying to solve all the mysteries of the universe ... but I first
> wanted to conquer
> sub sitemaps!!! and I could use some collective wisdom of this list on
> this ....
>
> the directory structure is cocoon --> c2 --> vcard
>
> The main sitemap in /cocoon (pipeline only shown below) now looks like
> this:
>    <map:pipeline>
>
>      <map:match pattern="vcard/**">
>
>         <map:mount uri-prefix="vcard"
>                  check-reload="yes"
>                  reload-method="synchron"
>                  src="c2/vcard/sitemap.xmap"/>
>
>         <map:mount uri-prefix="vcard/**"
>                  check-reload="yes"
>                  reload-method="synchron"
>                  src="c2/vcard/sitemap.xmap"/>
>      </map:match>
>    </map:pipeline>
>
Try with one map:mount element under map:match, i.e. comment out or remove
the second one.

> Note:  I have also tried ... src="c2/vcard/"
> without the sitemap.xmap explicityly specified
>
> *************************************
> the sub sitemap in vcard is shown below
>   <map:pipelines>
>     <map:pipeline>
>       <map:match pattern="">
>         <map:generate src="documents/vcard.xml"/>
>         <map:transform src="stylesheets/vcard_one.xsl"/>
>         <map:serialize type="html"/>
>       </map:match>
>    </map:pipeline>
>  </map:pipelines>
>
> This worked perfectly when the pipeline was in the main sitemap
> *************************************
>
Have you also specified the following in the subsitemap:

<map:components>
  <map:generators default="file"/>
  <map:transformers default="xslt"/>
  <map:serializers default="html"/>
  <map:selectors default="browser"/>
  <map:matchers default="wildcard"/>
  <map:readers default="resource"/>
</map:components>

This is the minimal of components you should specify in every subsitemap.

> Now in the browser I am getting the following fatal error
>
<snip/>
>
> In the Tomcat shell window I am getting the following exception
>
<snip/>

What do the logs say?
They are located in $TOMCAT_HOME/webapps/cocoon/WEB-INF/logs/



---------------------------------------------------------------------
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>