Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1289

BeanManager refuses to create an InjectionTarget for an abstract class

XMLWordPrintable

    • Hide

      You may use a modified weld2-specific solder version from https://github.com/maschmid/solder/tree/weld2

      in testsuite/ run:

      mvn clean verify -Djbossas7.version=7.2.0.Alpha1-SNAPSHOT -Darquillian=jbossas-remote-7 -Darquillian.version=1.0.3.Final -Pjbossas7 -Djboss.logmanager.version=1.3.2.Final -Dtest=org.jboss.solder.test.serviceHandler.ServiceHandlerTest

      Show
      You may use a modified weld2-specific solder version from https://github.com/maschmid/solder/tree/weld2 in testsuite/ run: mvn clean verify -Djbossas7.version=7.2.0.Alpha1-SNAPSHOT -Darquillian=jbossas-remote-7 -Darquillian.version=1.0.3.Final -Pjbossas7 -Djboss.logmanager.version=1.3.2.Final -Dtest=org.jboss.solder.test.serviceHandler.ServiceHandlerTest
    • Release Notes

      Running Solder ServiceHandlerTest fails with

      java.lang.RuntimeException: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001519 Cannot create an InjectionTarget from [EnhancedAnnotatedTypeImpl] public abstract @EchoService cla
      ss org.jboss.solder.test.serviceHandler.GoodbyeWorld as it is an abstract class
              at org.jboss.solder.serviceHandler.ServiceHandlerExtension.buildBean(ServiceHandlerExtension.java:118)
              at org.jboss.solder.serviceHandler.ServiceHandlerExtension.processAnnotatedType(ServiceHandlerExtension.java:76)
              at sun.reflect.GeneratedMethodAccessor1519.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:268)
              at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
              at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
              at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:264)
              at org.jboss.weld.annotated.runtime.InvokableAnnotatedMethod.invokeOnInstance(InvokableAnnotatedMethod.java:82)
              at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:97)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:276)
              at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:134)
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:263)
              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:238)
              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:242)
              at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:173)
              at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:47)
              at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:134)
              at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:119)
              at org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:81)
              at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:145)
              at org.jboss.weld.bootstrap.BeanDeployer.processAnnotatedTypes(BeanDeployer.java:135)
              at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:220)
              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:428)
              at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:92)
              at org.jboss.as.weld.services.WeldService.start(WeldService.java:77)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001519 Cannot create an InjectionTarget from [EnhancedAnnotatedTypeImpl] public abstract @EchoService class org.jboss.sold
      er.test.serviceHandler.GoodbyeWorld as it is an abstract class
              at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1046)
              at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1034)
              at org.jboss.weld.util.ForwardingBeanManager.createInjectionTarget(ForwardingBeanManager.java:210)
              at org.jboss.solder.bean.BeanBuilder.readFromType(BeanBuilder.java:114)
              at org.jboss.solder.serviceHandler.ServiceHandlerExtension.buildBean(ServiceHandlerExtension.java:112)
              ... 31 more
      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-001519 Cannot create an InjectionTarget from [EnhancedAnnotatedTypeImpl] public abstract @EchoService class org.jboss.solder.te
      st.serviceHandler.GoodbyeWorld as it is an abstract class
              at org.jboss.weld.injection.producer.DefaultInstantiator.<init>(DefaultInstantiator.java:45)
              at org.jboss.weld.injection.producer.DefaultInjectionTarget.initInstantiator(DefaultInjectionTarget.java:58)
              at org.jboss.weld.injection.producer.AbstractInjectionTarget.<init>(AbstractInjectionTarget.java:95)
              at org.jboss.weld.injection.producer.DefaultInjectionTarget.<init>(DefaultInjectionTarget.java:47)
              at org.jboss.weld.manager.BeanManagerImpl.internalCreateInjectionTarget(BeanManagerImpl.java:1057)
              at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1041)
              ... 35 more
      
      

              rhn-engineering-jharting Jozef Hartinger
              maschmid@redhat.com Marek Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: