forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: Forrest on OS/390 Unix System Services
Date Mon, 17 Mar 2003 12:20:37 GMT
On Mon, Mar 17, 2003 at 12:39:24PM +0100, Oliver Alth wrote:
> Hello,
> 1) When i am trying to turn validaten off, the following error is printed:
> Setup...FATAL_E 2003-03-17 11:23:30.260 [cocoon  ] (): Exception caught
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> trying to load configurations
>         at org.apache.cocoon.Cocoon.configure(
>         at org.apache.cocoon.Cocoon.initialize(
>         at org.apache.cocoon.Main.main(

Seems Cocoon is failing to parse an ASCII XML file
(org/apache/cocoon/cocoon.roles) contained in the Cocoon jar.

  p = (SAXParser)startupManager.lookup(SAXParser.ROLE);
  SAXConfigurationHandler b = new SAXConfigurationHandler();
  InputStream inputStream = ClassUtils.getResource("org/apache/cocoon/cocoon.roles").openStream();
  InputSource is = new InputSource(inputStream);
  p.parse(is, b);

I can't think why it doesn't like this.  If you run: 

jar xvf WEB-INF/lib/cocoon-20021226-vm1.3.jar org/apache/cocoon/cocoon.roles

And then examine cocoon.roles, is it ASCII?

> 2) This is the output when calling forrest with
> forrest -Dforrest.catalog.verbosity=10
> The same validation problem again. I tried to change the encoding of
> book-sample.xml to "ebcdic-cp-us" but that didn't change anything.

Well unless it *was* EBCDIC, that wouldn't help.

> And the DTD files don't have encoding tags ...

If the *.dtd files are saved as EBCDIC, then you'll need to add <?xml
encoding="ebcdic-cp-us"?> at the beginning of the files.

> 3.) I can avoid this problem NoClassDefFoundError for ant.jar if I do not
> convert them to jar. That will be no problem.

What do you mean, "convert them to jar"?

> 4.) I have just tried copying the dtd files in /schema/dtd to the /xdocs
> subdir of the template. Then, I got this message from forrest:
> validate-xdocs:
> /u/uni1/test/src/documentation/content/xdocs/book-cocoon-v10.dtd:1:1: The
> markup declarations contained or pointed to by the document type
> declaration must be well-formed.

Definitely sounds like the DTDs and/or XML files are saved in a format
other than what their XML declarations (<?xml ... encoding="..."?> state.
The rules for encoding are stated in the XML spec:

Basically, if no <?xml ...?> encoding declaration is made, UTF-8 is
assumed.  ASCII is a subset of UTF-8, so out the box, Forrest DTDs (which
lack the optional declaration) and XML files (which happen to have it)
should work.



> Thanks,
> Oliver

View raw message