Hi,
We developed some KNIME extensions that make use of Jersey 2. When we install the “Apache Spark” extension, Jersey 1.0 (possibly from “Apache Spark”) starts conflicting with Jersey 2.0.
We’re not exporting the jersey 2 library from our bundle. Is there anything I can do to fix this, or is this a problem with the “Apache Spark” extension? Any input will be appreciated.
Thank You,
Wiraj
Exhibits:
With both extensions installed I get the following error when I try to run the nodes using Jersey 2. I
ERROR I2E Query Submitter 0:1 Execute failed: HTTP request/response processing failure: A MultiException has 2 exceptions. They are:
java.lang.ClassCastException: com.sun.jersey.core.impl.provider.entity.StringProvider cannot be cast to javax.ws.rs.ext.MessageBodyReader
java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.message.internal.MessageBodyFactory
Attachment containing full stack trace: stack-trace.txt (11.7 KB)
Hi @wbibile,
Can you share the MANIFEST.MF file of the plugin with me? That might tell me if there is a configuration issue on your side. As a first guess, are you using import package in your plugin dependencies somewhere? This is a common cause for such issues.
Something you should also test is if the spark nodes still work if your plugin is installed, or do they also fail?
Hi @gab1one
I don’t see any import package statements in our MANIFEST.MF (see attached file). Also thanks for your advice, I will make sure that the sparks plugin also works.
This was caused by ServiceFinderBinder.configure() scanning all JAR files for HK2 service providers. Can be fixed by turning off manifest service look up as follows.