A p a c h e E r r B a s e ---------------------------- by David Blevins What is this? ------------- A tool that scrapes your code for i18n message files and generates a wiki page for each message that users can update with information on workarounds, possible causes and other information. Why was it created? ------------------- As an easy way for users to find and share information about the messages that a typicall application will output in normal usage. Users can quickly find pages using the i18n message key or search using the message text and instantly find a wiki page they as well as other users or developers can update or comment on. How would it work? ------------------ The tool will grab the i18n message files and insert several pages into a wiki. One page per error message. Each page will be created from a standard page template that lists the message key, the error message and links to the related code, followed a "edit this page and add more info" section where users or developers (depending on what you want for permissions) could document or describe the message and of course the comments section where anyone could comment. Using some i18n messages from OpenEJB as an example: ---Messages.properties---- cannot.validate = Cannot validate jar: {0} missing.class = The class {0} not found. Check that the class specified in the {1} element for bean {2} is spelled correctly and the class is present in the jar wrong.class.type = The class {0} is the wrong type, it does not extend {1} no.business.method = Business method {1} not implemented. The method was declared in the {2} interface {3}, but not implemented in the ejb class {4} no.home.create = The home interface {0} must declare at least one create method. Example:\n\n\tpublic {1} create() throws javax.ejb.CreateException, java.rmi.RemoteException; -------------------------- The tool would find that file and create these five pages: CannotValidate MissingClass WrongClassType NoBusinessMethod NoHomeCreate Each page would contain the actual key and message text. On the 'WrongClassType' page we might document a link to the EJB specification and describe that beans are required to implement either javax.ejb.SessionBean or javax.ejb.EntityBean and show an example. We might further add that the EJB 3.0 specification removed this restriction for session beans and recommend they try out a build of OpenEJB 3.0 if this is a critical need for them. On the 'CannotValidate' page a user might add a comment saying "I got this message and it's totally worthless and gave no useful information whatsoever." Another user might comment in return some days, weeks or months later "I got this too. If you adjust your log settings to TRACE you'll get the info you need, just make sure to set it back or your logs will fill up pretty quick." As a developer answering questions on the user list, you should take any generally applicable answers relating to error messages and add them to the appropriate page in the wiki. Hopelly the next user to make the same mistake could more quickly find the answer they're looking for by searching the wiki. You'd run the tool periodically (likely around releases) and it would add any new error pages that are required. It could potentially update the error messages in the existing pages if they've changed as well -- if you want that. What comes in the box? ---------------------- Nothing, yet. Hang tight!