If there are no objections to this, I'm going to make the change (assuming it doesn't break any test cases).
-dain Dain Sundstrom wrote: > It's just eating the exceptions. I can add code to set a flag in the > handler. Then after the whole file is parsed and all error messages are > printed, I can throw a Deployment exception. > > Does this sound reasonable? > > -dain > > > Scott M Stark wrote: > >> It should be throwing a DeploymentException as well. Look >> into the LocalErrorHandler that is printing these messages. >> Maybe its just swallowing the parse exception after printing. >> >> xxxxxxxxxxxxxxxxxxxxxxxx >> Scott Stark >> Chief Technology Officer >> JBoss Group, LLC >> xxxxxxxxxxxxxxxxxxxxxxxx >> ----- Original Message ----- >> From: "Dain Sundstrom" <[EMAIL PROTECTED]> >> To: "Scott M Stark" <[EMAIL PROTECTED]> >> Cc: "JBoss-dev" <[EMAIL PROTECTED]> >> Sent: Sunday, March 03, 2002 11:27 AM >> Subject: Re: [JBoss-dev] XmlFileLoader and validation? >> >> >> >>> I use "XmlFileLoader.getDocument(stdJDBCUrl, true)", but all I get are >>> messages like the following printed to the log: >>> >>> 13:25:05,062 ERROR [XmlFileLoader] XmlFileLoader: File >>> >>> >> file:/home/dain/work/jboss/jboss-all/build/output/jboss-3.0.0beta2/tmp/deplo >> >> y/home/dain/work/jboss/jboss- >> >> all/testsuite/output/lib/cmp2-commerce.jar/64.cmp2-commerce.jar!/META-INF/jb >> >> osscmp-jdbc.xml >> >>> process error. Line: 10. Error message: Element "defaults" does not >>> allow "should-break" here. >>> 13:25:05,063 ERROR [XmlFileLoader] XmlFileLoader: File >>> >>> >> file:/home/dain/work/jboss/jboss-all/build/output/jboss-3.0.0beta2/tmp/deplo >> >> y/home/dain/work/jboss/jboss- >> >> all/testsuite/output/lib/cmp2-commerce.jar/64.cmp2-commerce.jar!/META-INF/jb >> >> osscmp-jdbc.xml >> >>> process error. Line: 10. Error message: Element type "should-break" is >>> not declared. >>> >>> I like the messages, I just wish that at the end I could detect that the >>> doc was not valid and throw a Deployment exception. >>> >>> Any ideas? >>> >>> -dain >>> >>> Scott M Stark wrote: >>> >>> >>>> If you have the doc URL then use: >>>> >>>> public static Document getDocument(URL url, boolean validateDTDs) >>>> throws >>>> DeploymentException >>>> >>>> else, create the document stream and call: >>>> >>>> XmlFileLoader(boolean validateDTDs) >>>> public Document getDocument(InputStream is, String inPath) throws >>>> DeploymentException >>>> >>>> xxxxxxxxxxxxxxxxxxxxxxxx >>>> Scott Stark >>>> Chief Technology Officer >>>> JBoss Group, LLC >>>> xxxxxxxxxxxxxxxxxxxxxxxx >>>> ----- Original Message ----- >>>> From: "Dain Sundstrom" <[EMAIL PROTECTED]> >>>> To: "JBoss-dev" <[EMAIL PROTECTED]> >>>> Sent: Sunday, March 03, 2002 10:13 AM >>>> Subject: [JBoss-dev] XmlFileLoader and validation? >>>> >>>> >>>> >>>> >>>>> How can I know if there were no validation errors when loading a doc >>>>> with XmlFileLoader? >>>>> >>>>> I want to throw a DeploymentException if jbosscmp-jdbc.xml is not >>>>> valid. >>>>> >>>>> -dain >>>>> >>>>> >>>>> _______________________________________________ >>>>> Jboss-development mailing list >>>>> [EMAIL PROTECTED] >>>>> https://lists.sourceforge.net/lists/listinfo/jboss-development >>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Jboss-development mailing list >>>> [EMAIL PROTECTED] >>>> https://lists.sourceforge.net/lists/listinfo/jboss-development >>>> >>>> >>> >>> >> >> >> _______________________________________________ >> Jboss-development mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/jboss-development >> > > > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development