0

I'm working with Impinj Octane SDK 3.7.0 and Java Spring boot. I want to import the package to my solution, but I'm finding several problems with it. This is what I have done so far:

mvn install:install-file -Dfile=OctaneSDKJava-3.7.0.0-jar-with-dependencies.jar -DgroupId=com.impinj -DartifactId=octane -Dversion=3.7.0.0 -Dpackaging=jar

It builds succesfully, and I can use Octane SDK's classes but when I run the programme, then appears the following error:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration$StandardGsonBuilderCustomizer.customize(GsonAutoConfiguration.java:90)

The following method did not exist:

'com.google.gson.GsonBuilder com.google.gson.GsonBuilder.setLenient()'

The method's class, com.google.gson.GsonBuilder, is available from the following locations:

jar:file:/C:/Users/hyc/.m2/repository/com/impinj/octane/3.7.0.0/octane-3.7.0.0.jar!/com/google/gson/GsonBuilder.class

The class hierarchy was loaded from the following locations:

com.google.gson.GsonBuilder: file:/C:/Users/hyc/.m2/repository/com/impinj/octane/3.7.0.0/octane-3.7.0.0.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of com.google.gson.GsonBuilder

What should in order to make it work??

1 Answer 1

0

I finally found the solution, I only had to add the latest gson dependency into the pom.xml file:

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>
Sign up to request clarification or add additional context in comments.

1 Comment

Can you just add lines that you add in your pom.xml file ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.