[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
15 years, 4 months
[JBoss JIRA] Created: (WELD-549) Conversation propagated by default with h:link
by David Beaumont (JIRA)
Conversation propagated by default with h:link
----------------------------------------------
Key: WELD-549
URL: https://jira.jboss.org/browse/WELD-549
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.0.1.Final
Environment: GlassFish Server Open Source Edition 3.0.1 on Mac OS 10.6 and Windows 7. WELD-000900 1.0.1 (SP2)
Reporter: David Beaumont
Attachments: CdiConvoBug.war
I created a long running conversation by running a method on a conversation scoped bean:
private boolean initialized;
public void init() {
if(initialized) return;
conversation.begin();
initialized = true;
}
>From a facelets page using the JSF2 event system:
<f:metadata>
<f:event type="preRenderView" listener="#{convoBean.init}" />
</f:metadata>
If a conversation has been made long-running, the h:link tag will produce links with the conversation query parameter, thereby propagating the conversation whether that was what you wanted or not.
I.e:
<p>Link: <h:link outcome="page2.xhtml" value="a link" /></p>
produces
<p>Link: <a href="/CdiConvoBug/page2.jsf?cid=3">a link</a></p>
--
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
15 years, 4 months
[JBoss JIRA] Created: (WELD-733) Better error message for @ManagedBean annotated Beans that do not have a no-arg constructor
by Sivakumar Thyagarajan (JIRA)
Better error message for @ManagedBean annotated Beans that do not have a no-arg constructor
-------------------------------------------------------------------------------------------
Key: WELD-733
URL: https://jira.jboss.org/browse/WELD-733
Project: Weld
Issue Type: Feature Request
Components: Class Beans (Managed and Session)
Reporter: Sivakumar Thyagarajan
If we have an @ManagedBean annotated class that does not have a no-arg constructor, and is CDI-enabled(for instance has an interceptor binding annotation assigned to one of its methods), Weld proxy creation fails with an InstantiationException(see below) because of the missing no-arg ctor. It would be nice if Weld detects this case better and provides a better error message. I have filed a GlassFish issue (GlassFish issue 14076) for us to fail deployment, but Weld's handling of this issue would help GlassFish and other containers.
Caused by: org.jboss.weld.exceptions.DeploymentException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:600)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:256)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:338)
at org.jboss.weld.context.DependentContext.get(DependentContext.java:62)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:660)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:734)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:757)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:840)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:852)
at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:122)
at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:50)
at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:227)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:181)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:478)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:428)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300)
... 28 more
Caused by: org.jboss.weld.exceptions.DefinitionException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:223)
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:594)
... 46 more
Caused by: java.lang.InstantiationException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:396)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:216)
at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:391)
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:218)
... 47 more
|#]
--
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
15 years, 4 months
[JBoss JIRA] Created: (WELD-728) Cannot create proxies for default packaged beans
by Sivakumar Thyagarajan (JIRA)
Cannot create proxies for default packaged beans
------------------------------------------------
Key: WELD-728
URL: https://jira.jboss.org/browse/WELD-728
Project: Weld
Issue Type: Bug
Components: Proxies
Affects Versions: 1.1.0.Beta1
Reporter: Sivakumar Thyagarajan
I have a developer test that has a ManagedBean [1] as part of the default package [ie has no package declaration]. When an interceptor binding is applied to this bean (@Tester applied to method foo()), proxy creation fails with an NPE.
Caused by: org.jboss.weld.exceptions.DeploymentException
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:600)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:256)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:338)
at org.jboss.weld.context.DependentContext.get(DependentContext.java:62)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:660)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:734)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:757)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:840)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:852)
at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:122)
at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:50)
at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:227)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:181)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:478)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:428)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300)
... 28 more
Caused by: java.lang.NullPointerException
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyName(ProxyFactory.java:167)
at org.jboss.weld.bean.proxy.ProxyFactory.<init>(ProxyFactory.java:104)
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:594)
[1] https://fisheye4.cenqua.com/browse/glassfish-svn/trunk/v2/appserv-tests/d... or https://glassfish-svn.dev.java.net/source/browse/glassfish-svn/trunk/v2/a...
--
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
15 years, 4 months