We are developing a module which requires minimum version 20 of com.google.guava. Despite the module has v26 jar, it keeps getting a “NoSuchMethodError” on 7.9 gateway:
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V
at io.grpc.Metadata$Key.validateName(Metadata.java:742)
at io.grpc.Metadata$Key.(Metadata.java:750)
at io.grpc.Metadata$Key.(Metadata.java:668)
at io.grpc.Metadata$AsciiKey.(Metadata.java:959)
at io.grpc.Metadata$AsciiKey.(Metadata.java:954)
Here are all the guava jar on my test server:
- /usr/local/ignition/lib/core/common/guava-18.0.jar
- /usr/local/ignition/data/jar-cache/xopc/__1724772503__guava-19.0.jar
- /usr/local/ignition/data/jar-cache/logix-v21/__531933567__guava-18.0.jar
- /usr/local/ignition/data/jar-cache/dnp3-driver/__3840122197__guava-18.0.jar
- /usr/local/ignition/data/jar-cache/my_own_module/__2355914147__guava-26.0-jre.jar
- /usr/local/ignition/data/jar-cache/omron-driver/__3441177098__guava-18.0.jar
After I deploy the module (built by same SDK version, only change Ignition version), the error is gone, and here are the guava jar of Ignition 8:
- /usr/local/ignition8/lib/core/common/guava-23.3-jre.jar
- /usr/local/ignition8/data/jar-cache/com.inductiveautomation.opcua/__1111845471__guava-26.0-jre.jar
- /usr/local/ignition8/data/jar-cache/com.inductiveautomation.opcua.drivers.dnp3/__1109255087__guava-18.0.jar
- /usr/local/ignition8/data/jar-cache/my_own_module/__200494045__guava-26.0-jre.jar
- /usr/local/ignition8/data/jar-cache/com.inductiveautomation.opcua.drivers.omron/__4248771045__guava-23.3-jre.jar
Is there any way we can fix this on Ignition 7? Thanks!
I did try replacing jar and restart but it didn’t help.