REST POST fails with NullPointerException against some env. but fine against another

Hey, K-REST gurus,

I am using KREST1 that comes with new install of KNIME 2.11.03.

My first request is POST request to authenticate. It works fine against one environment but fails against 2 other environments with NullPointerException. All environments are essentially host the same RESTful app server, just with different underlying users and data.

I added REST logging but it shows valid request being sent to the server although the response is never received. I tested the same URL with auth data using Chrome Postman extension - works fine. Wrote small console app in C# that runs against the problematic environment - works fine.

Here is what I found in knime.log:

2015-05-06 17:46:44,041 ERROR KNIME-Worker-49 POST Resource : Execute failed: ("NullPointerException"): null
2015-05-06 17:46:44,041 DEBUG KNIME-Worker-49 POST Resource : Execute failed: ("NullPointerException"): null
    at com.cenix.krest.nodes.submitter.single.SingleResponseHandler.getDataFormatForResponse(
    at com.cenix.krest.nodes.submitter.single.SingleResponseHandler.<init>(
    at com.cenix.krest.nodes.submitter.single.SingleRestNodeModel.processResponse(
    at com.cenix.krest.nodes.submitter.single.SingleRestNodeModel.execute(
    at org.knime.core.node.NodeModel.execute(
    at org.knime.core.node.NodeModel.executeModel(
    at org.knime.core.node.Node.invokeFullyNodeModelExecute(
    at org.knime.core.node.Node.execute(
    at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(
    at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(
    at org.knime.core.node.workflow.NodeExecutionJob.internalRun(
    at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(
    at org.knime.core.util.ThreadUtils$
    at java.util.concurrent.Executors$ Source)
    at Source)
    at org.knime.core.util.ThreadPool$
    at org.knime.core.util.ThreadPool$
2015-05-06 17:46:44,057 DEBUG KNIME-Worker-49 WorkflowManager : POST Resource 0:15 doBeforePostExecution
2015-05-06 17:46:44,057 DEBUG KNIME-Worker-49 NodeContainer : POST Resource 0:15 has new state: POSTEXECUTE
2015-05-06 17:46:44,057 DEBUG KNIME-Worker-49 WorkflowManager : POST Resource 0:15 doAfterExecute - failure
2015-05-06 17:46:44,057 DEBUG KNIME-Worker-49 POST Resource : reset

What could it be? This drives me crazy...

Any help is greatly appreciated.




It could be the same problem I encountered a while back (see ).

There the problem was that in some cases the response did not have any content (this is by design, and  a perfectly normal response). The KREST1 code does not handle this case correctly.

So you could check the HTTP headers that your service gives back and check what it returns.


PS: Are there any  KREST developers still active in the KNIME community?


I was expecting to get notification on any update in this forum but apparently none arrived. This is why I saw your response only now.

The situation became even worse - I slightly changed the flow and now the same POST request with the same data fails. This time with another error:

2015-05-14 17:06:46,395 DEBUG KNIME-Worker-33 POST Resource : Execute failed: ("ArrayIndexOutOfBoundsException"): null
2015-05-14 17:06:46,395 DEBUG KNIME-Worker-33 WorkflowManager : POST Resource 2:15 doBeforePostExecution
2015-05-14 17:06:46,395 DEBUG KNIME-Worker-33 NodeContainer : POST Resource 2:15 has new state: POSTEXECUTE
2015-05-14 17:06:46,395 DEBUG KNIME-Worker-33 WorkflowManager : POST Resource 2:15 doAfterExecute - failure

From your older post it seems that KREST2 should better handle these situations but I have no idea from where to download and how to install.

Any further suggestions are greatly appreciated.

Thanks, Leo

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.