You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Felix Röthenbacher <fe...@wyona.com> on 2005/11/30 17:40:32 UTC

Unclear error message: Resource not found.

Hi

When I try to load a resource that does not exists,
a "resource not found" error message is written to
the log file:

ERROR sitemap.handled-errors - Resource not found.
[...]

The log message specifies where and in which sitemap
matcher the error occurred, but it does not mention which
resource could not be retrieved. Is there a way
to get a hint which resource is missing?

Thanks

- Felix

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Unclear error message: Resource not found.

Posted by Felix Röthenbacher <fe...@wyona.com>.

Michael Wechner wrote:
> Josias Thoeny wrote:
> 
>> On Wed, 2005-11-30 at 17:40 +0100, Felix Röthenbacher wrote:
>>  
>>
>>> Hi
>>>
>>> When I try to load a resource that does not exists,
>>> a "resource not found" error message is written to
>>> the log file:
>>>
>>> ERROR sitemap.handled-errors - Resource not found.
>>> [...]
>>>
>>> The log message specifies where and in which sitemap
>>> matcher the error occurred, but it does not mention which
>>> resource could not be retrieved. Is there a way
>>> to get a hint which resource is missing?
>>>   
>>
>>
>> Please try the patch in the attachment.
>> (It's for Cocoon's SourceUtil class).
>> I think it's not the only place with this message, but maybe we're
>> lucky...
>>  
>>
> 
> Felix, did this fix your problem? I think we should propose this
> as a minor enhancement for Cocoon. If the Cocoon devs agree, then
> I could check it into Cocoon.

Yes, thanks Josias! I think contributing it to cocoon would be a good
idea.

- Felix

> 
> WDYT?
> 
> Michi
> 
>> hth,
>> Josias
>>
>>
>>  
>>
>>> Thanks
>>>
>>> - Felix
>>>   
>>
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> Index: src/java/org/apache/cocoon/components/source/SourceUtil.java
>> ===================================================================
>> --- src/java/org/apache/cocoon/components/source/SourceUtil.java    
>> (revision 345236)
>> +++ src/java/org/apache/cocoon/components/source/SourceUtil.java    
>> (working copy)
>> @@ -450,7 +450,7 @@
>>      */
>>     static public ProcessingException handle(SourceException se) {
>>         if (se instanceof SourceNotFoundException) {
>> -            return new ResourceNotFoundException("Resource not 
>> found.", se);
>> +            return new ResourceNotFoundException("Resource not found: 
>> "+se.getMessage(), se);
>>         }
>>         return new ProcessingException("Exception during source 
>> resolving.",
>>                                        se);
>>
>>  


-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Unclear error message: Resource not found.

Posted by Michael Wechner <mi...@wyona.com>.
Josias Thoeny wrote:

>On Wed, 2005-11-30 at 17:40 +0100, Felix Röthenbacher wrote:
>  
>
>>Hi
>>
>>When I try to load a resource that does not exists,
>>a "resource not found" error message is written to
>>the log file:
>>
>>ERROR sitemap.handled-errors - Resource not found.
>>[...]
>>
>>The log message specifies where and in which sitemap
>>matcher the error occurred, but it does not mention which
>>resource could not be retrieved. Is there a way
>>to get a hint which resource is missing?
>>    
>>
>
>Please try the patch in the attachment.
>(It's for Cocoon's SourceUtil class).
>I think it's not the only place with this message, but maybe we're
>lucky...
>  
>

Felix, did this fix your problem? I think we should propose this
as a minor enhancement for Cocoon. If the Cocoon devs agree, then
I could check it into Cocoon.

WDYT?

Michi

>hth,
>Josias
>
>
>  
>
>>Thanks
>>
>>- Felix
>>    
>>
>
>  
>
>------------------------------------------------------------------------
>
>Index: src/java/org/apache/cocoon/components/source/SourceUtil.java
>===================================================================
>--- src/java/org/apache/cocoon/components/source/SourceUtil.java	(revision 345236)
>+++ src/java/org/apache/cocoon/components/source/SourceUtil.java	(working copy)
>@@ -450,7 +450,7 @@
>      */
>     static public ProcessingException handle(SourceException se) {
>         if (se instanceof SourceNotFoundException) {
>-            return new ResourceNotFoundException("Resource not found.", se);
>+            return new ResourceNotFoundException("Resource not found: "+se.getMessage(), se);
>         }
>         return new ProcessingException("Exception during source resolving.",
>                                        se);
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Unclear error message: Resource not found.

Posted by Josias Thoeny <jo...@wyona.com>.
On Wed, 2005-11-30 at 17:40 +0100, Felix Röthenbacher wrote:
> Hi
> 
> When I try to load a resource that does not exists,
> a "resource not found" error message is written to
> the log file:
> 
> ERROR sitemap.handled-errors - Resource not found.
> [...]
> 
> The log message specifies where and in which sitemap
> matcher the error occurred, but it does not mention which
> resource could not be retrieved. Is there a way
> to get a hint which resource is missing?

Please try the patch in the attachment.
(It's for Cocoon's SourceUtil class).
I think it's not the only place with this message, but maybe we're
lucky...

hth,
Josias


> 
> Thanks
> 
> - Felix
>