Hello, I have used the IInvertoryService interface and I am facing java.lang.securityexception. Below is my piece of code and log associated to it for your reference :-
//creating resultStatus as below
ResultStatus resultStatus = new ResultStatus();
TaxRate giftTax = new TaxRate().setName("GiftTax").setRate(1000l).setIsDefault(true);
giftTax = inventoryService.createTaxRate(giftTax,resultStatus);//// throwing error here
inventoryService = IInventoryService.Stub.asInterface(service);
// Create New Tax Gift Tax and set it to 0.
TaxRate giftTax = new TaxRate().setName("GiftTax").setRate(1000l).setIsDefault(true);
giftTax = inventoryService.createTaxRate(giftTax,resultStatus);
The error appears in the last line i.e inventoryService.createTaxRate(giftTax,resultStatus); and below is the log :-
rr: java.lang.SecurityException: Access denied to package com.intelegain.tenderexample 12-30 03:44:44.147 8389-9179/com.intelegain.tenderexample W/System.err: at android.os.Parcel.readException(Parcel.java:1472) 12-30 03:44:44.147 8389-9179/com.intelegain.tenderexample W/System.err: at android.os.Parcel.readException(Parcel.java:1426) 12-30 03:44:44.157 8389-9179/com.intelegain.tenderexample W/System.err: at com.clover.sdk.v3.inventory.IInventoryService$Stub$Proxy.createTaxRate(IInventoryService.java:2518) 12-30 03:44:44.157 8389-9179/com.intelegain.tenderexample W/System.err: at com.customtender.selectFunction$4.doInBackground(selectFunction.java:496) 12-30 03:44:44.157 8389-9179/com.intelegain.tenderexample W/System.err: at com.customtender.selectFunction$4.doInBackground(selectFunction.java:472) 12-30 03:44:44.157 8389-9179/com.intelegain.tenderexample W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288) 12-30 03:44:44.157 8389-9179/com.intelegain.tenderexample W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 12-30 03:44:44.167 8389-9179/com.intelegain.tenderexample W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 12-30 03:44:44.167 8389-9179/com.intelegain.tenderexample W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 12-30 03:44:44.167 8389-9179/com.intelegain.tenderexample W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 12-30 03:44:44.167 8389-9179/com.intelegain.tenderexample W/System.err: at java.lang.Thread.run(Thread.java:841)
So can anyone please help me understand me what am I doing or Is there anything I am missing out on in above case ??
Thanks in advance.