Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundProvider for javax.xml.parsers.DocumentBuilderFactory cannot be foundhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1215062342024-03-29T07:39:26Z2024-03-29T07:39:26ZRE: RE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215100962022-09-08T22:00:59Z2022-09-08T00:19:23Z<p>Here is my dependency list from pom.xml. please let me know if I am
missing something?</p>
<p><dependencies><br /> <dependency><br />
<groupId>com.liferay.portal</groupId><br />
<artifactId>release.portal.api</artifactId><br />
<version>7.4.3.23-ga23</version><br />
<scope>provided</scope><br />
</dependency><br /> <!--
https://mvnrepository.com/artifact/com.liferay.portal/com.liferay.portal.kernel
--><br /> <dependency><br />
<groupId>com.liferay.portal</groupId><br />
<artifactId>com.liferay.portal.kernel</artifactId><br />
<version>58.0.0</version><br />
<scope>provided</scope><br />
</dependency><br /> <dependency><br />
<groupId>com.liferay.portal</groupId><br />
<artifactId>com.liferay.util.bridges</artifactId><br />
<version>9.0.6</version><br />
<scope>provided</scope><br />
</dependency><br /> <dependency><br />
<groupId>com.liferay.portal</groupId><br />
<artifactId>com.liferay.util.taglib</artifactId><br />
<version>9.2.2</version><br />
<scope>provided</scope><br />
</dependency><br /> <dependency><br />
<groupId>com.liferay.portal</groupId><br />
<artifactId>com.liferay.util.java</artifactId><br />
<version>17.1.2</version><br />
<scope>provided</scope><br />
</dependency><br /> <br /> <dependency><br />
<groupId>com.liferay.faces.archetype</groupId><br />
<artifactId>com.liferay.faces.archetype.primefaces.portlet</artifactId><br />
<version>8.0.0</version><br /> </dependency></p>
<p> <dependency><br />
<groupId>javax.portlet</groupId><br />
<artifactId>portlet-api</artifactId><br />
<version>3.0.1</version><br />
<scope>provided</scope><br /> </dependency></p>Harish Yenumulapalli2022-09-08T00:19:23ZRE: RE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215094952022-09-08T22:00:59Z2022-09-06T18:28:35Z<p>Does liferay 7.4.3 works with openjdk 8?</p>Harish Yenumulapalli2022-09-06T18:28:35ZRE: RE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215090732022-09-08T22:00:59Z2022-09-06T14:08:38Z<p>Does system:check works for war file also? I tried here is the information</p>
<p>
<b>Output</b></p>
<pre>
Available checkers: [Declarative Service Soft Circular Dependency Checker, Declarative Service Unsatisfied Component Checker, Spring Extender Unavailable Component Checker]
Running "Declarative Service Soft Circular Dependency Checker". You can run this by itself with command "ds:softCircularDependency" in gogo shell.
Declarative Service Soft Circular Dependency Checker check result: No issues were found.
Running "Declarative Service Unsatisfied Component Checker". You can run this by itself with command "ds:unsatisfied" in gogo shell.
Declarative Service Unsatisfied Component Checker check result: No issues were found.
Running "Spring Extender Unavailable Component Checker". You can run this by itself with command "dm na" in gogo shell.
Spring Extender Unavailable Component Checker check result: No issues were found.</pre>
<p>Also can you please provide any documentation converting from old
format to OSGi module. I tried on liferay documentation but not able
to pinpoint. </p>
<p>Can you also provide any pointers like what is missing in my old
format, as I redid the entire upgrade process and I am still getting
the same error. I used the upgrade tool to convert the code base.</p>
<p>Basically I am stuck here, my approach was to make the upgrade from
6.2 to 7.4.3 and then once we are at a place that things are working
then I can work on converting to OSGi. Please provide me information
why servletContextHelperRegistration is null, is there any problem
with web.xml or any dependency is missing or some thing else. Please
any pointers over here will really help us overcome the problem.</p>
<p> </p>Harish Yenumulapalli2022-09-06T14:08:38ZRE: RE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215074232022-09-08T22:00:59Z2022-09-01T20:07:27Z<p>How big is the change to convert to OSGi modules. Also I have
followed all the steps using liferay upgrade tool but I couldn't
understand where I am missing. Any pointers or suggestions where to
start from.</p>Harish Yenumulapalli2022-09-01T20:07:27ZRE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundAlberto Chaparrohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215068722022-09-01T09:31:54Z2022-09-01T09:31:53Z<p>Hi Harish,</p>
<p>There is no requirement but it is haighly recommended, the WAR
format, is not how we are developing in microservices using OSGi, and
we keep since 7.0 to keep backward compatibiity so it will be more
difficult to diagnose any issue you may have. There is plenty of
documentation about how to upgrade your modules to OSGi.<br />
<br /> If you still want to keep WARs, the issue is happening here:</p>
<p>https://github.com/liferay/liferay-portal/blob/master/modules/apps/static/portal-osgi-web/portal-osgi-web-wab-extender/src/main/java/com/liferay/portal/osgi/web/wab/extender/internal/WabBundleProcessor.java#L463<br />
<br /> Seems servletContextHelperRegistration is null<br />
<br /> That means that probably the upgrade did not complete properly,
be sure all services are available in osgi, you can execute
system:check for that</p>Alberto Chaparro2022-09-01T09:31:53ZRE: RE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215064962022-09-08T22:00:59Z2022-08-31T13:47:02Z<p>Thank you for response. Yes these are custom portlets upgraded using
liferay developer studio. As per documentation we can deploy war file
also, if that is not true can you please share any documentation
upgrading to OSGi module. Is it a recent change that modules needed to
be OSGi not any more old format? When I was trying with 7.4.3.23 (May
build) I didn't encounter this issue.</p>Harish Yenumulapalli2022-08-31T13:47:02ZRE: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be foundAlberto Chaparrohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215063982022-08-31T08:42:44Z2022-08-31T08:42:43Z<p>Hi Harish,<br />
<br /> The portal is trying to deploy and old extension (it is still
war not an OSGi module) so, can you check the custom developments you
are deploying?<br />
<br /> Thank you</p>Alberto Chaparro2022-08-31T08:42:43ZProvider for javax.xml.parsers.DocumentBuilderFactory cannot be foundHarish Yenumulapallihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215062332022-09-08T22:00:59Z2022-08-30T20:06:50Z<p>Hi,</p>
<p> </p>
<p>We are in the process of upgrading liferay from 6.2 to 7.4.3, After
DB upgrade if we are trying to bring up the portlet we are
encountering with following errors</p>
<p>1. Caused by: javax.xml.parsers.FactoryConfigurationError: Provider
for javax.xml.parsers.DocumentBuilderFactory cannot be found</p>
<p>2. 2022-08-18 16:16:51.896 ERROR
[com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][WabBundleProcessor:244]
Catastrophic initialization failure! Shutting down null WAB due to:
null<br /> java.lang.NullPointerException: null<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor._initContext(WabBundleProcessor.java:463)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:140)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:167)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:93)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:115)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:68)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:50)
~[?:?]<br /> at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:159)
~[org.eclipse.osgi.jar:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.lambda$activate$0(WabFactory.java:146)
~[?:?]<br /> at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:1.8.0_332]<br /> at java.lang.Thread.run(Thread.java:750)
[?:1.8.0_332]<br /> 2022-08-18 16:16:51.915 ERROR [Framework Event
Dispatcher: Equinox Container:
5bf816c5-a6eb-4534-8012-6f6195e50386][Framework:56] FrameworkEvent
ERROR<br /> org.osgi.framework.ServiceException: Exception in
com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService()<br />
at
org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:222)
~[org.eclipse.osgi.jar:?]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
~[org.eclipse.osgi.jar:?]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
~[org.eclipse.osgi.jar:?]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:524)
~[org.eclipse.osgi.jar:?]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:464)
~[org.eclipse.osgi.jar:?]<br /> at
org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624)
~[org.eclipse.osgi.jar:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor._initContext(WabBundleProcessor.java:459)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:140)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:167)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:93)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:115)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:68)
~[?:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:50)
~[?:?]<br /> at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
~[org.eclipse.osgi.jar:?]<br /> at
org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:159)
~[org.eclipse.osgi.jar:?]<br /> at
com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.lambda$activate$0(WabFactory.java:146)
~[?:?]<br /> at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
~[?:1.8.0_332]<br /> at java.lang.Thread.run(Thread.java:750)
~[?:1.8.0_332]<br /> Caused by:
javax.xml.parsers.FactoryConfigurationError: Provider for
javax.xml.parsers.DocumentBuilderFactory cannot be found<br /> at
javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
~[?:1.8.0_332]<br /> at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:854)
~[log4j-1.2-api.jar:2.17.1]<br /> at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
~[log4j-1.2-api.jar:2.17.1]<br /> at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
~[log4j-1.2-api.jar:2.17.1]<br /> at
org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
~[log4j-1.2-api.jar:2.17.1]<br /> at
org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
~[?:?]<br /> at
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
~[slf4j-api.jar:1.7.26]<br /> at
org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
~[jcl-over-slf4j.jar:1.2]<br /> at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:671)
~[commons-logging.jar:1.2]<br /> at
org.springframework.web.servlet.DispatcherServlet.<clinit>(DispatcherServlet.java:246)
~[?:?]<br /> at
org.springframework.web.servlet.ViewRendererServlet.<clinit>(ViewRendererServlet.java:54)
~[?:?]<br /> at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
~[?:1.8.0_332]<br /> at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
~[?:1.8.0_332]<br /> at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
~[?:1.8.0_332]<br /> at
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
~[?:1.8.0_332]<br /> at
java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_332]<br />
at
com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader._getServletInstance(WebXMLDefinitionLoader.java:1094)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader._setServlet(WebXMLDefinitionLoader.java:1132)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.endElement(WebXMLDefinitionLoader.java:352)
~[?:?]<br /> at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1781)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2966)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:601)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
~[?:1.8.0_332]<br /> at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:642)
~[?:1.8.0_332]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.loadWebXMLDefinition(WebXMLDefinitionLoader.java:511)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.loadWebXML(WebXMLDefinitionLoader.java:456)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.<init>(ServletContextHelperRegistrationImpl.java:111)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:50)
~[?:?]<br /> at
com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:32)
~[?:?]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
~[org.eclipse.osgi.jar:?]<br /> at
java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_332]<br /> at
org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFa