[weld-issues] [JBoss JIRA] Commented: (WELD-246) Cannot add a custom bean from a portable extension.
Roger Kitain (JIRA)
jira-events at lists.jboss.org
Tue Nov 3 08:58:06 EST 2009
[ https://jira.jboss.org/jira/browse/WELD-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12492789#action_12492789 ]
Roger Kitain commented on WELD-246:
-----------------------------------
Latest exception when war is deployed:
Nov 3, 2009 8:55:46 AM org.glassfish.kernel.event.EventsImpl send
WARNING: Exception while dispatching an event
org.jboss.weld.DefinitionException: org.jboss.weld.DefinitionException: javax.enterprise.event.ObserverException
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:43)
at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:38)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:367)
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:223)
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:1159)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218)
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)
Caused by: org.jboss.weld.DefinitionException: javax.enterprise.event.ObserverException
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:51)
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:39)
... 21 more
Caused by: javax.enterprise.event.ObserverException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:37)
at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:89)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:190)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:215)
at org.jboss.weld.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:872)
at org.jboss.weld.BeanManagerImpl.fireEvent(BeanManagerImpl.java:865)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:47)
... 22 more
Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/AnnotationLiteral
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:703)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
at my.framework.ABeanDefinition.<clinit>(ABeanDefinition.java:22)
at my.framework.Extension.afterBeanDiscovery(Extension.java:21)
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:120)
at my.framework.Extension_$$_javassist_0.afterBeanDiscovery(Extension_$$_javassist_0.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.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:64)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:174)
... 27 more
Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.AnnotationLiteral
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
... 53 more
> Cannot add a custom bean from a portable extension.
> ---------------------------------------------------
>
> Key: WELD-246
> URL: https://jira.jboss.org/jira/browse/WELD-246
> Project: Weld
> Issue Type: Bug
> Affects Versions: 1.0.0.CR1
> Environment: GlassFish v3 and Weld 1.0.0-CR1-SP1
> Reporter: Binod PG
> Assignee: Roger Kitain
> Priority: Critical
> Fix For: 1.0.0.CR2
>
>
> Adding a CustomBean using the AfterBeanDiscovery doesnt seem to work. The portable extension defines an interface (and a bean class that implements it) and tries to inject an instance of the interface to the servlet implementation. But it fails with the following extension.
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: interface
> org.glassfish.test299.ABeanInterface; binding types = [@Default]Unable to resolve any Managed Beans
> at org.jboss.weld.BeanManagerImpl.getBean(BeanManagerImpl.java:996)
> at org.jboss.weld.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:966)
> 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.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:108)
> at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:123)
> at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:47)
> at org.jboss.weld.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:102)
> at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:174)
> at
> com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBe
> an(ManagedBeanManagerImpl.java:456)
> at
> com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBe
> an(ManagedBeanManagerImpl.java:423)
> at
> com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionM
> anagerImpl.java:295)
> I have attached a test case with glassfish issue here.
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=10658
--
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
More information about the weld-issues
mailing list