Jump to content

SAXNotRecognizedException


skatsnc

Recommended Posts

I am getting this error and don't know how to correct it:    

MyEventQueue.dispatchEvent:  Exception during dispatch event:  net.sf.jasperreports.engine.JRRuntimeException: Error creating SAX parser


net.sf.jasperreports.engine.JRRuntimeException: Error creating SAX parser

    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:113)

    at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1131)

    at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1106)

    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:203)

    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)

    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)

....

Caused by: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage

    at gnu.xml.aelfred2.XmlReader.getProperty(XmlReader.java:181)

    at gnu.xml.aelfred2.XmlReader.setProperty(XmlReader.java:166)

    at gnu.xml.aelfred2.JAXPFactory$JaxpParser.setProperty(JAXPFactory.java:147)

    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.configureParser(JRReportSaxParserFactory.java:144)

    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:108)

 

It hits on this line:  JasperDesign jasperDesign = JRXmlLoader.load(reportSource);

I created a simple basic report in ireport that the reportSource string points towards. Is it possible that I'm not including a jar or something? I have the JasperLibrary added to my project then have all the imports that it asked for, but are there ones i need to include extra as well?

Thanks

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...
  • 7 months later...
  • 3 weeks later...

Hi,

 

Just by looking at the stack trace, you seem to rely on this "gnu.xml.aelfred2" XML parser which simply does not support a feature that we are relying upon when parsing JRXML files.

You should consider adding the Xerces parser to your classpath. You can find it in the /lib directory of the JR project distribution.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

  • 3 years later...

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