cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject found the cause of Bug #5060 build docs
Date Tue, 27 Nov 2001 08:51:59 GMT
I have isolated the cause of the Bug. It looks like it will
be easy to fix :-) though it will need someone else to do it.

As described in Bugzilla - here is a summary ...
Everything works fine with the entity resolver when Cocoon
is running as a webapp.
However, when running as commandline context while doing
"build docs" the entity resolver delivers strange system Identifiers
(problem with file://) and then the subsequent messages "Failed
to create InputSource". (To make it more complex, this only
happens on UNIX-based platforms.)

Below i have extracted snippets from two log files. The first is
from "build docs". The second is from running Cocoon as a
webapp under Tomcat. Note the last line of each snippet.
This is where the filesystem path for the catalog is constructed
in components/resolver/ and then the catalog
is loaded by the entity resolver. Note that in the build docs case,
there is a relative pathname and in the webapp case there is a
full pathname.

Apparently the entity resolver does not like loading catalogs
using a relative pathname. This can be proven by hacking (around line #98) and using a hard-coded
path to the catalog. The entity resolver loads its catalog properly
and build docs proceeds properly.

So it seems that there is inconsistency when using getResource()
String catalogFile = params.getParameter("catalog",
String catalogURL = this.context.getResource(catalogFile).toExternalForm();

There must be a reliable way to get the full filesystem
pathname in both situations, but i cannot see how.

This snippet is from "build docs" ...
DEBUG   10068   [        ] (): ComponentFactory creating new instance of 
DEBUG   10068   [        ] (): Looking up 
DEBUG   10068   [        ] (): ComponentFactory creating new instance of 
DEBUG   10068   [        ] (): Setting Catalog verbosity level to 2
DEBUG   10068   [        ] (): catalogFille=/resources/entities/catalog
DEBUG   10068   [        ] (): CommandlineContext: 
DEBUG   10068   [        ] (): System Catalog URL is 

This snippet is from running as webapp under TomCat ...
DEBUG   (2001-11-27) 16:36.14:778   [cocoon  ] (Unknown-URI) 
Unknown-thread/DefaultComponentFactory: ComponentFactory creating new 
instance of org.apache.cocoon.components.resolver.ResolverImpl.
DEBUG   (2001-11-27) 16:36.14:780   [cocoon  ] (Unknown-URI) 
Unknown-thread/DefaultComponentFactory: no logger attribute available, using 
standard logger
DEBUG   (2001-11-27) 16:36.14:849   [cocoon  ] (Unknown-URI) 
Unknown-thread/ResolverImpl: Setting Catalog verbosity level to 2
DEBUG   (2001-11-27) 16:36.14:851   [cocoon  ] (Unknown-URI) 
Unknown-thread/ResolverImpl: catalogFile=/resources/entities/catalog
DEBUG   (2001-11-27) 16:36.14:855   [cocoon  ] (Unknown-URI) 
Unknown-thread/ResolverImpl: System Catalog URL is 

To unsubscribe, e-mail:
For additional commands, email:

View raw message