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 <[email protected]>:

>
>
>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(Basic
>>Component.java:163)
>>        at 
>>org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.ja
>>va:85)
>>        at 
>>org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInst
>>ance(SingletonComponent.java:116)
>>        at 
>>org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonC
>>omponent.java:130)
>>        at 
>>org.jboss.as.ee.component.ComponentStartService.start(ComponentStartServi
>>ce.java:44)
>>        at 
>>org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Servic
>>eControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
>>        at 
>>org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControll
>>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(CMTTxInterce
>>ptor.java:166)
>>        at 
>>org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java
>>:230)
>>        at 
>>org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:3
>>33)
>>        at 
>>org.jboss.as.ejb3.tx.SingletonLifecycleCMTTxInterceptor.processInvocation
>>(SingletonLifecycleCMTTxInterceptor.java:56)
>>        at 
>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:2
>>88)
>>        at 
>>org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextIntercep
>>tor.processInvocation(CurrentInvocationContextInterceptor.java:41)
>>        at 
>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:2
>>88)
>>        at 
>>org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLIntercept
>>or.java:45)
>>        at 
>>org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:2
>>88)
>>        at 
>>org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedIntercep
>>tor.java:61)
>>        at 
>>org.jboss.as.ee.component.BasicComponent.constructComponentInstance(Basic
>>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(AnnotationLitera
>>l.java:101)
>>        at 
>>javax.enterprise.util.AnnotationLiteral.annotationType(AnnotationLiteral.
>>java:117)
>>        at 
>>org.jboss.weld.resolution.ResolvableBuilder.addQualifier(ResolvableBuilde
>>r.java:127)
>>        at 
>>org.jboss.weld.resolution.ResolvableBuilder.addQualifiers(ResolvableBuild
>>er.java:160)
>>        at 
>>org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:447)
>>        at 
>>org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReferen
>>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 * * * * * * * *
>

Reply via email to