Closed GoogleCodeExporter closed 9 years ago
Your error comes from
https://code.google.com/p/xdocreport/source/browse/document/fr.opensagres.xdocre
port.document.docx/src/main/java/fr/opensagres/xdocreport/document/docx/DocxRepo
rt.java#166
In this code we use standard code to parse XML with SAX :
------------------------------------------
XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setContentHandler( contentHandler );
xmlReader.parse( new InputSource( reader ) );
------------------------------------------
I suggest you to search with google "java.lang.ClassCastException:
org.apache.xerces.parsers.SAXParser cannot be cast to org.xml.sax.XMLReader".
It seems that's it's a problem with a JAR (xerces-impl?).
if you find which JARs cause problem, it should be cool to tell us. Many
thank's.
Regards Angelo
Original comment by angelo.z...@gmail.com
on 21 Nov 2013 at 1:02
I use the xerces-impl 2.9.1
Original comment by nadirmez...@gmail.com
on 21 Nov 2013 at 1:50
Just, i have omitted this
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser
cannot be cast to org.xml.sax.XMLReader
at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
at fr.opensagres.xdocreport.document.docx.DocxReport.onBeforePreprocessing(DocxReport.java:166)
Original comment by nadirmez...@gmail.com
on 21 Nov 2013 at 2:27
I cannot help you more. If you have this problem it means that if you use other
libraries (spring, hibernate, etc) in your application which uses SAX, those
libraries will crash too. Perhaps you could post your problem on Xerces forum.
Original comment by angelo.z...@gmail.com
on 21 Nov 2013 at 2:36
Hi,
I have resolved this bug, rebuilding my project and deleting this
dependency in my pom.xml
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.xdocreport.converter.docx.xwpf</artifactId>
<version>1.0.3</version>
</dependency>
Original comment by nadirmez...@gmail.com
on 27 Nov 2013 at 10:19
Ok thank's, I close this issue.
Original comment by angelo.z...@gmail.com
on 12 Dec 2013 at 1:55
Original issue reported on code.google.com by
nadirmez...@gmail.com
on 21 Nov 2013 at 12:07