[infinispan-dev] NoSuchMethodError in Spark simple tutorial

Galder Zamarreño galder at redhat.com
Thu Mar 23 09:40:00 EDT 2017


Hey guys,

The Spark Java simple tutorial [1] tutorial does not work as is due to some dependencies mix up.

If you run that class, with the dependencies defined in the pom.xml, you get:

java.lang.NoSuchMethodError: org.infinispan.client.hotrod.logging.Log.tracef(Ljava/lang/Throwable;Ljava/lang/String;II)V

The dependencies are defined as:

<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-spark_2.11</artifactId>
  <version>0.4</version>
</dependency>
...

Looking at the dependency tree, I see this:

[INFO] +- org.infinispan:infinispan-spark_2.11:jar:0.4:compile
[INFO] |  +- org.infinispan:infinispan-client-hotrod:jar:9.0.0.Alpha4:compile
...
[INFO] |  +- org.infinispan.protostream:protostream:jar:3.0.5.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.1.4.GA:compile

That logging jar seems an old one, it should be 3.3.x. I worked around this by doing:

<dependency>
  <groupId>org.infinispan</groupId>
  <artifactId>infinispan-spark_2.11</artifactId>
  <version>${version.spark-connector}</version>
  <exclusions>
    <exclusion>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.jboss.logging</groupId>
  <artifactId>jboss-logging</artifactId>
  <version>${version.jboss.logging}</version>
</dependency>

@Adrian Are the dependencies of the latest protostream versions in line with the infinispan hot rod client ones?

@Gustavo, Once there's a client version which depends on a protostream version that fixes this (if there's not one already...), can you release a 0.5 alpha/beta/cr version?

Cheers,

[1] http://infinispan.org/tutorials/simple/spark/
--
Galder Zamarreño
Infinispan, Red Hat




More information about the infinispan-dev mailing list