I think I've found the problem. I have noticed that classes (Models) which 
were not found
had one feature - @Inject @OsgiService field. The injected osgi services 
were DS 
OSGI services and I did them this way:
@Component(
    immediate = false,
    scope=ServiceScope.SINGLETON
)

When I changed services to 
@Component(
    immediate = true,
    scope=ServiceScope.SINGLETON
)
the problem (as it seems to me) disappeared. So, as I understand there was 
time lag that when 
Model Class which used osgi service was being created the osgi service bean 
wasn't ready. Thats
why BeanManager could find that bean. Can my explanation be right?

суббота, 3 сентября 2016 г., 15:35:16 UTC+3 пользователь iJava написал:
>
> Please, any hint. The problem still not solved...
>
> On Friday, 2 September 2016 15:27:05 UTC+3, iJava wrote:
>>
>> Hi all,
>>
>> I have a very very bad problem with pax-cdi and pax-web. My 
>> configuration: jetty 9.3.11.v20160721, weld 2.2.12.Final, pax-cdi 
>> 0.13.0-SNAPSHOT, pax-swissbox 1.8.0 , pax-web 6.0.0-SNAPSHOT.
>>
>> The problem is that the SAME war bundle sometimes works fine, sometimes I 
>> get the exception:
>>
>> org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: 
>> Unable to resolve any beans for Type: class com.example.SomeClass; 
>> Qualifiers: [@javax.enterprise.inject.Any()]
>>     at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:101
>> )
>>
>> When I set logging level to debug - I see in weld log file that class 
>> com.example.SomeClass is found with qualifiers Any and Default.
>>
>> However, when logging level is set to debug and everything works much 
>> slower I don't get this exception. However, when I set
>> logging level to warn and everything works fast I SOMETIMES get this 
>> exception. So it may be about timing???
>>
>> Please, any help and hints....
>>
>>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to