senzing-garage / senzing-poc-server

Senzing API Server plus management APIs.
Apache License 2.0
0 stars 1 forks source link

api/bulk-data/analyze: 500 Server Error #21

Closed docktermj closed 2 years ago

docktermj commented 3 years ago

Describe the bug

When using the Entity Search Web App to load (menu > Admin > Load Data) the contents of /opt/senzing/g2/python/demo/sample/sample_company.json` the following error is seen in the Entity Search Web App:

Http failure response for http://localhost:8251/api/bulk-data/analyze: 500 Server Error 

The Senzing POC server log show the following:

REQUEST: Request(POST //localhost:8251/bulk-data/analyze)@493b8129

2021-10-15 15:04:25.975:WARN:oejs.HttpChannel:qtp1754444726-41: /bulk-data/analyze: javax.servlet.ServletException: java.lang.IllegalStateException: JsonParser#getArray() or JsonParser#getArrayStream() is valid only for START_ARRAY parser state. But current parser state is START_OBJECT

2021-10-15 15:04:25.975:WARN:oejs.HttpChannelState:qtp1754444726-41: unhandled due to prior sendError: javax.servlet.ServletException: java.lang.IllegalStateException: JsonParser#getArray() or JsonParser#getArrayStream() is valid only for START_ARRAY parser state. But current parser state is START_OBJECT

This error is seen on a Senzing stack using RabbitMQ and PostgreSQL.

To Reproduce Steps to reproduce the behavior:

  1. Clone repository
export GIT_ACCOUNT=senzing
export GIT_REPOSITORY=docker-compose-demo
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
export GIT_REPOSITORY_URL="https://github.com/${GIT_ACCOUNT}/${GIT_REPOSITORY}.git"
mkdir --parents ${GIT_ACCOUNT_DIR}
cd  ${GIT_ACCOUNT_DIR}
git clone  --recurse-submodules ${GIT_REPOSITORY_URL}
  1. Checkout branch.
cd ${GIT_REPOSITORY_DIR}
git checkout issue-211.dockter.1
  1. Bring up docker-compose formation. https://github.com/Senzing/docker-compose-demo/blob/master/docs/docker-compose-rabbitmq-postgresql/README.md
  2. Load data. In Entity Search Web App, localhost:8251:
    1. menu > Admin > Load Data
      1. Note: At this point "Error Encountered" is seen.
    2. Chose .../g2/python/demo/sample/sample_company.json
      1. "Http failure response for http://localhost:8251/api/bulk-data/analyze: 500 Server Error " is seen.
docktermj commented 3 years ago

Current docker-compose.yaml definitions:

  1. senzing-poc-server
  2. Entity Search Web App
barrycaceres commented 2 years ago

This had to do with sending JSON-lines formatted data while specifying a content-type of application/json.

I don't think that there is anything for @Ara or myself to address in this. Reassigning to @docktermj and you can close if you agree or assign back to one of us with a counter-argument.