Strange issue with GoGo + java8 and Oxygen

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Strange issue with GoGo + java8 and Oxygen

Cristiano Gavião

Hello,

Today I needed to use console in order to do some debug at IDE. So, I started an OSGi Framework launch and used obr:list command from bundlerepository bundle.

Strangely, I received this: "gogo: IllegalArgumentException: Cannot coerce list() to any of [(boolean, String[])]"

I did some investigation and discovered that the cause of such error is in org.apache.felix.gogo.runtime.Reflective class. Specifically here:

   

    private static List<Object> transformParameters(Method method, List<Object> in)
    {
        Annotation[][] pas = method.getParameterAnnotations();
        ArrayList<Object> out = new ArrayList<Object>();


The matrix returned by method.getParameterAnnotations() contains two empty arrays ! So any transformation can be done and then the command fails.

Has anyone seen an issue like that before ?


PS. I was not able to experiment with a more recent GoGo version because since its 1.0.0 version, a different export-package is provided (without 'status=provisional') and is not accepted by equinox.


best,

Cristiano



_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange issue with GoGo + java8 and Oxygen

tcljava
Manda em português 

Luís Carlos Moreira da Costa
Creator of LavaScript Programming Language
OSGi, Eclipse, D and Android Evangelist
http://eclipsebrazil.wordpress.com

Em 17 de abr de 2017 15:40, "Cristiano Gavião" <[hidden email]> escreveu:

Hello,

Today I needed to use console in order to do some debug at IDE. So, I started an OSGi Framework launch and used obr:list command from bundlerepository bundle.

Strangely, I received this: "gogo: IllegalArgumentException: Cannot coerce list() to any of [(boolean, String[])]"

I did some investigation and discovered that the cause of such error is in org.apache.felix.gogo.runtime.Reflective class. Specifically here:

   

    private static List<Object> transformParameters(Method method, List<Object> in)
    {
        Annotation[][] pas = method.getParameterAnnotations();
        ArrayList<Object> out = new ArrayList<Object>();


The matrix returned by method.getParameterAnnotations() contains two empty arrays ! So any transformation can be done and then the command fails.

Has anyone seen an issue like that before ?


PS. I was not able to experiment with a more recent GoGo version because since its 1.0.0 version, a different export-package is provided (without 'status=provisional') and is not accepted by equinox.


best,

Cristiano



_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Strange issue with GoGo + java8 and Oxygen

Cristiano Gavião
In reply to this post by Cristiano Gavião

Hello again,

I've discovered that the problem is only occurring while running Equinox inside Eclipse IDE using both bundlerepository 2.0.8 and 2.0.9-SNAPSHOT. 

I have setup an external environment and used the contents below in the config.ini:

osgi.bundles=bundles/org.eclipse.equinox.console@start, bundles/org.apache.felix.gogo.command@start, bundles/org.apache.felix.gogo.shell@start, bundles/org.apache.felix.gogo.runtime@start, bundles/org.apache.felix.bundlerepository@start
osgi.noShutdown=true
eclipse.ignoreApp=true

Then I added a couple of R5 repositories with "obr:repos add file:/repositoryR5.zip" and then called "obr:list" and the error is not occurring at all...

Why would Java8 SDK's method.getParameterAnnotations() calls would give different result while running at IDE? =-O

best,

Cristiano
On 17/04/2017 15:40, Cristiano Gavião wrote:

Hello,

Today I needed to use console in order to do some debug at IDE. So, I started an OSGi Framework launch and used obr:list command from bundlerepository bundle.

Strangely, I received this: "gogo: IllegalArgumentException: Cannot coerce list() to any of [(boolean, String[])]"

I did some investigation and discovered that the cause of such error is in org.apache.felix.gogo.runtime.Reflective class. Specifically here:

   

    private static List<Object> transformParameters(Method method, List<Object> in)
    {
        Annotation[][] pas = method.getParameterAnnotations();
        ArrayList<Object> out = new ArrayList<Object>();


The matrix returned by method.getParameterAnnotations() contains two empty arrays ! So any transformation can be done and then the command fails.

Has anyone seen an issue like that before ?


PS. I was not able to experiment with a more recent GoGo version because since its 1.0.0 version, a different export-package is provided (without 'status=provisional') and is not accepted by equinox.


best,

Cristiano




_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Loading...