webhook error

35 views
Skip to first unread message

stefan

unread,
Jan 30, 2013, 7:56:22 AM1/30/13
to iot...@googlegroups.com
Hello
I try to use iotope:node as webhook. But everytime when I apply a touchatag-Chip on the reader, it causes the following java-exception:

{"application":null,"fields":null,"targetContent":{"tagType":"LEGACY","blocks":[
{"type":"NDEF","ndef":{"records":[{"payload":"AXR0YWcuYmUvbS8wNDYyNjRCQTM0MjM4MA
==","uri":"http://www.ttag.be/m/046264BA342380","rtd":"urn:nfc:wkt:U","represent
ation":"http://www.ttag.be/m/046264BA342380","id":null,"length":0,"content":"htt
p://www.ttag.be/m/046264BA342380"}]}},{"type":"LEGACY_HASH","block":"fCNBaO5xnuT
EjHyxgA=="},{"type":"MEMORY_RW_BLOCK","block":"AAAAAA=="},{"type":"LEGACY_TAGDAT
A","block":"BGJkiro0I4AtSP9/4RAGAAMd0QEZVQF0dGFnLmJlL20vMDQ2MjY0QkEzNDIzODB8I0Fo
7nGe5MSMfLGAAAAAAA=="}]},"nfcTarget":{"dep":false,"nfcId":"BGJkujQjgA==","nfc3Id
":null,"nfc1Id":"BGJkujQjgA==","type":"MIFARE_ULTRALIGHT"}}
org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): e
xpected a valid value (number, String, array, object, 'true', 'false' or 'null')

 at [Source: java.io.StringReader@13e8ad9; line: 1, column: 2]
        at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)
        at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)
        at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442)
        at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198)
        at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485)
        at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770)
        at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863)
        at org.iotope.node.apps.WebHook.execute(WebHook.java:54)
        at org.iotope.pipeline.ExecutionWrapper.execute(ExecutionWrapper.java:118)
        at org.iotope.pipeline.ExecutionPipeline.startPipeline(ExecutionPipeline.java:32)
        at org.iotope.node.reader.PollThread.startPipeline(PollThread.java:158)
        at org.iotope.node.reader.PollThread.handleNewTargets(PollThread.java:82)
        at org.iotope.node.reader.PollThread.run(PollThread.java:67)
        at java.lang.Thread.run(Unknown Source)

Looks like the JSON-Object contains html or something else.
The webpage, that retrieves the HTTP POST, noticed that the POST-content is empty.

May anybody help?

stefan

unread,
Apr 5, 2013, 3:14:32 AM4/5/13
to iot...@googlegroups.com
Looks like activity is very low here. Has no one an idea about this?

Alex Van Boxel

unread,
Apr 16, 2013, 1:45:54 AM4/16/13
to iot...@googlegroups.com
I've been looking into this... but I'm not sure what it is... I think the problem is in the response you're server sends. The node expects nothing (not XML) or JSON

Alex Van Boxel

unread,
Apr 16, 2013, 1:47:56 AM4/16/13
to iot...@googlegroups.com
Yes I'm sorry for this. I'm afraid most of the time on my IOTOPE project is spend on Android (for events). The Java counterpart is still being worked on (I'll be preping it so it well work on a raspberry pi).
Reply all
Reply to author
Forward
0 new messages