mknix Posted November 9, 2009 Share Posted November 9, 2009 I have an Eclipse RCP application that contains several plug-ins. When I try to create a report using Jasper Reports 1.2.5 version, I get the following error:javax.xml.parsers.FactoryConfigurationError: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not foundI have tried setting the class loader to be the class loader of my main plug-in before running the report, but this has not made a difference.Is the class it cannot find supposed to be in the JasperReports jar file?Any help would be appreciated.Thanks,Mary Kathryn Nix Link to comment Share on other sites More sharing options...
mknix Posted December 9, 2009 Author Share Posted December 9, 2009 Whether or not this is the "right" way to do it, I finally fixed this problem by manually setting the parser to use before generating the report. So before I generate the report I save off the current parser settings before resetting them. Then after I run the report I restore them. // Save off current parser settings// Force the parser to useSystem.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");// Run the report// Restore the prior parser settings.This keeps me from getting the parser not found error because I do have this parser in my classpath.Maybe this will help someone in the future.Mary Kathryn Nix Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now