Reputation: 1294
I am getting this error at my tomcat server 6 using iReport 1.3.0, iTest 2.1.0, jasper libraies jasperreports-1.2.8-javaflow.jar
some of forum told use iText jar lates, i also replace with latest and clean project and rebuild but still getting same problem.
Error :
**SEVERE: Servlet.service() for servlet default threw exception
java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
at net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1046)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:581)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:549)**
Upvotes: 1
Views: 4475
Reputation: 210
Brandizzi did this the correct way. I was previously on iText 2.0.8. Moved my org.xhtmlrenderer:core-renderer version to R8 and the issue was resolved.
Upvotes: -1
Reputation: 27050
For those using the amazing Flying Saucer with Maven and getting this same error, just change the version of the library from an old one (in my case R8pre2
) to a new one (in my case, R8
):
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>core-renderer</artifactId>
<version>R8</version>
</dependency>
Upvotes: 1
Reputation: 1294
Hey no worries, i have solved it, its iText jar version incompatibility.
I have two iText.2.1.0.jar and iText.1.3.1.jar. i removed iText.2.1.0.jar.
Upvotes: 3