我的项目是在JBoss Application Server 7.1.1上运行的maven web项目,在pom.xml中有一些模块
<modules>
<module>A</module>
<module>B</module>
<module>C</module>
</modules>
模块A需要使用Jasper Report来报告功能 我将Jasper的依赖性添加到模块A的pom.xml
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.3.0</version>
</dependency>
我重建部署并启动服务器。我收到此错误
新的缺失/不满足的依赖项: service jboss.module.spec.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.commons-beanutils-1.8.0.jar&#34; .main(missing)dependents:[service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.solder-impl-3.1.0.Final.jar&#34; .main,service jboss.module.service。 &#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.commons-digester-1.7.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms-standalone- ear-1.0.0-SNAPSHOT.ear.itext-2.1.7.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear。 bctsp-jdk14-1.38.jar&#34; .main,JBAS014799:......还有36个以上]
如果我评论Jasper对模块A的文件pom.xml的依赖性。不会出现此错误。我已经检查过Jasper的.jar文件是否存在于Java Build Path(Maven Dependence)
中当我取代依赖
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.3.0</version>
</dependency>
带
<dependency>
<groupId>net.sourceforge.dynamicreports</groupId>
<artifactId>dynamicreports-core</artifactId>
<version>4.1.0</version>
</dependency>
我也得到类似的错误
INFO [org.jboss.as.controller](DeploymentScanner-threads - 2)JBAS014774:服务状态报告 JBAS014775:新的缺失/不满足的依赖项: service jboss.module.spec.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.commons-beanutils-1.9.0.jar&#34; .main(missing)dependents:[service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.solder-impl-3.1.0.Final.jar&#34; .main,service jboss.module.service。 &#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.lucene-core-4.5.1.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms- standalone-ear-1.0.0-SNAPSHOT.ear.bctsp-jdk14-1.38.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT。 ear.commons-lang-2.3.jar&#34; .main,JBAS014799:......还有48个] service jboss.module.spec.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.commons-collections-3.2.1.jar&#34; .main(missing)dependents:[service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.solder-impl-3.1.0.Final.jar&#34; .main,service jboss.module.service。 &#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT.ear.lucene-core-4.5.1.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms- standalone-ear-1.0.0-SNAPSHOT.ear.bctsp-jdk14-1.38.jar&#34; .main,service jboss.module.service。&#34; deployment.ntms-standalone-ear-1.0.0-SNAPSHOT。 ear.commons-lang-2.3.jar&#34; .main,JBAS014799:......还有48个以上]
如何解决此错误?感谢您的帮助
答案 0 :(得分:1)
JasperReports对许多其他库有内部依赖性。
您的日志指出您的ntms-standalone-ear-1.0.0-SNAPSHOT.ear
依赖于:
commons-beanutils-1.8.0.jar
solder-impl-3.1.0.Final.jar
commons-digester-1.7.jar
itext-2.1.7.jar
bctsp-jdk14-1.38.jar
还有36个依赖项。
这些都归功于JasperReports。如果您需要包含jasper,请包含所有其他库并将其作为custom module提供给您的JBOSS AS 7.