我一直試圖讓Jasper報告現在可以運行數週。它在Eclipse中正常工作,Jasper網站的演示工作正常。它在JBoss的jsp頁面中不起作用。Jasper報告無法與jsp/servlet一起使用
我的jsp頁面非常基礎。它在一個類中調用一個方法。它肯定會達到這一點,因爲我有輸出診斷。當我打電話給任何賈斯珀方法它炸彈出這個錯誤:
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.xml.JRXmlDigesterFactory
我已經轉儲jar文件無處不在。我甚至已經在我的jre/lib/ext
文件夾中傾倒這組瓶子。
- 蠟染1.5
- 公地BeanUtils的-1.8.0
- 公地集合-3.2.1
- 公地消化器-1.7
- 公地javaflow-20060411
- commons-測井1.1.1
- 的iText-2.1.7
- JasperReports的-4.6.0
- JasperReports的小程序 - 4.6.0
- 的JasperReports的字體-4.6.0
- JasperReports的-javaflow-4.6.0
- log4j的
- org.eclipse.jdt.core_3.7.1.v_B76_R37x
- POI -3.6
但是沒有什麼區別。
感謝您的回覆和建議。 我使用jre/lib/ext文件夾轉儲jar文件,因爲我在JBoss default/lib中嘗試過將它們與它們一起使用,它不起作用。 但是,我現在已經刪除了除Jboss默認/ lib之外的所有引用,但它仍然不起作用。
當我第一次啓動JBoss和運行我的jsp頁面我得到這個堆棧跟蹤:
2012-06-19 08:03:49,349 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Kanban].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.<clinit>(JRXmlDigesterFactory.java:179)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:207)
at my.test.TestClass.compileReport(TestClass.java:73)
at my.test.TestClass.show(TestClass.java:35)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
這似乎暗示誤差加上org /阿帕奇/公/日誌/的LogFactory但我絕對有共享記錄JBoss default/lib中的-1.1.1.jar。
如果我再運行JSP頁面第二次我得到一個不同的錯誤:
2012-06-19 08:04:23,080 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Kanban].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.xml.JRXmlDigesterFactory
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:207)
at my.test.TestClass.compileReport(TestClass.java:73)
at my.test.TestClass.show(TestClass.java:35)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
我可以提供任何額外的信息,可以幫助診斷某人我的問題。有誰知道我在這裏做錯了嗎?