You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/02/21 17:25:21 UTC

[C2] Trying to use Context class names

I get the following output when I try to create a compiled page at the root context.  Anyone
know what is going on?  The only change I made to ProgramGeneratorImpl is

===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java,v
retrieving revision 1.1.2.33
diff -r1.1.2.33 ProgramGeneratorImpl.java
73a74,76
>     /** The context root */
>     protected String rootPath;
> 
82a86
>            this.rootPath = (String) context.get(Constants.CONTEXT_ROOT_PATH);
137c141,142
<         String normalizedName = IOUtils.normalizedFilename(filename);
---
>         String contextFilename = IOUtils.getContextFilePath(this.rootPath, filename);
>         String normalizedName = IOUtils.normalizedFilename(contextFilename);

===================================================================
Cocoon.log

ERROR   6199    [cocoon  ] (Thread-24): CocoonComponentSelector Could not find component for hint '_sitemap_xmap'.
DEBUG   6219    [cocoon  ] (Thread-24): The instance was not accessible, creating it now.
ERROR   6389    [cocoon  ] (Thread-24): Error compiling sitemap
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:965)

	at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)

	at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)

	at org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.generateCode(LogicsheetCodeGenerator.java:131)

	at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.generateCode(AbstractMarkupLanguage.java:259)

	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:198)

	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:156)

	at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)

	at java.lang.Thread.run(Thread.java:484)

Re: [C2] Trying to use Context class names

Posted by Berin Loritsch <bl...@apache.org>.
Paul Russell wrote:
> 
> * Berin Loritsch (bloritsch@apache.org) wrote :
> > I get the following output when I try to create a compiled page at the
> > root context.  Anyone know what is going on?  The only change I made
> > to ProgramGeneratorImpl is
> 
> Looks like Xerces is swallowing an exception and refilling its stack
> trace before the rethrow, which is 'handy'. What's the next thing in the
> parse pipeline? I used to track this kind of thing down by catching
> anything throwable immediately inside the next level of the pipeline.
> Almost wonder if we should have a transformer for that, not that it
> would help in this situation, obviously.

As long as we have a prefix, we are happy!

> 
> Paul.
> --
> Paul Russell                                 Email:   paul@luminas.co.uk
> Technical Director                             Tel:  +44 (0)20 8553 6622
> Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
> This is not an official statement or order.    Web:    www.luminas.co.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Re: [C2] Trying to use Context class names

Posted by Paul Russell <pa...@luminas.co.uk>.
* Berin Loritsch (bloritsch@apache.org) wrote :
> I get the following output when I try to create a compiled page at the
> root context.  Anyone know what is going on?  The only change I made
> to ProgramGeneratorImpl is

Looks like Xerces is swallowing an exception and refilling its stack
trace before the rethrow, which is 'handy'. What's the next thing in the
parse pipeline? I used to track this kind of thing down by catching
anything throwable immediately inside the next level of the pipeline.
Almost wonder if we should have a transformer for that, not that it
would help in this situation, obviously.


Paul.
-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk

Re: [C2] Trying to use Context class names

Posted by Conny Krappatsch <co...@smb-tec.com>.
On Wed, 21 Feb 2001 11:25:21 -0500
Berin Loritsch <bl...@apache.org> wrote:
> I get the following output when I try to create a compiled page at the
> root context.  Anyone
> know what is going on?  The only change I made to ProgramGeneratorImpl
> is

I looked at the Xerces and Cocoon sources, but couldn't find anything
helpful.

Looks like it comes from the sitemap logicsheet. I'm not shure, but I
think I had such IndexOutOfBounds in the past, as well,and I think it had
something to do with stylesheets.

I know this isn't much help, but maybe you changed something in the
logicsheet and missed a character or something like that (It was very
simple to fix, when I knew what it was.)

Damn, if I only could remember,
Sorry,

Conny

-- 
______________________________________________________________________
Conny Krappatsch                              mailto:conny@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com