JBAS011054: Could not find default constructor for class in JBoss EAP 6 / 7

Solution Verified - Updated -

Issue

  • Getting this exception when deploying my war which contains a JAX-WS web service in JBoss EAP 6:

    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component com.jboss.examples.webservice.impl.ExampleWebServiceImpl
            at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:94)
            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
            ... 5 more
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class com.jboss.examples.webservice.impl.ExampleWebServiceImpl
            at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)
            at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:83)
            ... 6 more
    
  • com.jboss.examples.webservice.impl.ExampleWebServiceImpl looks like this:

    package com.jboss.examples.webservice.impl;
    
    @WebService
    public class ExampleWebServiceImpl {
    
      public ExampleWebServiceImpl(Example example) {
        this.example = example;
      }
      ...
    }
    
  • I am getting this exception in EAP 7 when trying to deploy my webservice:

12:09:00,172 WARN  [org.jboss.as.ee] (MSC service thread 1-3) WFLYEE0007: Not installing optional component org.jboss.ws.test.HelloBean due to an exception (enable DEBUG log level to see the cause)
12:09:00,174 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."helloWorld.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."helloWorld.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "helloWorld.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component HelloBean
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:106)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
    ... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0048: Could not find default constructor for class org.jboss.ws.test.HelloBean
    at org.jboss.as.ee.component.DefaultInterceptorConfigurator.configure(DefaultInterceptorConfigurator.java:92)
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
    ... 6 more

12:09:00,177 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "helloWorld.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"helloWorld.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"helloWorld.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"helloWorld.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component HelloBean
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0048: Could not find default constructor for class org.jboss.ws.test.HelloBean"}}

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.