You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Ali Naddaf (JIRA)" <ji...@apache.org> on 2008/11/05 05:17:44 UTC
[jira] Closed: (FELIX-800)
URLHandlersBundleStreamHandler.openConnection(URL) fails when extending
Felix
[ https://issues.apache.org/jira/browse/FELIX-800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ali Naddaf closed FELIX-800.
----------------------------
I tested the fix in the trunk and worked perfectly fine, thank you Karl.
> 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.