Hmm, looking at the code of AnnotationLiteral it seems to be more complicated...
Really curious who calls BeanProvider.getContextualReference and with which parameters... Am 01.11.12 14:56 schrieb "Arne Limburg" unter <arne.limb...@openknowledge.de>: >Hi Markus, > > >Mark is right, I think we just need some more lines of stacktrace... > >Seems like someone is trying to use BeanProvider.getBeans with an >AnnotationLiteral that has a Type-Variable as generic argument, like this: > >public <T> void loadBean() { > BeanProvider.getContextualReference(MyClass.class, new >AnnotationLiteral<T>() {}); >} > >or something like thatŠ >I wonder why the AnnotationLiteral does not throw a more meaningful >exception in that case. >I'll file a spec issue for that. > >Cheers, >Arne > >Am 01.11.12 11:49 schrieb "Mark Struberg" unter <strub...@yahoo.de>: > >> >> >>hi markus! >> >>can you please debug into the BeanmanagerProvider and look _when_ the >>problematic call gets done? >>Also: can you try ds 0.3-SNAPSHOT? interested if this problem still >>exists. >>Next step would be testing jbossas-7.1.2.Final. >> >>LieGrue, >>strub >> >> >>------------------------------ >>Schmitt, Markus schrieb am Do., 1. Nov 2012 02:34 PDT: >> >>>Hi, >>> >>>I am running a JEE 6 project on JBoss 7.1.1 with JDK-7_09 and >>>deltapsike-incubator-0.2. >>>On startup of the server I am facing the following error: >>> >>>Caused by: java.lang.IllegalStateException: JBAS011048: Failed to >>>construct component instance >>> at >>>org.jboss.as.ee.component.BasicComponent.constructComponentInstance(Basi >>>c >>>Component.java:163) >>> at >>>org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.j >>>a >>>va:85) >>> at >>>org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentIns >>>t >>>ance(SingletonComponent.java:116) >>> at >>>org.jboss.as.ejb3.component.singleton.SingletonComponent.start(Singleton >>>C >>>omponent.java:130) >>> at >>>org.jboss.as.ee.component.ComponentStartService.start(ComponentStartServ >>>i >>>ce.java:44) >>> at >>>org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Servi >>>c >>>eControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] >>> at >>>org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControl >>>l >>>erImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] >>> ... 3 more >>>Caused by: javax.ejb.EJBException: java.lang.ClassCastException: >>>sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast >>>to java.lang.Class >>> at >>>org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterc >>>e >>>ptor.java:166) >>> at >>>org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.jav >>>a >>>:230) >>> at >>>org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java: >>>3 >>>33) >>> at >>>org.jboss.as.ejb3.tx.SingletonLifecycleCMTTxInterceptor.processInvocatio >>>n >>>(SingletonLifecycleCMTTxInterceptor.java:56) >>> at >>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java: >>>2 >>>88) >>> at >>>org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterce >>>p >>>tor.processInvocation(CurrentInvocationContextInterceptor.java:41) >>> at >>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java: >>>2 >>>88) >>> at >>>org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLIntercep >>>t >>>or.java:45) >>> at >>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java: >>>2 >>>88) >>> at >>>org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterce >>>p >>>tor.java:61) >>> at >>>org.jboss.as.ee.component.BasicComponent.constructComponentInstance(Basi >>>c >>>Component.java:161) >>> ... 9 more >>>Caused by: java.lang.ClassCastException: >>>sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast >>>to java.lang.Class >>> at >>>javax.enterprise.util.AnnotationLiteral.getTypeParameter(AnnotationLiter >>>a >>>l.java:101) >>> at >>>javax.enterprise.util.AnnotationLiteral.annotationType(AnnotationLiteral >>>. >>>java:117) >>> at >>>org.jboss.weld.resolution.ResolvableBuilder.addQualifier(ResolvableBuild >>>e >>>r.java:127) >>> at >>>org.jboss.weld.resolution.ResolvableBuilder.addQualifiers(ResolvableBuil >>>d >>>er.java:160) >>> at >>>org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:447 >>>) >>> at >>>org.apache.deltaspike.core.api.provider.BeanProvider.getContextualRefere >>>n >>>ce(BeanProvider.java:98) >>> >>>Thanks in advance. >>>Regards, >>>Markus >>> >>> >>> >>> >>>Geschäftsführer: Wolf Kunisch >>>Aufsichtsratsvorsitzender: Christophe Duquenne >>>Sitz der Gesellschaft: Frankfurt/Main >>>Handelsregister: Frankfurt/Main HRB 40 417 >>> >>>* * * * * * * * L E G A L D I S C L A I M E R * * * * * * * * >>>This e-mail and the documents attached are confidential and intended >>>solely for the addressee; it may also be privileged. If you receive this >>>e-mail by error, please notify the sender immediately and destroy it. As >>>its integrity cannot be secured on the internet, the Atos group >>>liability cannot be triggered for the message content. Although the >>>sender endeavors to maintain a computer virus-free network, the sender >>>does not warrant that this transmission is virus-free and shall not be >>>liable for any damages resulting from any virus transmitted. >>>* * * * * * * * L E G A L D I S C L A I M E R * * * * * * * * >> >