[JBoss JIRA] Created: (WELD-538) Unsatisfied dependency in interceptor still checked for serialization, resulting in NPE
by Nicklas Karlsson (JIRA)
Unsatisfied dependency in interceptor still checked for serialization, resulting in NPE
---------------------------------------------------------------------------------------
Key: WELD-538
URL: https://jira.jboss.org/browse/WELD-538
Project: Weld
Issue Type: Bug
Components: Bootstrap and Metamodel API
Affects Versions: 1.0.1.Final
Reporter: Nicklas Karlsson
Given a serializable interceptor with a
@Inject Logger log
but no producer for it you get a
java.lang.NullPointerException
at org.jboss.weld.util.Beans.isPassivationCapableDependency(Beans.java:175)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:335)
at org.jboss.weld.bootstrap.Validator.validateCdiBoundInterceptors(Validator.java:224)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:170)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:363)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:349)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:402)
at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:121) [:6.0.0-SNAPSHOT]
because it checks for passivation on a null-resolved bean
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] Created: (WELD-753) Trim/Normalize extra whitespace surrounding classnames in beans.xml deployment descriptor
by Sivakumar Thyagarajan (JIRA)
Trim/Normalize extra whitespace surrounding classnames in beans.xml deployment descriptor
-----------------------------------------------------------------------------------------
Key: WELD-753
URL: https://jira.jboss.org/browse/WELD-753
Project: Weld
Issue Type: Bug
Components: Infrastructure
Affects Versions: 1.1.0.Beta2
Reporter: Sivakumar Thyagarajan
Priority: Minor
Interceptors, Decorators and Alternatives could have class elements and a user may add additional whitespace while specifying the classname as shown below:
<interceptors>
<class>
test.beans.TransactionInterceptor</class>
</interceptors>
Today the BeansXml parser implementation does not trim the extraneous whitespace around the classname as pass them as such ("\n test.beans.TransactionInterceptor" to the container's classloader(Thread context classloader) in DefaultResourceLoader. Since most classloaders' implementation of loadClass() doesn't trim the classnames, it results in a ClassNotFoundException.
Caused by: java.lang.ClassNotFoundException:
test.beans.TransactionInterceptor
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1518)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1368)
at org.jboss.weld.resources.DefaultResourceLoader.classForName(DefaultResourceLoader.java:52)
It would be nice if the class element is normalized and stripped of any extraneous whitespace before asking the TCL to load the class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months