eclipse - How to resolve LinkageError with JasperReports (6.*)? -
e.g. got:
net.sf.jasperreports.engine.jrexception: ... caused by: net.sf.jasperreports.engine.fill.jrexpressionevalexception: error evaluating expression source text: $p{report_scriptlet}.settestraw_logon_tstmsgon(true, true) caused by: java.lang.linkageerror: loader constraint violation: loader (instance of java/net/factoryurlclassloader) initiated loading different type name "org/slf4j/logger" running in eclipse (kepler) preview jr plugin v6.1.0, not eclipse running 5.5.1.final
obviously using build-path-referenced custom report scriptlet using slf4j api logging.
it seems conflicting different version of same class (for same underlying class loading isolation).
i got same problem , solved adding jars in build path in project:
- slf4j-api-1.7.12.jar
- slf4j-log4j12-1.7.12.jar
- slf4j-simple-1.7.12.jar
and add jasperreports library , jasperreports library dependencies project
with these steps
- right click in project
- build cath > configure build path
- go libraries , add jars using
add external jars - add jasperreport library , jasperreport library dependencies using
add library - and go
order , export, check new added libraries , jars , click ok
you result :

Comments
Post a Comment