sabrine.baameur Posted May 7, 2023 Share Posted May 7, 2023 Hi I'm new to jasperreport I added its plugin to my eclipse IDE but when i come to create a new report i get the folloiwng errorjava.lang.LinkageError: loader constraint violation: when resolving method 'org.slf4j.spi.MDCAdapter org.slf4j.MDC.getMDCAdapter()' the class loader java.net.FactoryURLClassLoader @133a8a9f of the current class, ch/qos/logback/classic/spi/LoggingEvent, and the class loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2478dbba for the method's defining class, org/slf4j/MDC, have different Class objects for the type org/slf4j/spi/MDCAdapter used in the signature (ch.qos.logback.classic.spi.LoggingEvent is in unnamed module of loader java.net.FactoryURLClassLoader @133a8a9f, parent loader org.eclipse.osgi.internal.framework.ContextFinder @6192a5d5; org.slf4j.MDC is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2478dbba, parent loader 'platform') at ch.qos.logback.classic.spi.LoggingEvent.getMDCPropertyMap(LoggingEvent.java:408) at ch.qos.logback.classic.spi.LoggingEvent.prepareForDeferredProcessing(LoggingEvent.java:256) at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:226) at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:102) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:85) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:272) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:259) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:426) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386) at ch.qos.logback.classic.Logger.log(Logger.java:780) at org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog.debug(LogAdapter.java:459) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1560) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1542) at com.jaspersoft.studio.editor.AbstractJRXMLEditor.doInitModel(AbstractJRXMLEditor.java:301) at com.jaspersoft.studio.editor.AbstractJRXMLEditor.init(AbstractJRXMLEditor.java:245) at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:353) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:344)anyhelp I'll be thankfull Link to comment Share on other sites More sharing options...
anish.rai Posted May 8, 2023 Share Posted May 8, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
sabrine.baameur Posted May 8, 2023 Author Share Posted May 8, 2023 Thank you waiting forward for your help Link to comment Share on other sites More sharing options...
sabrine.baameur Posted May 12, 2023 Author Share Posted May 12, 2023 @aria_4 any news? Link to comment Share on other sites More sharing options...
charuseelan Posted May 13, 2023 Share Posted May 13, 2023 im also facing the same issue , need help on this Link to comment Share on other sites More sharing options...
anish.rai Posted May 22, 2023 Share Posted May 22, 2023 Thank you for your patience, we need a little more time with our team of experts to come up with a solution. We will respond back as soon as we have an answer to your question. Link to comment Share on other sites More sharing options...
Jitendra Mandalia Posted June 6, 2023 Share Posted June 6, 2023 This issue can occur with conflicting library versions.As per the error it seems there are conflicting versions of the SLF4J (Simple Logging Facade for Java) library in the classpath. The error message suggests that the LoggingEvent class, is attempting to access the a method, but the class loaders for class (org.slf4j.MDC) and the class trying to access it have different Class objects for the org.slf4j.spi.MDCAdapter type.It seems that the conflict is there with the SLF4J logging library with JasperReports. To resolve the issue, check SLF4J versions you have, remove any conflicting/duplicate libraries, and ensuring compatibility with JasperReports and other plugins you already have. Link to comment Share on other sites More sharing options...
sabrine.baameur Posted June 11, 2023 Author Share Posted June 11, 2023 Still facing the same issue except that sometimes instead of the previous message error i get the following: Description Resource Path Location Type Class net.sf.jasperreports.engine.xml.JRReportSaxParserFactory should be compatible with net.sf.jasperreports.engine.xml.JRSaxParserFactory Any updates i'll be thankfull Link to comment Share on other sites More sharing options...
sabrine.baameur Posted June 16, 2023 Author Share Posted June 16, 2023 Hi,any updates cause i'm still facing the same problem and what i noticed is that just before the problem mentioned before raises i get this error:net.sf.jasperreports.engine.JRRuntimeException: Class net.sf.jasperreports.engine.xml.JRReportSaxParserFactory should be compatible with net.sf.jasperreports.engine.xml.JRSaxParserFactory. at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.getFactory(BaseSaxParserFactory.java:269) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1563) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1542) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:238) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:223) at net.sf.jasperreports.eclipse.util.ReportLoader.loadReport(ReportLoader.java:28) at net.sf.jasperreports.eclipse.ui.ReportPreviewUtil$1.run(ReportPreviewUtil.java:40) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596) at org.eclipse.equinox.launcher.Main.run(Main.java:1467) at org.eclipse.equinox.launcher.Main.main(Main.java:1440)I don't know if it has a connection with the other error or notany siggetions i'll be thankful Link to comment Share on other sites More sharing options...
atchah Posted November 2, 2023 Share Posted November 2, 2023 Not sure if you were having the same issue as me but, I seem to have found the solution to linkage problem for opening jrxml files. It took me a while but it seems like you need to have your jrxml files in jasper project as it downloads the correct dependencies. If you're using Spring Boot or any other libraries along with Jasper, you could simply add your other project as a dependency to resolve issue related to classes.Hope it helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now