Problem with SAXParserFactoryImpl dependencyProblem with SAXParserFactoryImpl dependencyhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1193267842024-03-29T05:56:02Z2024-03-29T05:56:02ZProblem with SAXParserFactoryImpl dependencyAlex Pasquinihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1193267832020-06-06T15:06:26Z2020-06-06T15:06:26Z<html><head></head><body>Hi all,<br>I’m experiencing an error related to SAXParserFactoryImpl class due to transitive dependencies on net.sf.jasperreports library.<br>I’m developing a service module on Liferay CE 7.3 GA1, using Java 1.8 and maven.The error I get is the following:<pre><code>Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.createSAXParserFactory(BaseSaxParserFactory.java:142)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.createParser(BaseSaxParserFactory.java:116)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1598)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1567)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:264)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:220)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:195)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:186)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:289)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:576)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at biz.simposium.business.el01.budgetanalysis.service.impl.EL01_BudgetAnalysisLocalServiceImpl.createReport(EL01_BudgetAnalysisLocalServiceImpl.java:178)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at biz.simposium.business.el01.budgetanalysis.service.impl.EL01_BudgetAnalysisLocalServiceImpl.addEL01_BudgetAnalysis(EL01_BudgetAnalysisLocalServiceImpl.java:146)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:483)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.sun.proxy.$Proxy1269.addEL01_BudgetAnalysis(Unknown Source)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at biz.simposium.presentation.wizard.RequiredInputController.readDocument(RequiredInputController.java:371)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at biz.simposium.presentation.wizard.RequiredInputController.addBilancio(RequiredInputController.java:350)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:483)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.sun.el.parser.AstValue.invoke(AstValue.java:289)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
</code></pre>I checked the <em>/liferay-ce-portal-7.3.0-ga1/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib</em> folder and the previous jar is included.<br>I guess the library is included as jar from tomcat classloader.<br>I tried to:<br>1. Include on Pom.xml the xercesImpl dependency with compiled scope. I got the same error<br>2. Include on pom.xml the xercesImpl dependency with provided scope. I got the same error<br>3. Remove the xercesImpl from Pom.xml. I got the same error.<br>I tried to search on google the error related to xercesImpl libraries, anyway I have not found the solution.<br>Have you ever experienced this problem? How did you solved it?<br>Thank you.<br>Best regards,<br>Alex</body><