3

My project use Spring MVC for front End and EJB for back-end. when i use jackson to serialize and deserialize json string in controller level bellow code working properly but service layer it gives an error "class file for com.fasterxml.jackson.core.JsonParseException not found"

ObjectMapper mapper = new ObjectMapper();
Object convertedObject = mapper.readValue(jsonString, class);

and my module pom file include dependency.

       <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.3.0</version>
      </dependency>

this error comes wth mapper after creating object.

Error: Error:(247, 67) java: cannot access com.fasterxml.jackson.core.JsonParseException class file for com.fasterxml.jackson.core.JsonParseException not found

0

1 Answer 1

9

You also need to include

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.3.2</version>
</dependency>
Sign up to request clarification or add additional context in comments.

Comments

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.