Colin Hall wrote:
> Hi Berin,
> I am in the process of upgrading to cocoon 2.0.1 and have discovered what I
> think is a problem in the latest version of
> AbstractComplementaryConfigurableAction.
>
> I noticed that the actions that I wrote were breaking when trying to load
> the descriptor.
> I use the file:///g:/some/file/named/foo.xml uri syntax to indicate the
> location of the descriptor (on Win32) which resulted in the following
> exception being thrown:
>
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> trying to load configurations for resource: null
>
> Looking at the AbstractComplementaryConfigurableAction code I noticed the
> following in getConfiguration:
> ...
> if (descriptor.startsWith("file:")) {
> resource =
> sourceHandler.getSource((Environment)resolver,((Environment)resolver).getCon
> text(), descriptor.substring(5));
> } else
> resource = sourceHandler.getSource(null, descriptor);
> ...
>
> Isn't this reverse of what it should be? This logic will resolve all file:
> uris to the webapp context rather than to an absolute path.
>
> I think that the code should read as follows...
>
> if (descriptor.startsWith("file:")) {
> resource = sourceHandler.getSource(null, descriptor);
> } else
> resource =
> sourceHandler.getSource((Environment)resolver,((Environment)resolver).getCon
> text(), descriptor.substring(5));
>
> Am I correct in this, or is there something that I am not considering here?
This is something for the Cocoon developer's list. I haven't been actively
developing Cocoon code for a while now (a little here and there), but nothing
like I used to. That change was done by someone else, and the problem might
be in the resolver code.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]