Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1054876 - [GSS] (6.4) Proxy creation fails when a superclass does not have a no-arg constructor
[GSS] (6.4) Proxy creation fails when a superclass does not have a no-arg con...
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld (Show other bugs)
6.1.1
Unspecified Unspecified
unspecified Severity unspecified
: DR1
: EAP 6.4.0
Assigned To: Jozef Hartinger
Adela
:
Depends On: 1111092
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-17 11:23 EST by Anton Giertli
Modified: 2018-03-06 15:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previous versions of JBoss EAP included an implementation of Weld that performed an unnecessarily strict check that constructors of all superclasses have public no-arg constructors. This issue has been resolved in this release. Now only the proxiability of the bean itself is checked, not all supertypes.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cdi-reproducer (18.90 KB, application/zip)
2014-01-17 11:25 EST, Anton Giertli
no flags Details
corrected reproducer (45.24 KB, application/zip)
2014-07-17 04:48 EDT, Anton Giertli
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WELD-1708 Major Resolved (1.1) Proxy creation fails when a superclass does not have a no-arg constructor 2015-07-30 08:51:48 EDT
Red Hat Knowledge Base (Solution) 694293 None None None Never

  None (edit)
Description Anton Giertli 2014-01-17 11:23:00 EST
Description of problem:
When injecting an @ApplicationScoped bean, which extends a class that does not have a no-arg constructor it fails with the exception.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Either test it through this test case https://github.com/weld/core/pull/448
or use reproducer attached, simple war application which fails during the deployment with the following error:

16:38:08,265 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."jboss-as-servlet-async.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-servlet-async.war".WeldStartService: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.jboss.as.quickstarts.servlet.async.NotSimpleConstructorClass is not proxyable because it has no no-args constructor - Managed Bean [class org.jboss.as.quickstarts.servlet.async.SimpleBean] with qualifiers [@Any @Default].
	at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:214)
	at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:180)
	at org.jboss.weld.util.Proxies.getUnproxyableTypesExceptionInt(Proxies.java:195)
	at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:169)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:148)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:383)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:368)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	... 3 more

16:38:08,479 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015870: Deploy of deployment "jboss-as-servlet-async.war" was rolled back with the following failure message: 
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jboss-as-servlet-async.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jboss-as-servlet-async.war\".WeldStartService: Failed to start service
    Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.jboss.as.quickstarts.servlet.async.NotSimpleConstructorClass is not proxyable because it has no no-args constructor - Managed Bean [class org.jboss.as.quickstarts.servlet.async.SimpleBean] with qualifiers [@Any @Default]."}}

Actual results:

When injecting an @ApplicationScoped bean, which extends a class that does not have a no-arg constructor it fails with the org.jboss.weld.exceptions.UnproxyableResolutionException

Expected results:

Injection is done without issues.


Additional info:
Comment 2 Anton Giertli 2014-01-17 11:25:10 EST
Created attachment 851699 [details]
cdi-reproducer
Comment 4 Anton Giertli 2014-07-17 04:48:06 EDT
Created attachment 918640 [details]
corrected reproducer
Comment 8 JBoss JIRA Server 2014-07-22 09:04:17 EDT
Jozef Hartinger <jharting@redhat.com> updated the status of jira WELD-1708 to Resolved
Comment 9 Jozef Hartinger 2014-07-23 09:45:02 EDT
https://github.com/jbossas/jboss-eap/pull/1535
Comment 10 Ron Šmeral 2014-09-17 07:03:21 EDT
Verified in EAP 6.4.0.DR1.1.

Note You need to log in before you can comment on or make changes to this bug.