Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Launchpad Base 2.4.0
-
None
Description
The Felix framework URLHandlers class implements multiplexing for the JVM URLStreamHandlers. To find out what framework a class on the call stack belongs to, it calls the Felix.getBundle(Class) method finding the method using the Class.getDeclaredMethod method.
Since the framework instance in question is the SlingFelix class, the getDeclaredMethod call fails because SlingFelix does not have such a method and thus the URLHandlers class fails to properly operate.
This issue prevents two or more Sling instances to be deployed as web applications into the same servlet container with URLStreamHandler support enabled.
The fix is to implement the required method and delegate to the Felix class (using reflection again).
A workaround is to disable URLStreamHandler support in the framework by setting the following property in the sling.properties file:
felix.service.urlhandlers=false