Issue when testing a process

23 views
Skip to first unread message

Mathieu Pedrero

unread,
Jul 20, 2020, 5:57:47 AM7/20/20
to Nussknacker
Hi everyone,

I'm currently working with Nussknacker 0.1.2, and Flink 1.9.1_2.12 (don't hesitate if you need some additional information).

I built a process with Nussknacker (using a source, a switch, some mapvariables, an union, a custom transformation and a sink). This process works fine when deployed on Flink (throgh NN, obviously).

But i've got a problem when I try to test (with file import) the process on the NN gui (after having generated a small test file through the UI).

The test attempt fails with the following exception :

java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;
    at org.reflections.Reflections.expandSuperTypes(Reflections.java:380) ~[my-nussknacker-api-1.0-SNAPSHOT-all.jar:1.0-SNAPSHOT]
    at org.reflections.Reflections.<init>(Reflections.java:126) ~[my-nussknacker-api-1.0-SNAPSHOT-all.jar:1.0-SNAPSHOT]
    at fr.diginext.mbx.api.domain.utils.ClassUtil.<clinit>(ClassUtil.java:71) ~[my-nussknacker-api-1.0-SNAPSHOT-all.jar:1.0-SNAPSHOT]

It sounds to me as a version conflict of the guava dependency between the one I embed (and use) in my API jar and the one used by Nussknacker (I've allready faced these kind NoSuchMethodError in other context, and the cause was allways conflict in dependencies).

What do you guys think about this issue ? In my opinion, even if I could build workarounds (maybe by relocating guava packages building the API jar? I don't event know it it could work), it's a NN bug (as the process works fine once deployed in flink).

Thanks a lot, and best regards.
--

Maciek Próchniak

unread,
Jul 20, 2020, 7:39:51 AM7/20/20
to Nussknacker
Hi Mathieu,

yes, probably you are right, probably it's guava versions conflict. The problem is that Flink runtime classpath is different than Nussknacker one. And yes, you're right, this should be handled in NK, not forcing you to use workarounds.
Unfortunately, the solution is not trivial - we'll probably have to make sth along the lines of Flink plugins: https://ci.apache.org/projects/flink/flink-docs-stable/ops/plugins.html to better separate various classloaders.
I created an issue in NK https://github.com/TouK/nussknacker/issues/1074 to track this.  Meanwhile, I'm afraid shading is the best workaround...

thanks,
maciek 

Mathieu Pedrero

unread,
Jul 20, 2020, 9:08:29 AM7/20/20
to Nussknacker
Hi Maciek,

Thanks for creating the issue.

For your information, I just relocated the guava packages in my API, and its enough for me to run tests through the NK gui.

Thanks, and best regards.

--
Reply all
Reply to author
Forward
0 new messages