[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374552#comment-15374552
 ] 

Gerhard Petracek edited comment on DELTASPIKE-1182 at 7/13/16 8:14 AM:
-----------------------------------------------------------------------

also with a standalone application, your cdi-container needs to find classes 
for potential cdi-beans. you can pass a concrete type to 
BeanProvider#getContextualReference >if< the cdi-container knows one bean which 
has that type.

3rd party libs work for sure (if they contain cdi-beans), because they don't 
contain "dynamic" classes -> the cdi-container you are using can find those 
classes (during the container-start).


was (Author: gpetracek):
also with a standalone application, your cdi-container needs to find classes 
for potential cdi-beans. you can pass a concrete type to 
BeanProvider#getContextualReference >if< the cdi-container knows one bean which 
has that type.

> BeanProvider.getContextualReference
> -----------------------------------
>
>                 Key: DELTASPIKE-1182
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1182
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 1.7.0
>         Environment: JDK 8, Windows 7 
>            Reporter: Adi Schwalb
>            Priority: Minor
>
> Hello
> I must load classes dynamically.
> (A client deploys its database servlets to the server.)
> On server i can make concrete datatypes, so that 
> integration with  BeanProvider.getContextualReference ... 
> works good. But with dynamic classes i can't do 
> E.G. 
> Class c       = classLoader.loadClass(classPath);  
> BeanProvider.getContextualReference( c );
> always fails with:
> java.lang.IllegalStateException: Could not find beans for Type=class .....
> Is this a bug, or have i overseen something?
> How is it possible the deployed database servlets to integrate? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to