[IOTDM-27] exception not handled if notification URI (nu) is not formatted properly Created: 24/Aug/15  Updated: 20/Nov/17  Resolved: 03/Mar/17

Status: Resolved
Project: iotdm
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Lionel Florit Assignee: Tomas Janciga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4178
Priority: Normal

 Description   

if we create a subscription with nu=10.10.1.1 (instead of nu=http://10.10.1.1) we get an exception:

Subscription:

{ "nu": [ "10.10.1.1" ], "ty": 23, "rn": "/ODL-oneM2M-Cse/TestAE/TestContainer/TestSubscription2", "ri": "/ODL-oneM2M-Cse/g", "lt": "20150824T173328Z", "pi": "/ODL-oneM2M-Cse/b", "ct": "20150824T173328Z" }

When the notification is triggered, this appears in the karaf console

opendaylight-user@root>Exception in thread "pool-31-thread-11" java.lang.IllegalArgumentException: !Absolute URI: 10.10.1.1
at org.eclipse.jetty.client.HttpExchange.setURI(HttpExchange.java:608)
at org.eclipse.jetty.client.HttpExchange.setURL(HttpExchange.java:431)
at org.opendaylight.iotdm.onem2m.protocols.http.Onem2mHttpProvider.sendNotification(Onem2mHttpProvider.java:285)
at org.opendaylight.iotdm.onem2m.notifier.Onem2mNotifierService.executorOnResourceChanged(Onem2mNotifierService.java:80)
at org.opendaylight.iotdm.onem2m.notifier.Onem2mNotifierService.access$000(Onem2mNotifierService.java:25)
at org.opendaylight.iotdm.onem2m.notifier.Onem2mNotifierService$1.run(Onem2mNotifierService.java:90)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Lionel Florit [ 22/Feb/17 ]

Should check if the format starts with:
http://172.25.0.10:8080,
coap://m2m.sp.com:5683,
mqtt://172.25.0.10:1883

Generated at Wed Feb 07 20:04:58 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.