OpenBankProject / OpenBankProject/OBP-API

net.liftweb.json.JsonParser$ParseException: unknown token

Open
#596 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

A few exceptions like this have popped up recently on https://bnpparibas-irb.openbankproject.com:

Sat Jun 10 09:50:42 UTC 2017: net.liftweb.json.JsonParser$ParseException: unknown token <
Near: <h
	at net.liftweb.json.JsonParser$Parser.fail(JsonParser.scala:234)
	at net.liftweb.json.JsonParser$Parser.nextToken(JsonParser.scala:321)
	at net.liftweb.json.JsonParser$$anonfun$2.apply(JsonParser.scala:188)
	at net.liftweb.json.JsonParser$$anonfun$2.apply(JsonParser.scala:141)
	at net.liftweb.json.JsonParser$.parse(JsonParser.scala:80)
	at net.liftweb.json.JsonParser$.parse(JsonParser.scala:45)
	at net.liftweb.json.package$.parse(package.scala:41)
	at code.search.elasticsearch$$anonfun$getAPIResponse$2.apply(search.scala:75)
	at code.search.elasticsearch$$anonfun$getAPIResponse$2.apply(search.scala:72)
	at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
	at scala.util.Try$.apply(Try.scala:192)
	at scala.util.Success.map(Try.scala:237)
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
	at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
	at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in search.scala around line 75, where the Elasticsearch API response is parsed, and review the JsonParser stack trace around JsonParser.scala. Reproduce or inspect responses containing the reported '<' token to determine the failing response path. Done should include handling this response without the reported ParseException.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, scala
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.