Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Primitive as arguments in remote call

Scott,
  The exception is thrown on the client.

  From a priority perspective, it was trivial for me to change the interfaces to use Integer so not a high priority to me.
Tim


Date: Thu, 2 Apr 2015 09:57:03 -0700
From: slewis@xxxxxxxxxxxxx
To: ecf-dev@xxxxxxxxxxx
Subject: Re: [ecf-dev] Primitive as arguments in remote call

On 4/2/2015 9:42 AM, Timothy Vogel wrote:
I have a method defined on a remote interface as  public IDcWire createWire(int wireType);  This fails with this exception
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(ChannelEndpointImpl.java:1177)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$2.run(ChannelEndpointImpl.java:293)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$1.run(ChannelEndpointImpl.java:258)

If I change the method signature to  public IDcWire createWire(Integer wireType);  it works correctly.

My question is there an intended / necessary requirement to not pass primitives to remote services?

No.  This appears to me a bug in rosgi.

One question:  Does this exception appear on host?

Scott



_______________________________________________ ecf-dev mailing list ecf-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/ecf-dev

Back to the top