Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
4.5.5
-
None
-
Liferay 7.1 alpha
Description
This error occurs when starting Liferay 7.1 alpha when the OSGi module httpclient-osgi-4.5.5.jar is used:
{{2018-04-26 14:40:20.891 ERROR [main][org_eclipse_equinox_metatype:97] Unable to parse metadata XML at "bundleentry://45.fwk1343457451/OSGI-INF/metatype/metatype.properties" for bundle ID "45" with symbolic name "org.apache.httpcomponents.httpclient". }}
org.xml.sax.SAXException: Fatal Error: URI=null Line=1: Content is not allowed in prolog.
at org.eclipse.equinox.metatype.impl.DataParser$MyErrorHandler.fatalError(DataParser.java:856)
The issue is that the metatype.properties file is being parsed as XML (but is not XML). I believe the problem is that the metatype.properties file in httpclient-osgi-4.5.5.jar is in the wrong location.
According to the OSGi spec, only metatype XML files should be in the OSGI-INF/metatype folder. See https://osgi.org/specification/osgi.cmpn/7.0.0/service.metatype.html#d0e16879
However, in httpclient-osgi-4.5.5.jar, there are two files in this folder: metatype.xml and metatype.properties.
The spec indicates that metatype localization files should go in the OSGI-INF/l10n folder. See https://osgi.org/specification/osgi.core/7.0.0/framework.module.html#i3189742
Moving the metatype.properties from OSGI-INF/metatype to OSGI-INF/l10n should solve the problem.
Related issue: HTTPCLIENT-1862