json4s noSuchMethodError when querying deployed engine in predictionIO

207 views Asked by At

I have a data stack built around PredictionIO 0.14. I use ES 6.4.2, spark2.4.3, and scala 2.11.12(because spark 2.4.3 is back to scala 2.11 as default). I manage to do pio build, pio train, and pio deploy. I'm able to see the engine info if I open the page where the engine is deployed as web service, however I'm not able to query it with curl. I try to do:

curl -k -XPOST http://host:port/queries.json

(using the correct host and port)

but I get the following error:

Query:

Stack Trace:

java.lang.NoSuchMethodError: org.json4s.jackson.JsonMethods$.parse(Lorg/json4s/JsonInput;Z)Lorg/json4s/JsonAST$JValue;

at com.actionml.URAlgorithm.buildQueryShould(URAlgorithm.scala:668)

at com.actionml.URAlgorithm.buildQuery(URAlgorithm.scala:585)

at com.actionml.URAlgorithm.predict(URAlgorithm.scala:488)

at com.actionml.URAlgorithm.predict(URAlgorithm.scala:180)

I looked for info and I believe it's due to scala2.11 not having the proper libraries. I would upgrade to scala2.12 but that would again have other serious conflicts with ElasticSearch 6+. Somehow a solution would be to upload the proper json4s libraries, but I don't know how to do that and where I should put my hands on. It.s strange that the curl command itself has this issue, but it looks like it's related to scala. Do you guys have any suggestion?

1

There are 1 answers

0
Filippo Xausa On

Downgrading ES from version 6 to version 5.6 worked for me. I believe ES6 still has incompatibilities with certain scala libraries.