Issue Type: Bug Bug
Affects Versions: 1.1.9.Final
Assignee: Unassigned
Created: 31/Aug/12 12:28 PM
Description:

My project has a JSF converter that is made injectable by Seam Faces. It extends the Seam Faces Converter abstract class:

@FacesConverter("QueryField")
@RequestScoped
public class QueryFieldConverter extends Converter<QueryField<?>>

In AS 7.1.1.Final, this is not a problem. In a recent AS 7.2.0.Alpha1 snapshot (which uses Weld 1.1.9.Final), I get the following exception:

11:56:41,539 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC00001: Failed to start service jboss.deployment.unit."Cerberus.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."Cerberus.ear".WeldService: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class com.lapis.cerberus.status.query.QueryField is not proxyable because it has no no-args constructor - Managed Bean [class com.lapis.cerberus.portal.convert.QueryFieldConverter] with qualifiers [@Any @Default].
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
	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.runWorker(Unknown Source) [rt.jar:1.7.0_05]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
	at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class com.lapis.cerberus.status.query.QueryField is not proxyable because it has no no-args constructor - Managed Bean [class com.lapis.cerberus.portal.convert.QueryFieldConverter] with qualifiers [@Any @Default].
	at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:214)
	at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:184)
	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:147)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:380)
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
	... 5 more

If I'm not mistaken, Converter should be a bean type of QueryFieldConverter, but QueryField should not, given that QueryFieldConverter does not extend QueryField (which is an abstract class). Therefore, Weld should not be trying to proxy it.

I attempted to work around this issue by using @Typed to specify which types should be considered bean types. The mere presence of that annotation results in this exception:

11:50:54,213 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."Cerberus.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."Cerberus.ear".WeldService: java.lang.NullPointerException
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
	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.runWorker(Unknown Source) [rt.jar:1.7.0_05]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_05]
	at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
Caused by: java.lang.NullPointerException
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:147)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:380)
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
	... 5 more
Project: Weld
Priority: Major Major
Reporter: Rich DiCroce
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