Jump to content

Error with JasperReports in Eclipse RCP applicatin


mknix

Recommended Posts

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 found

I 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

  • 5 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 use

System.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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...