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

  1. right click in project
  2. build cath > configure build path
  3. go libraries , add jars using add external jars
  4. add jasperreport library , jasperreport library dependencies using add library
  5. and go order , export , check new added libraries , jars , click ok

you result :

enter image description here


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -