[ 
https://issues.apache.org/jira/browse/SLING-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger updated SLING-2554:
-------------------------------------

    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

  was:
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.

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

    
> Add SlingFelix.getBundle(Class) method
> --------------------------------------
>
>                 Key: SLING-2554
>                 URL: https://issues.apache.org/jira/browse/SLING-2554
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.4.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Launchpad Base 2.4.2
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to