6 Replies Latest reply on Sep 15, 2016 5:28 PM by brucehul RSS
    nadams Explorer

    Error when logging remote property data

    I'm implementing the SimpleThing example in the Java SDK and I'm trying to log data to a value stream for Temperature.

     

    I'm getting the following error when the logging is enabled

     

    Unable to Invoke Service UpdateSubscribedPropertyValues on TestThing


    any help would be welcome.

      • Re: Error when logging remote property data
        horia.raducioiu Apprentice

        Nick, can you check the permissions for the user on which you try to call that service ?

        Also you can open Composer with this user and check if he has access to that object first and then to the service.

        Let me know if this helps.

          • Re: Error when logging remote property data
            nadams Explorer

            I suspect that you're right as I have removed Users from the Everybody Orginisation. but Can't use the Java SDK anyway as it doesn't support offline message store and forward so this has now become a noot point.

             

            Thanks anyway.

              • Re: Error when logging remote property data
                horia.raducioiu Apprentice

                Nick, regarding the "Unable to invoke Service" error, can you see the object and it's service in Composer with that particular user ? What happens when you try to log data to the Value Stream ?

                  • Re: Error when logging remote property data
                    nadams Explorer

                    The gateway user does not have access the the thing through composer.

                     

                    They 'should' have visibility of the thing and they have read, write, event execute, event subscribe, and service execute permissions on all properties, events and services on the thing.

                     

                    As I said in my earlier post the data in the property is updated it is just not logged.

                     

                    It looks like three errors are logged when it updates the data.

                     

                     

                    2016-07-07 15:39:58.351

                     

                     

                     

                    ERROR

                     

                    ErrorCode(723f04fe-3d35-4f99-b5e0-f29112db78b2), Cause(null), Reason(Access was attempted on a null reference variable.), Possible Resolutions(Remove the reference to the null variable within your extension code.)

                     

                     

                    GatewayUser

                     

                     

                    c.t.c.p.ReflectionProcessor

                     

                     

                    WSExecutionProcessor-994

                     

                     

                     

                     

                    2016-07-07 15:39:58.351

                     

                     

                     

                    ERROR

                     

                    Unable to dispatch [ uri = /Things/RemoteThing2/Services/UpdateSubscribedPropertyValues/]: Unable to Invoke Service UpdateSubscribedPropertyValues on RemoteThing2 : null

                     

                     

                    GatewayUser

                     

                     

                    c.t.w.p.APIProcessor

                     

                     

                    WSExecutionProcessor-994

                     

                     

                     

                     

                    2016-07-07 15:39:58.351

                     

                     

                     

                    ERROR

                     

                    error executing APIRequest Message: Unable to dispatch [ uri = /Things/RemoteThing2/Services/UpdateSubscribedPropertyValues/]: Unable to Invoke Service UpdateSubscribedPropertyValues on RemoteThing2 : null, sending ERROR ResponseMessage to caller!

                     

                     

                     

                    c.t.s.s.w.p.WSExecutionInstance

                     

                     

                    WSExecutionProcessor-994

                     

                     

                     

                     

                     

                    I added the gateway user to the administrators group as a quick fix but really don't want to leave this in place due the security risk involved.

                     

                    Any pointers what to do next would be greatlyfully received.

                     

                    Thanks

                    Nick

              • Re: Error when logging remote property data
                brucehul Apprentice

                There are a lot of cases where the operation in a service is not run as the current user running the mashup. Event responses seem to be executed as System, so you need to grant the access to the operation in the error. In your case, that is the ability to execute the server UpdateSubscriptedPropertyValues on the TestThing entity. It is my experience that you'll just have to deal with these as they come up individually or grant pretty sweeping powers to the System user (which may not be a best practice).