"找不到默认构造函数" WildFly 8.2中的webapp部署期间出错

时间:2016-02-19 10:26:44

标签: jboss wildfly wildfly-8

我正在使用以下运行时描述符

在WildFly 8.2.0中部署基于Spring 3.2.9的Web应用程序
<jboss-deployment-structure>
     <deployment>
    <exclude-subsystems>
             <subsystem name="jaxrs" />
             <subsystem name="weld" />
         </exclude-subsystems>
         <exclusions>
             <module name="org.apache.commons.logging" />
             <module name="org.apache.log4j" />
             <module name="org.hibernate"/>
             <module name="org.jboss.logging.jul-to-slf4j-stub" />
             <module name="org.jboss.logmanager" />
             <module name="org.jboss.logmanager.log4j" />
             <module name="org.slf4j" />
             <module name="org.slf4j.impl"/>
         </exclusions>
         <dependencies>
             <module name="org.javassist"/>
             <module name="org.antlr"/>
             <module name="org.jboss.jboss-transaction-spi"/>
             <module name="org.jboss.marshalling"/>
             <module name="org.jboss.marshalling.river"/>
             <module name="org.dom4j"/>
             <module name="org.scannotation.scannotation"/>
             <module name="org.mariadb"/>
         </dependencies>
     </deployment>
</jboss-deployment-structure>

我的期望是Spring而不是Weld(WildFly的默认设置)将被用作DI引擎

但是在部署我们的webapp时,我遇到了以下错误

JobGridLiveListServiceImpl类有一个构造函数,它通过注入接收另一个bean

2016-02-18 12:27:49,040 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."dfm-app.war".INSTALL:  org.jboss.msc.service.StartException in service jboss.deployment.unit."dfm-app.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "dfm-app.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_51]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51] Caused by: 
org.jboss.as.server.deployment.DeploymentUnitProcessingException: 
JBAS011030: Could not configure component com.netapp.dfm.webui.server.job.JobGridLiveListServiceImpl
at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:95)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more


Caused by: 
org.jboss.as.server.deployment.DeploymentUnitProcessingException: 
JBAS011054: Could not find default constructor for class com.netapp.dfm.webui.server.job.JobGridLiveListServiceImpl
at
org.jboss.as.ee.component.DefaultInterceptorConfigurator.configure(DefaultInterceptorConfigurator.java:92)
at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
... 6 more

相同的代码在Jboss AS 6.1上运行良好。

有关抛出此异常的可能原因的任何输入?

1 个答案:

答案 0 :(得分:0)

我在JBOSS EAP 7上遇到了相同的错误,以解决我在提到的类中添加了不带参数的默认构造函数的问题,但这仅在由cusom jar或由开发人员开发的外部依赖项出现问题时才有可能我们。