- Newest
- Most votes
- Most comments
Hi and thanks for using Greengrass v2.
Is there any additional logging after the NullPointerException? There ought to be a stacktrace which would tells us exactly what the problem is.
Thanks!
Michael Dombrowski.
I think I am also getting same error. Here is the complete stack trace:
2021-01-07T14:31:08.759Z \[INFO] (Thread-17) software.amazon.awssdk.eventstreamrpc.ServiceOperationMappingContinuationHandler: Connection accepted for com.example.IPCExample. {}
2021-01-07T14:31:08.760Z \[INFO] (Thread-17) software.amazon.awssdk.eventstreamrpc.ServiceOperationMappingContinuationHandler: Sending connect response for com.example.IPCExample. {}
2021-01-07T14:31:08.760Z \[ERROR] (Thread-17) com.aws.greengrass.ipc.common.ExceptionUtil: Unhandled exception in IPC. {}
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at com.aws.greengrass.builtin.services.pubsub.PubSubIPCEventStreamAgent.handlePublishToTopicRequest(PubSubIPCEventStreamAgent.java:113)
at com.aws.greengrass.builtin.services.pubsub.PubSubIPCEventStreamAgent.access$100(PubSubIPCEventStreamAgent.java:44)
at com.aws.greengrass.builtin.services.pubsub.PubSubIPCEventStreamAgent$PublishToTopicOperationHandler.lambda$handleRequest$0(PubSubIPCEventStreamAgent.java:192)
at com.aws.greengrass.ipc.common.ExceptionUtil.translateExceptions(ExceptionUtil.java:33)
at com.aws.greengrass.builtin.services.pubsub.PubSubIPCEventStreamAgent$PublishToTopicOperationHandler.handleRequest(PubSubIPCEventStreamAgent.java:176)
at com.aws.greengrass.builtin.services.pubsub.PubSubIPCEventStreamAgent$PublishToTopicOperationHandler.handleRequest(PubSubIPCEventStreamAgent.java:160)
at software.amazon.awssdk.eventstreamrpc.OperationContinuationHandler.onContinuationMessage(OperationContinuationHandler.java:271)
at software.amazon.awssdk.crt.eventstream.ServerConnectionContinuationHandler.onContinuationMessageShim(ServerConnectionContinuationHandler.java:53)
Edited by: kunupat on Jan 7, 2021 6:46 AM
Based on that stacktrace, that must mean that the topic is null. Please ensure that you have set a non-null topic name in the publish request.
request.topic = "my/topic/name"
Thanks.
Michael Dombrowski
Edited by: MichaelDombrowski-AWS on Jan 7, 2021 9:08 AM
Hi
Thanks for your reply.
The issue is in AWS IoT Python SDK v2 that for communication with the local component we have to create request instance PublishToTopicRequest that accept topic with-param name "topic"
but when we have to communicate with Cloud then we have to create request instance PublishToIoTTopicRequest and this class accepts topic with-param name topic_name. I have one question why you dont have the same param name at both places. It
s confusing
See the param names of both classes in the attachment.
And previously it`s not mentioned in Greengrass v2 documentation.
Edited by: allenkallz on Jan 8, 2021 8:37 AM
Relevant content
- Accepted Answerasked a month ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago