I have a servlet, powered by Tomcat 8, which calls for a static method to perform JSON parsing with Jackson 2.9.6.
During the code execution:
JSONData parsedJSONData = PDFGenerator.parseJSONDocument(jsonDocument);
I get:
java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonProcessingException
It's important to note, that servlet class and PDFGenerator class are located in different packages but with public access modifiers.
I tried to add dependencies to the root of the project via pom.xml:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.6</version>
</dependency>
but it doesn't help.
In my project I'm not using Maven, rather just added needed libraries via classpath.
What's strange is that such exception appears only when I try to call PDFGenerator.parseJSONDocument(jsonDocument) from a servlet, execution from a regular Java-class works smoothly.
What and where should I add in order to be able calling a static method with the JSON parser functionality based on a FasterXML/Jackson JSON library?
PDFGeneratorclass are located in different packages but withpublicaccess modifiers.