Jasperreports 5.6作为JBoss EAP 6.1错误的模块

时间:2014-06-26 17:27:07

标签: java jboss jasper-reports jboss6.x

我的module.xml如下。我正在将app部署为JAR。我试图谷歌这个错误,但没有用。我看到的所有建议都是将JDT编译器包含到app中,我将它添加到JBoss中的jasperreports模块和POM中,但结果是一样的。 如何解决?

    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.0" name="net.sf.jasperreports">
        <resources>
            <resource-root path="jasperreports-5.6.0.jar"/>
            <resource-root path="itext-2.1.7.js2.jar"/>
            <resource-root path="jcommon-1.0.15.jar"/>
            <resource-root path="jfreechart-1.0.12.jar"/>
            <resource-root path="xml-apis-1.3.02.jar"/>
            <resource-root path="jdtcore-3.1.0.jar"/>
            <resource-root path="castor-1.2.jar"/>
            <resource-root path="jackson-core-2.1.4.jar"/>
            <resource-root path="jackson-databind-2.1.4.jar"/>
            <resource-root path="jackson-annotations-2.1.4.jar"/>
            <resource-root path="lucene-core-4.5.1.jar"/>
            <resource-root path="lucene-analyzers-common-4.5.1.jar"/>
            <resource-root path="lucene-queryparser-4.5.1.jar"/>
            <resource-root path="olap4j-0.9.7.309-JS-3.jar"/>
            <resource-root path="jdt-compiler-3.1.1.jar"/>
        </resources>
        <dependencies>
            <module name="javax.api"/>
            <module name="org.apache.commons.beanutils"/>
            <module name="org.apache.commons.collections"/>
            <module name="org.apache.commons.digester"/>
            <module name="org.apache.commons.logging"/>
        </dependencies>
</module>

我知道它可以访问,因为在将它们放入模块文件夹后我停止接收有关依赖项的错误。

我在尝试执行报告时遇到以下错误,跟踪的顶部在这里,据我所知这个错误很常见,但我仍然无法解决它:

    21:19:00,471 ERROR [ru.reporter.ReportServiceBean] (http-localhost/127.0.0.1:8180-1) [2][admin] Got exception while in buildMonitoringReport: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
C:\JBOSS-SY\bin\report2_1403803139200_531972.java:4: error: package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;
^
C:\JBOSS-SY\bin\report2_1403803139200_531972.java:5: error: package net.sf.jasperreports.engine.fill does not exist
import net.sf.jasperreports.engine.fill.*;

1 个答案:

答案 0 :(得分:0)

从模块中移除<resource-root path="jdt-compiler-3.1.1.jar"/>,并将依赖关系移除为<module name="org.jboss.as.web"/>

检查org.jboss.as.web,它应该已经有jdt-compiler与你模块中的那个冲突了。