Visit the official Paxata Documentation portal for all of your doc needs.

NoSuchElementException key not found

Problem Symptoms:

1.  Unable to open the Project in the UI, get the spinner along with the error message "Unexpected error occurred".  At the same time, trying to open the project in the UI gives the following ERROR in the frontend.log

2017-04-03 15:31:12.809 GMT-0700 ERROR [t1user1-06f0ae30cb1e442b8225b447581b3e09-19-825cbf360797467f9524b52a297b0dde-dataManagerService.getData] PipelineExecuteResult$ - Pipeline request failed:Stream(class java.util.NoSuchElementException = key not found: some_column_name, ?)

2.  Unable to Publish the Project using the REST API.  Depending on the Paxata version you are using, you could either see this error come back from trying to publish via REST:

<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 417 </title> </head> <body> <h2>HTTP ERROR: 417</h2> <p>Problem accessing /rest/project/publish. Reason:
<pre> FATAL: Failed to publish UpdateDataset (UpdateScriptLens)</pre></p>

<hr /><i><small>Powered by Jetty://</small></i>

</body> </html>


OR this error:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /rest/project/publish. Reason:
<pre>    Unexpected server failure</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>


Problem Cause:

The problem is typically caused by using the /scripts REST API endpoint to update a project to use an updated dataset that has a schema which differs from the original dataset.  The new schema either has one or more fewer columns than the original OR one or more additional columns which didn't exist in the original.

Note:

1.  The problem described in this article is NOT a bug because, in order to use the REST API to properly update the project to use the latest version of a dataset, in addition to making a REST call to update the project to use the latest version:


you must also check the new dataset's schema and update the project script itself as well, if there is a change in schema.  This is necessary because the project script expects the same schema, even if new or removed columns are not explicitly used/needed in any particular project step.

2.  The use of the /scripts endpoint to modify Project scripts is not officially supported since the json format of Project scripts is undocumented and is subject to change at any time without notice.


Workaround(s):

You can correct the problem by Editing the Project in the Paxata Web UI:

1.  In the Project, click on the "steps" tool to open the Project Step Editor.
2.  Starting from the first/bottom step, click on each step in the Project until you find the one that gives the spinner/unexpected error (the problem step is usually a Lookup or Append step, any step that imports a dataset).
3.  Replace that step with an identical step which you redefine via the web UI (editing the Project in this manner, via the UI, will result in the Project script getting updated correctly).
Sign In or Register to comment.