felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-800) URLHandlersBundleStreamHandler.openConnection(URL) fails when extending Felix
Date Mon, 03 Nov 2008 17:20:44 GMT

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

Karl Pauls resolved FELIX-800.
------------------------------

    Resolution: Fixed

Should be fixed in trunk and the upcoming 1.4.0 release. Please test it and close this issue
if it works for you.

> URLHandlersBundleStreamHandler.openConnection(URL) fails when extending Felix
> -----------------------------------------------------------------------------
>
>                 Key: FELIX-800
>                 URL: https://issues.apache.org/jira/browse/FELIX-800
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.0.4, felix-1.2.0, felix-1.2.1
, felix-1.2.2
>            Reporter: Ali Naddaf
>            Assignee: Karl Pauls
>            Priority: Minor
>             Fix For: felix-1.4.0
>
>
> I am seeing an exception in the URLHandlersBundleStreamHandler.openConnection(URL) method.
Here is the part I am referring to:
> if (framework != null)
>        {
>            // TODO: optimize this to not use reflection if not needed
>            try
>            {
>                Class targetClass = framework.getClass().getClassLoader().loadClass(
>                    URLHandlersBundleURLConnection.class.getName());
>                              return (URLConnection) m_action.invoke(m_action.getConstructor(targetClass,
>                    new Class[]{URL.class, framework.getClass()}),
>                    new Object[]{url, framework});
>            }
>            catch (Exception ex)
>            {
>                throw new IOException(ex.getMessage());
>            }
>        }
>        throw new IOException("No framework context found");
> The problem happens when reflection fails to find the appropriate constructor and throws
a NoSuchMethodException; here the targetClass resolves to "org.apache.felix.framework.URLHandlersBundleURLConnection"
and
> the exception is:
> java.lang.NoSuchMethodException: org.apache.felix.framework.URLHandlersBundleURLConnection.<init>(java.net.URL,
org.simplecenter.application.SimpleCenterApplication)
> Note that SimpleCenterApplicaion extends Felix and  URLHandlersBundleURLConnection has
the constructor URLHandlersBundleURLConnection(URL, Felix). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message