aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-861) Error on retrieving constructor for proxy of karaf BlueprintCommand class on jdk 6 update 33
Date Thu, 14 Jun 2012 19:33:42 GMT

    [ https://issues.apache.org/jira/browse/ARIES-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295253#comment-13295253
] 

Daniel Kulp commented on ARIES-861:
-----------------------------------

The problem stems from ProxySubclassAdapter where it creates the new constructor.  The lines:

{code}

    if (superclassBinaryName.startsWith("java.") || superclassBinaryName.startsWith("javax."))
{
      methodAdapter.invokeConstructor(Type.getType(superclassClass), new Method("<init>",
          Type.VOID_TYPE, NO_ARGS));
    }
    // otherwise invoke the java.lang.Object no args constructor
    else {
      methodAdapter.invokeConstructor(OBJECT_TYPE, new Method("<init>", Type.VOID_TYPE,
NO_ARGS));
    }
{code}

Apparently the new JDK is not allowing us to call the init method on the Object class directly
in this case.  Not sure why.  If I replace  all of that with just:

{code}
     methodAdapter.invokeConstructor(Type.getType(superclassClass), new Method("<init>",
          Type.VOID_TYPE, NO_ARGS));
{code}

to always call the superclass no-arg constructor, it works OK.  However, that only works if
there is a no-arg constructor.   Not sure what the best fix is for all of this.


                
> Error on retrieving constructor for proxy of karaf BlueprintCommand class on jdk 6 update
33
> --------------------------------------------------------------------------------------------
>
>                 Key: ARIES-861
>                 URL: https://issues.apache.org/jira/browse/ARIES-861
>             Project: Aries
>          Issue Type: Bug
>          Components: Proxy
>            Reporter: Christian Schneider
>             Fix For: proxy.impl-0.4
>
>
> When I switch my karaf trunk snapshot from jdk 6 update 31 to update 33 all karaf commands
stop working.
> I was able to track this down to blueprint and the proxy facility or aries.
> The exception I get is:
> org.osgi.framework.ServiceException: Service factory exception: (class: org/apache/karaf/shell/console/commands/$BlueprintCommand16496117,
method: <init> signature: (Ljava/lang/reflect/InvocationHandler;)V) Call to wrong initialization
method
> In the log this does not show. There I only get a Nullpointer exception as the service
object for the command is returned as null.
> I have documented more details in the linked karaf issue.

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

        

Mime
View raw message