gpt4 book ai didi

java - 尝试创建小型碧 Jade 报告时出错

转载 作者:行者123 更新时间:2023-12-01 11:00:22 26 4
gpt4 key购买 nike

我已将 Jasperstudio 6.1.1 插件添加到我的 Eclipse 中。我已将以下 jar 包含到我的库中。

  • jasperreports-6.1.1
  • commons-beanutils-1.8.0
  • commons-collections-2.1
  • commons-digester-1.7
  • commons-loggin-api-1.0.2
  • groovy-all-1.7.5
  • iText-4.2.0
  • ojdbc6

当我尝试执行独立的 java 类时,出现以下错误。我认为该错误是因为我的公共(public)版本,但不确定如何找到确切的版本。

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ReferenceMap
at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:74)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:823)
at net.sf.jasperreports.engine.JasperCompileManager.getEvaluator(JasperCompileManager.java:380)
at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:467)
at net.sf.jasperreports.engine.fill.BaseReportFiller.<init>(BaseReportFiller.java:152)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:236)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:72)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:60)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:201)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:216)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:85)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:417)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:838)
at id.hans.employee.application.MainApplication.showReport(MainApplication.java:59)
at id.hans.employee.application.MainApplication.main(MainApplication.java:83)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.map.ReferenceMap
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 20 more

最佳答案

我刚刚找到了解决方案。问题出在 commons-collect 版本上。我将其升级到 commons-collection-3.2.1.jar 并且它有效。谢谢

关于java - 尝试创建小型碧 Jade 报告时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33384309/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com