[jboss-jira] [JBoss JIRA] (WFLY-1097) relax the requirement for having EJB bean class no-arg constructor
Stuart Douglas (JIRA)
issues at jboss.org
Mon Apr 14 05:16:35 EDT 2014
[ https://issues.jboss.org/browse/WFLY-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas reassigned WFLY-1097:
------------------------------------
Assignee: Stuart Douglas (was: David Lloyd)
> relax the requirement for having EJB bean class no-arg constructor
> ------------------------------------------------------------------
>
> Key: WFLY-1097
> URL: https://issues.jboss.org/browse/WFLY-1097
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: EE
> Reporter: Cheng Fang
> Assignee: Stuart Douglas
>
> Currently AS7 requires all EJB bean class to have a public no-arg
> constructor, even when cdi is enabled and there is a @Inject constructor.
> The deployment of EJB with no default constructor will fail
> validation. I understand this is a EJB spec requirement, but I guess it's
> more of legacy from pre-CDI days.
> I'm wondering if we can relax it, to support EJB bean classes with
> only @Inject constructor and no default constructor. This is currently supported in GlassFish/RI.
> The stacktrace from validation:
> {noformat}
> 10:13:36,354 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC00001: Failed to start service jboss.deployment.unit."test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "test.war"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35]
> at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35]
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component TestBean
> at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:91)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
> ... 5 more
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014227: EJB TestBean of type test.TestBean must have public default constructor
> at org.jboss.as.ejb3.component.EJBValidationConfigurator.configure(EJBValidationConfigurator.java:59)
> at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:80)
> ... 6 more
> 10:13:36,360 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "test.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"test.war\"
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component TestBean
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014227: EJB TestBean of type test.TestBean must have public default constructor"}}
> 10:13:36,379 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment test.war in 19ms
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list