Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: NoSuchMethodError with PDPageContentStream

Tags:

java

pdfbox

I am trying to use PDFBox in Java but get a NoSuchMethodError when trying to create a PDPageContentStream object. The error I get at execution is:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.pdfbox.pdmodel.PDPage.hasContents()Z

Thanks.

like image 826
m_h Avatar asked Mar 16 '17 09:03

m_h


1 Answers

The problem has been solved. I had added two different versions of pdfbox to my project. When I removed the older version, the NoSuchMethodError disappeared.

like image 51
m_h Avatar answered Oct 18 '22 11:10

m_h