I am using Java Spring 2.3.2 application to generate pdf files with jasperreports and lowagie:itext. The old lowagie:itext dependancy (2.1.7) works just fine, but when I upgrade it to the latest version (4.2.2), it returns error message saying that it could not find PdfGState class:
18:26:02.169 ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfGState] with root cause
java.lang.ClassNotFoundException: com.lowagie.text.pdf.PdfGState
Snipet from build.gradle:
implementation "net.sf.jasperreports:jasperreports:6.14.0"
implementation "com.lowagie:itext:4.2.2"
What might be the problem here?