[JBoss JIRA] Created: (WELD-260) java.util.ConcurrentModificationException : WeldBootstrap.deployBeans
by Roger Kitain (JIRA)
java.util.ConcurrentModificationException : WeldBootstrap.deployBeans
---------------------------------------------------------------------
Key: WELD-260
URL: https://jira.jboss.org/jira/browse/WELD-260
Project: Weld
Issue Type: Bug
Components: Bootstrap and Metamodel API
Environment: mac glassfish
Reporter: Roger Kitain
Small app containing an extension (residing in gf/lib) and deployed war.
when server starts up (or the app is being deployed):
WARNING: Exception while dispatching an event
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:370)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:151)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:88)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:322)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Updated: (WELD-2) Custom bean implementation - methods not called by RI
by Pete Muir (JIRA)
[ https://jira.jboss.org/jira/browse/WELD-2?page=com.atlassian.jira.plugin.... ]
Pete Muir updated WELD-2:
-------------------------
Description:
getBeanClass(), getStereotypes(), isNullable() and isPolicy() are not called by the RI on a custom implementation of Bean interface
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testGetStereotypesCalled()
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testIsNullableCalled()
was:
getBeanClass(), getStereotypes(), isNullable() and isPolicy() are not called by the RI on a custom implementation of Bean interface
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testGetBeanClassCalled()
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testGetStereotypesCalled()
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testIsPolicyCalled()
org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testIsNullableCalled()
> Custom bean implementation - methods not called by RI
> -----------------------------------------------------
>
> Key: WELD-2
> URL: https://jira.jboss.org/jira/browse/WELD-2
> Project: Weld
> Issue Type: Bug
> Components: Bootstrap and Metamodel API
> Reporter: Jozef Hartinger
> Fix For: 1.0.0.CR2
>
>
> getBeanClass(), getStereotypes(), isNullable() and isPolicy() are not called by the RI on a custom implementation of Bean interface
> org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testGetStereotypesCalled()
> org.jboss.jsr299.tck.tests.definition.bean.custom.CustomBeanImplementationTest.testIsNullableCalled()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[JBoss JIRA] Created: (WELD-239) AbstractProducerBean.checkReturnValue seems to check against the wrong injection point
by Huy Le (JIRA)
AbstractProducerBean.checkReturnValue seems to check against the wrong injection point
--------------------------------------------------------------------------------------
Key: WELD-239
URL: https://jira.jboss.org/jira/browse/WELD-239
Project: Weld
Issue Type: Bug
Components: Producers (Methods, Fields and Disposers)
Affects Versions: 1.0.0.CR1
Environment: Weld 1.0.0.CR1, embedded Jetty
Reporter: Huy Le
I was running a modified version of the numberguess example (attached to this issue) and got the following exception which doesn't seem quite right:
javax.enterprise.inject.IllegalProductException: Producers cannot produce non-serializable instances for injection into non-transient fields of passivating beans
Producer: org.jboss.weld.bean-web-module-ProducerMethod-org.jboss.weld.examples.numberguess.FacesContextManager.getFacesContext()
Injection Point: field org.jboss.weld.examples.numberguess.Game.maxNumber
at org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:201)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:287)
at org.jboss.weld.context.AbstractMapContext.get(AbstractMapContext.java:104)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:139)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:97)
at javax.faces.context.FacesContext_$$_javassist_7.getELContext(FacesContext_$$_javassist_7.java)
at org.jboss.weld.examples.numberguess.Generator.getMaxNumber(Generator.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:111)
at org.jboss.weld.examples.numberguess.Generator_$$_javassist_6.getMaxNumber(Generator_$$_javassist_6.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:227)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:148)
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:117)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:286)
at org.jboss.weld.context.DependentContext.get(DependentContext.java:62)
at org.jboss.weld.BeanManagerImpl.getReference(BeanManagerImpl.java:899)
at org.jboss.weld.BeanManagerImpl.getReference(BeanManagerImpl.java:945)
at org.jboss.weld.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:967)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:78)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:683)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:695)
at org.jboss.weld.bean.ManagedBean$1$1.proceed(ManagedBean.java:195)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
at org.jboss.weld.bean.ManagedBean$1.inject(ManagedBean.java:189)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:115)
at org.jboss.weld.context.AbstractMapContext.get(AbstractMapContext.java:104)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:139)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:97)
at org.jboss.weld.examples.numberguess.Game_$$_javassist_5.getNumber(Game_$$_javassist_5.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Not sure if my analysis is correct, but it seems that:
1. FieldInjectionPoint for maxNumber is set as the current injection point in BeanManagerImpl
2. Producer method for maxNumber is invoked
3. The getELContext method is invoked on the FacesContext proxy
4. The getProxiedInstance method is invoked on ClientProxyMethodHandler which causes the producer method for FacesContext to be invoked
5. The checkReturnValue on AbstractProducerBean is invoked, but it is checking the FacesContext return value against the injection point for maxNumber (since this is still the current injection point) an an IllegalProductException is thrown since maxNumber must be serializable (but not FacesContext)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months