You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yaroslav Molochkov (Jira)" <ji...@apache.org> on 2020/12/23 14:17:00 UTC

[jira] [Updated] (IGNITE-13897) .NET Service can't assign correct type to passed array parameters

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

Yaroslav Molochkov updated IGNITE-13897:
----------------------------------------
    Description: 
This issue relates to IGNITE-12823.

Ignite client calls deployed service and fails with the following exception:
{code:java}
Apache.Ignite.Core.Common.JavaException: class org.apache.ignite.IgniteException: Failed to invoke proxy: there is no method 'processSomething' in type 'SomeService' with (Int32, Object[]) arguments
	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native Method)
	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.serviceInvokeMethod(PlatformCallbackGateway.java:942)
	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:214)
	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:185)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.callService(GridServiceProxy.java:491)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.call(GridServiceProxy.java:469)
	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1847)
	at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:598)
	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7077)
	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:592)
	at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:521)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
	at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1368)
	at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:2130)
	at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
	at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
	at org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
	at org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
	at org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
{code}
Service interface itself looks like this:
{code:java}
public interface SomeService : IService
{
    int processSomething(int foo, Parameter[] parameters);
}

public class Parameter
{
    
    private int id;
    
    private ParamValue[] _values;

    
    public Parameter(int id, ParamValue[] _values)
    {
 
       this.id = id;
        
       this._values = _values;
    
    }

}



public class ParamValue
{

    private int id;
    
    private double val;

    
    public ParamValue(int id, double val)
    {
 
       this.id = id;
       
       this.val = val;
  
    }

}

{code}
And the call to the service:
{code:java}
var svc = igniteServices.GetServiceProxy<T>(name, false);
var result = svc.processSomething(id, parameters);
{code}
Now, if this is a server node then call is successful. If the call goes from the client node then we'll get the error above.

Fix in IGNITE-12823 addresses particular code execution path where the execution flow goes through PlatformServices class. Yet in this case our code goes through PlatformAbstractService. I think that the fix of casting arrays should be positioned a little bit lower in the call stack (or higher in code hierarchy) so all execution paths are covered simultaneously. 

  was:
This issue relates to IGNITE-12823.

Ignite client calls deployed service and fails with the following exception:
{code:java}
Apache.Ignite.Core.Common.JavaException: class org.apache.ignite.IgniteException: Failed to invoke proxy: there is no method 'processSomething' in type 'SomeService' with (Int32, Object[]) arguments
	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native Method)
	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.serviceInvokeMethod(PlatformCallbackGateway.java:942)
	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:214)
	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:185)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.callService(GridServiceProxy.java:491)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.call(GridServiceProxy.java:469)
	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1847)
	at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:598)
	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7077)
	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:592)
	at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:521)
	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
	at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1368)
	at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:2130)
	at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
	at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
	at org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
	at org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
	at org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
{code}
Service interface itself looks like this:
{code:java}
public interface SomeService
{
    int processSomething(int foo, Parameter[] parameters);
}

public class Parameter
{
    
    private int id;
    
    private ParamValue[] _values;

    
    public Parameter(int id, ParamValue[] _values)
    {
 
       this.id = id;
        
       this._values = _values;
    
    }

}



public class ParamValue
{

    private int id;
    
    private double val;

    
    public ParamValue(int id, double val)
    {
 
       this.id = id;
       
       this.val = val;
  
    }

}

{code}
And the call to the service:
{code:java}
var svc = igniteServices.GetServiceProxy<T>(name, false);
var result = svc.processSomething(id, parameters);
{code}
Now, if this is a server node then call is successful. If the call goes from the client node then we'll get the error above.

Fix in IGNITE-12823 addresses particular code execution path where the execution flow goes through PlatformServices class. Yet in this case our code goes through PlatformAbstractService. I think that the fix of casting arrays should be positioned a little bit lower in the call stack (or higher in code hierarchy) so all execution paths are covered simultaneously. 


> .NET Service can't assign correct type to passed array parameters
> -----------------------------------------------------------------
>
>                 Key: IGNITE-13897
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13897
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 2.9
>            Reporter: Yaroslav Molochkov
>            Priority: Major
>
> This issue relates to IGNITE-12823.
> Ignite client calls deployed service and fails with the following exception:
> {code:java}
> Apache.Ignite.Core.Common.JavaException: class org.apache.ignite.IgniteException: Failed to invoke proxy: there is no method 'processSomething' in type 'SomeService' with (Int32, Object[]) arguments
> 	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native Method)
> 	at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.serviceInvokeMethod(PlatformCallbackGateway.java:942)
> 	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:214)
> 	at org.apache.ignite.internal.processors.platform.services.PlatformAbstractService.invokeMethod(PlatformAbstractService.java:185)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.callService(GridServiceProxy.java:491)
> 	at org.apache.ignite.internal.processors.service.GridServiceProxy$ServiceProxyCallable.call(GridServiceProxy.java:469)
> 	at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1847)
> 	at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:598)
> 	at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7077)
> 	at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:592)
> 	at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:521)
> 	at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> 	at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1368)
> 	at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:2130)
> 	at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> 	at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> 	at org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
> 	at org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> 	at org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> Service interface itself looks like this:
> {code:java}
> public interface SomeService : IService
> {
>     int processSomething(int foo, Parameter[] parameters);
> }
> public class Parameter
{
    
>     private int id;
    
>     private ParamValue[] _values;

    
>     public Parameter(int id, ParamValue[] _values)
    {
 
>        this.id = id;
        
>        this._values = _values;
    
>     }
> 
}
> 

public class ParamValue
{

>     private int id;
    
>     private double val;

    
>     public ParamValue(int id, double val)
    {
 
>        this.id = id;
       
>        this.val = val;
  
>     }
> 
}
> {code}
> And the call to the service:
> {code:java}
> var svc = igniteServices.GetServiceProxy<T>(name, false);
> var result = svc.processSomething(id, parameters);
> {code}
> Now, if this is a server node then call is successful. If the call goes from the client node then we'll get the error above.
> Fix in IGNITE-12823 addresses particular code execution path where the execution flow goes through PlatformServices class. Yet in this case our code goes through PlatformAbstractService. I think that the fix of casting arrays should be positioned a little bit lower in the call stack (or higher in code hierarchy) so all execution paths are covered simultaneously. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)