All,
I stumbled on the follwoing problem with the KREST nodes. Whenever I do a succesful post, the node returns a NullPointerException.
Here's what is returned from the HTTPS call:
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 14 Apr 2015 09:09:05 GMT
Content-Length: 0
Here's what is in the knime.log:
2015-04-14 11:03:01,389 DEBUG main POST Resource : reset 2015-04-14 11:03:01,389 WARN main POST Resource : Please regard that reseting the node will not undo requests you have sent to the server! 2015-04-14 11:03:01,389 DEBUG main POST Resource : clean output ports. 2015-04-14 11:03:01,390 DEBUG main NodeContainer : POST Resource 0:101:1 has new state: IDLE 2015-04-14 11:03:01,392 DEBUG main POST Resource : Configure succeeded. (POST Resource) 2015-04-14 11:03:01,392 DEBUG main NodeContainer : POST Resource 0:101:1 has new state: CONFIGURED 2015-04-14 11:03:03,994 DEBUG main ExecuteAction : Creating execution job for 1 node(s)... 2015-04-14 11:03:03,994 DEBUG main NodeContainer : POST Resource 0:101:1 has new state: CONFIGURED_MARKEDFOREXEC 2015-04-14 11:03:03,994 DEBUG main NodeContainer : POST Resource 0:101:1 has new state: CONFIGURED_QUEUED 2015-04-14 11:03:03,994 DEBUG main NodeContainer : Post Predictions 0:101 has new state: EXECUTING 2015-04-14 11:03:03,994 DEBUG main NodeContainer : AppDet_Predict 0 has new state: EXECUTING 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 WorkflowManager : POST Resource 0:101:1 doBeforePreExecution 2015-04-14 11:03:03,995 DEBUG KNIME-WFM-Parent-Notifier NodeContainer : ROOT has new state: EXECUTING 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 NodeContainer : POST Resource 0:101:1 has new state: PREEXECUTE 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 WorkflowManager : POST Resource 0:101:1 doBeforeExecution 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 NodeContainer : POST Resource 0:101:1 has new state: EXECUTING 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 WorkflowFileStoreHandlerRepository : Adding handler a3dd3d92-0997-452a-b100-3af92ad4a3a3 (POST Resource 0:101:1: <no directory>) - 1 in total 2015-04-14 11:03:03,995 DEBUG KNIME-Worker-47 LocalNodeExecutionJob : POST Resource 0:101:1 Start execute 2015-04-14 11:03:03,995 INFO KNIME-Worker-47 SingleRestNodeModel : Execute REST Node ... 2015-04-14 11:03:04,307 DEBUG KNIME-Worker-47 POST Resource : reset 2015-04-14 11:03:04,307 WARN KNIME-Worker-47 POST Resource : Please regard that reseting the node will not undo requests you have sent to the server! 2015-04-14 11:03:04,307 ERROR KNIME-Worker-47 POST Resource : Execute failed: ("NullPointerException"): null 2015-04-14 11:03:04,307 DEBUG KNIME-Worker-47 POST Resource : Execute failed: ("NullPointerException"): null java.lang.NullPointerException at com.cenix.krest.nodes.submitter.single.SingleResponseHandler.getDataFormatForResponse(SingleResponseHandler.java:312) at com.cenix.krest.nodes.submitter.single.SingleResponseHandler.<init>(SingleResponseHandler.java:75) at com.cenix.krest.nodes.submitter.single.SingleRestNodeModel.processResponse(SingleRestNodeModel.java:230) at com.cenix.krest.nodes.submitter.single.SingleRestNodeModel.execute(SingleRestNodeModel.java:215) at org.knime.core.node.NodeModel.execute(NodeModel.java:706) at org.knime.core.node.NodeModel.executeModel(NodeModel.java:555) at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1131) at org.knime.core.node.Node.execute(Node.java:927) at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559) at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95) at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179) at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110) at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328) at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:125) at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:248) 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 WorkflowManager : POST Resource 0:101:1 doBeforePostExecution 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 NodeContainer : POST Resource 0:101:1 has new state: POSTEXECUTE 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 WorkflowManager : POST Resource 0:101:1 doAfterExecute - failure 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 POST Resource : reset 2015-04-14 11:03:04,308 WARN KNIME-Worker-47 POST Resource : Please regard that reseting the node will not undo requests you have sent to the server! 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 POST Resource : clean output ports. 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 WorkflowFileStoreHandlerRepository : Removing handler a3dd3d92-0997-452a-b100-3af92ad4a3a3 (POST Resource 0:101:1: <no directory>) - 0 remaining 2015-04-14 11:03:04,308 DEBUG KNIME-Worker-47 NodeContainer : POST Resource 0:101:1 has new state: IDLE 2015-04-14 11:03:04,309 DEBUG KNIME-Worker-47 POST Resource : Configure succeeded. (POST Resource) 2015-04-14 11:03:04,309 DEBUG KNIME-Worker-47 NodeContainer : POST Resource 0:101:1 has new state: CONFIGURED 2015-04-14 11:03:04,309 DEBUG KNIME-Worker-47 NodeContainer : Post Predictions 0:101 has new state: IDLE 2015-04-14 11:03:04,309 DEBUG KNIME-Worker-47 NodeContainer : AppDet_Predict 0 has new state: IDLE 2015-04-14 11:03:04,309 DEBUG KNIME-WFM-Parent-Notifier NodeContainer : ROOT has new state: IDLE
Doesn't the POST resource node support an empty (meaning Content-Length=0) HTTP 200 response? Or is there something else wrong?
Tim