Hello,
We try to convert a docx document with images to a sfdt document using the java libraries in the backend part.
The command line that show the error is this one:
Thank you in advance for your response.
Regards.
David.
Hi Kurthis,
Our Syncfusion product versions are:
Hi Kurthis,
I think I have seen the problem. If I create a test with only the JARs to transform a Docx to SFDT it works fine.
The problem is when we include this code in our application that has references to other third-party JARs. In this case adding the "woodstox-core-6.2.6.jar" with the dependency to "stax2-api-4.2.1.jar" then we reproduce the problem.
Could you tell us that this incompatibility exists and if there is some way to make it work without having to lose this? Today we use these other JARs for other functionalities in our application.
Regards,
David.
Hi Kurthis,
I have seen the video and I don't know if we do the same.
I have a java project to test the docx to sfdt conversion and it works fine when I only include syncfusion JARs. The problem occurs if I add the two that I told you then I see the conversion error. From what it seems from the syncfusion libraries you are calling classes that are in these other libraries and a conflict occurs. Perhaps you use other versions or have reused these classes but the fact is that if they are in the path the error occurs.
I am attaching a screenshot with my java project and the error.
Seeing the error stack when your class "com.syncfusion.javahelper.system.xml.XmlReaderSupport" is executed is when the third-party library class "woodstox-core-6.2.6.jar" is called which ends up giving the error: "com.ctc.wstx.sr.BasicStreamReader".
Could this be a problem with the version of this third-party component "woodstox-core-6.2.6.jar"? Do you use this internally? Why does loading this component impact syncfusion's?
Regards,
David.
Hi Kurthis,
Thank you very much for your help.
Tell you that seeing that the problem occurred with the factories provided in the java class "javax.xml.stream" and that they are being overwritten in this third-party Jar "woodstox-core.jar" causing the problem, we have managed to avoid it by including this before execute the conversion from java of the Docx to SFDT:
Properties props = System.getProperties();
props.setProperty ("javax.xml.stream.XMLInputFactory", "com.sun.xml.internal.stream.XMLInputFactoryImpl");
props.setProperty ("javax.xml.stream.XMLEventFactory", "com.sun.xml.internal.stream.events.XMLEventFactoryImpl");
props.setProperty ("javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl");
With this workaround it seems that the conversion works, perhaps it will help you when solving the problem.
Regards.
David.
Hi Kurthis,
I have tried this new component and it worked without problems.
Thank you very much for your help.
Regards,
David.
Hi Kurthis,
We have reviewed with the new version 19.3.0.43 and the same problem appears again.
Could you check if this change was included in this new version?
In the last 19.2.0.55 the problem was solved.
Thanks in advance for your response.
Regards,
David.
Hi Kurthis,
Thanks a lot for the information.
We will use this new version.
Regards,
David.