You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/08/02 15:59:02 UTC

[jira] [Created] (SLING-2554) Add SlingFelix.getBundle(Class) method

Felix Meschberger created SLING-2554:
----------------------------------------

             Summary: Add SlingFelix.getBundle(Class) method
                 Key: SLING-2554
                 URL: https://issues.apache.org/jira/browse/SLING-2554
             Project: Sling
          Issue Type: Bug
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger


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

--
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

        

[jira] [Updated] (SLING-2554) Add SlingFelix.getBundle(Class) method

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Resolved] (SLING-2554) Add SlingFelix.getBundle(Class) method

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-2554.
--------------------------------------

    Resolution: Fixed

Implemented the SlingFelix.getBundle(Class) method in rev. 1374227.

Also added a testcase which fails with the expected symptom (IOException for not being able to create an URL due to MethodNotFound)
in case the getBundle(Class) method cannot be called on the framework class.
                
> 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

        

[jira] [Updated] (SLING-2554) Add SlingFelix.getBundle(Class) method

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

          Component/s: Launchpad
    Affects Version/s: Launchpad Base 2.4.0
        Fix Version/s: Launchpad Base 2.4.2
    
> 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.
> 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