Open teichmaj opened 4 years ago
Hey Jan, I took a look at your example and compared it to our reference here.
Where you read the bundle, what happens if you substitute jar:
for file:
? Given your model resources are a folder rather than a .zip I'd expect you'd need the file:
prefix.
Hi Stuart, thanks for having a look at this. I build the project with build.sbt
and exportJars := true
and the resource folder ends up in the jar. The unit test works fine and the bundle file is being read with the current code. Using file:
throws a NullPointerException
@teichmaj taking a look, will keep you posted.
I falsely thought I fixed it with switching versions to scala 2.12.10
and mleap 0.14
Still the same error when KSQL tries to init the UDF.
I am trying to create a KSQL UDF serving a Mleap model. The code for a toy example can be found here: https://gitlab.com/jan-teichmann/ksql-iris-classifier-udf
I am loading a pipeline from a BundleFile following the documentation with
I have a unit test which confirms that the pipeline works as expected and
sbt test
runs successfully. I then create an uber jar with the sbt assembly plugin and put that in the extension folder of KSQL which then loads and tries to instantiate the UDF. This fails withscala.ScalaReflectionException: object scala.Predef not found.
Has anyone an idea what might go wrong here?