[infinispan-dev] NoSuchMethodError in Spark simple tutorial

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[infinispan-dev] NoSuchMethodError in Spark simple tutorial

Galder Zamarreño
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


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [infinispan-dev] NoSuchMethodError in Spark simple tutorial

Gustavo Fernandes-2
This was fixed [1]

Regarding the tutorial, I could run it "as is":

git clone https://github.com/infinispan/infinispan-simple-tutorials.git
cd infinispan-simple-tutorials
mvn clean install
cd spark
mvn exec:exec


How did you reproduced the issue?


[1] https://issues.jboss.org/browse/ISPRK-33


Thanks,
Gustavo

On Thu, Mar 23, 2017 at 1:40 PM, Galder Zamarreño <[hidden email]> wrote:
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


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [infinispan-dev] NoSuchMethodError in Spark simple tutorial

Galder Zamarreño
Ok, I think I know what I was doing wrong. I was trying to use the spark tutorial on its own, without the parent dependencies. As a result of that, the Infinispan Client being resolved was Alpha4.

In the simple tutorials, the parent pom defines an Infinispan dependency that's newer and the dependency resolution ends up picking up the newer version and hence it works.

I don't think this should be the case, the spark tutorial shouldn't be relying on this kind of mixed dependencies resolution.  That's why I think there should have been a Spark release that fixes the Alpha4 problem.

On top of that, I find tutorials should be runnable on their own, without parent dependencies. This might make tutorial poms bigger or more verbose but I think it helps with users when trying to run each individually outside of the simple tutorials repo.

Cheers,
--
Galder Zamarreño
Infinispan, Red Hat

> On 24 Mar 2017, at 02:31, Gustavo Fernandes <[hidden email]> wrote:
>
> This was fixed [1]
>
> Regarding the tutorial, I could run it "as is":
>
> git clone https://github.com/infinispan/infinispan-simple-tutorials.git
> cd infinispan-simple-tutorials
> mvn clean install
> cd spark
> mvn exec:exec
>
>
> How did you reproduced the issue?
>
>
> [1] https://issues.jboss.org/browse/ISPRK-33
>
>
> Thanks,
> Gustavo
>
> On Thu, Mar 23, 2017 at 1:40 PM, Galder Zamarreño <[hidden email]> wrote:
> 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
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Loading...