我有一个使用 Maven 构建的项目,最终创建了一个 WAR。War 被部署到 Tomcat 7 服务器上。当我尝试创建 JasperReport 时,出现以下错误。有谁知道这个问题的解决方案?JasperReports 依赖包括有问题的文件。我目前正在使用 JasperReports 4.1.2,甚至还保留在 4.6.0 中。
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 422; schema_reference.4: Failed to read schema document 'tomcat-7/work/Catalina/loader/net/sf/jasperreports/engine/dtds/jasperreport.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:247)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:196)
at GeneralReport.processRequest(GeneralReport.java:80)
at GeneralReport.doGet(GeneralReport.java:140)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)