You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Tim Williams (JIRA)" <ji...@apache.org> on 2005/06/25 18:21:58 UTC
[jira] Created: (FOR-554) Error for missing documents is confusing
Error for missing documents is confusing
-----------------------------------------
Key: FOR-554
URL: http://issues.apache.org/jira/browse/FOR-554
Project: Forrest
Type: Bug
Components: Locationmap
Versions: 0.8-dev
Reporter: Tim Williams
Described at the top of this discussion:
http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
--tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (FOR-554) Error for missing documents is confusing
Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=all ]
Ross Gardler resolved FOR-554:
------------------------------
Fix Version: 0.8-dev
Resolution: Fixed
Applied to Locationmap branch. Thanks Tim.
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Fix For: 0.8-dev
> Attachments: for-554-workaround.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (FOR-554) Error for missing documents is confusing
Posted by "Tim Williams (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=all ]
Tim Williams updated FOR-554:
-----------------------------
Attachment: for-554.patch
This fixes site and tabs, it seems (at least right now) that I did the resources.xmap correctly.
With this patch, if tabs.xml and site.xml aren't resolveable in the locationmap it should be a more familiar file not found error.
--tim
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Attachments: for-554.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Tim Williams (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314630 ]
Tim Williams commented on FOR-554:
----------------------------------
Update:
After discussion here:
http://marc.theaimsgroup.com/?t=111996379000002&r=1&w=2
I went ahead and added a cocoon bugzilla report for it here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=35526
But then, as I describe here: http://marc.theaimsgroup.com/?l=forrest-dev&m=111996480100076&w=2 I think more robust location resolution error handling may be in order too.
--tim
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314598 ]
Ross Gardler commented on FOR-554:
----------------------------------
There may be a good reason why the FileGenerator behaves this wat, we will need to check with the Cocoon team.
My suggestion of the error handler was assuming that there *is* a good reason for this. However, as you say, it may be a workaround.
Your partial solution provided in the previous patch is a good start anyway, at least we don't get "access denied" errors with a log telling us a directory doesn't exist.
(you know thinking about the way that error is reported it does "feel" like a bug in Cocoon)
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314536 ]
Ross Gardler commented on FOR-554:
----------------------------------
I wonder if Cocoons error handlers can help in a more controllable way:
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Attachments: for-554.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Tim Williams (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314560 ]
Tim Williams commented on FOR-554:
----------------------------------
Only as a workaround, right? Or do you mean something else?
The problem has nothing (or at least very little) to do with locationmaps. It seems that the FileGenerator will take an empty string on its src attribute and resolve that to the root context instead of throwing a SourceNotFoundException. I'm not real sure if this is a cocoon "bug" or something that cocooners expect/depend on? Personally, I suspect that its a bug -- I suspect that they've coded as such to allow for relative paths to be resolved but didn't count for the case when an empty path (which shouldn't just get concatenated with the root) is passed -- but, i don't know.
Anyway, unlike the SourceExistsSelector where we had an integration point in code that we could account for that unique case on our end, this one is all in sitemaps and deep in Cocoon (and excalibur). The only place we could do something on our end would be throw a notfound exception of some sort on 'locate' in the locationmap. I don't think that's a good idea since one should be able to check for a locationmap entry without getting an exception thrown if it's not there. In my mind the "right" answer is for Cocoon to throw the proper exception when passed an empty string that tries to get resolved, but that may be my lack of cocoon knowledge coming through.
I can't get to the Excalibur svn right now to keep tracking it (i will once it comes back up) but wanted to throw this info out here in case someone that is cocoon smart can just tell me the right answer for this off the top of their head?
Thanks,
--tim
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Attachments: for-554.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (FOR-554) Error for missing documents is confusing
Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=all ]
Ross Gardler reassigned FOR-554:
--------------------------------
Assign To: Ross Gardler
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Attachments: for-554.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314597 ]
Ross Gardler commented on FOR-554:
----------------------------------
Patch applied to locationmap branch, thanks tim. (I've deleted the patch to avoid confusion)
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (FOR-554) Error for missing documents is confusing
Posted by "Tim Williams (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=all ]
Tim Williams updated FOR-554:
-----------------------------
Attachment: for-554-workaround.patch
This is the patch for the workaround as described:
http://marc.theaimsgroup.com/?l=forrest-dev&m=112018586411268&w=2
The majority of resources.xmap was okay since ImageReaders seem to give the proper error.
--tim
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Attachments: for-554-workaround.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (FOR-554) Error for missing documents is confusing
Posted by "Tim Williams (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/FOR-554?page=comments#action_12314534 ]
Tim Williams commented on FOR-554:
----------------------------------
With further testing it seems that this patch causes a new problem. It's going to take me some time to figure this one out I think. It works well when the target of a matching locationmap entry is not found (i.e. it reports a file not found error). The problem is when there is no match at all in locationmap (i know, should have tested that case sooner) the generator apparently tries to load with "C:\src\apache-forrest-lm\main\webapp". This seems very similar to the problem we had in SourceExistsSelector before in that it's resolving to an empty string and I can only assume that an empty string in cocoon-land somehow equates to the sitemap containing directory.
Anyway, this is a long way of saying that I think the patch above does make sense -- as in it needed to be done -- but it doesn't completely resolve the issue.
--tim
> Error for missing documents is confusing
> ----------------------------------------
>
> Key: FOR-554
> URL: http://issues.apache.org/jira/browse/FOR-554
> Project: Forrest
> Type: Bug
> Components: Locationmap
> Versions: 0.8-dev
> Reporter: Tim Williams
> Assignee: Ross Gardler
> Attachments: for-554.patch
>
> Described at the top of this discussion:
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111961459500409&w=2
> When tabs, site, and resources were made resolvable through locationmap, everything was placed in a "when-exists" test. That means instead of getting a meaningful error like "The system cannot find the specified file." it goes straight to the transformer code and fails because no generator exists. An "otherwise" should have been used so that it will fail back at the generator section and report a "good" error.
> --tim
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira