Hi JB,

It is a complex app, I will try to recreate the problem in a smaller example, 
but this will take some time. Meanwhile, this is what is happening.
The diagnostic on the Waiting bundle indicates it is waiting on SCR component:


karaf@root()> diag 29
EncryptedQuery :: Core (29)
---------------------------
Status: Waiting
Declarative Services
org.enquery.encryptedquery.encryption.PrimeGenerator (4)
  missing references: modPowAbstraction


When I check the information on this component:

karaf@root()> scr:info org.enquery.encryptedquery.encryption.PrimeGenerator
Component Description: org.enquery.encryptedquery.encryption.PrimeGenerator
===========================================================================
Class:         org.enquery.encryptedquery.encryption.PrimeGenerator
Bundle:        29 (encryptedquery-core:3.0.0.202006121846)
Enabled:       true
Immediate:     false
Services:      [org.enquery.encryptedquery.encryption.PrimeGenerator]
Scope:         singleton
Config PID(s): [org.enquery.encryptedquery.encryption.PrimeGenerator], Policy: 
optional
Base Props:    (0 entries)

Component Configuration Id: 4
-----------------------------
State:        UNSATISFIED REFERENCE
Config Props: (2 entries)
  component.id<Long> = 4
  component.name<String> = org.enquery.encryptedquery.encryption.PrimeGenerator
References:   (total 2)
  - modPowAbstraction: org.enquery.encryptedquery.encryption.ModPowAbstraction 
UNSATISFIED 1..1 static
    target=(*) scope=bundle
  - randomProvider: org.enquery.encryptedquery.utils.RandomProvider SATISFIED 
1..1 static
    target=(*) scope=bundle (no active bindings)

And the component providing the ModPowAbstraction interface is:

karaf@root()> scr:info 
org.enquery.encryptedquery.encryption.impl.ModPowAbstractionGMPImpl
Component Description: 
org.enquery.encryptedquery.encryption.impl.ModPowAbstractionGMPImpl
==========================================================================================
Class:         
org.enquery.encryptedquery.encryption.impl.ModPowAbstractionGMPImpl
Bundle:        29 (encryptedquery-core:3.0.0.202006121846)
Enabled:       true
Immediate:     false
Services:      [org.enquery.encryptedquery.encryption.ModPowAbstraction]
Scope:         singleton
Config PID(s): 
[org.enquery.encryptedquery.encryption.impl.ModPowAbstractionGMPImpl], Policy: 
require
Base Props:    (1 entry)
  library<String> = gmp



So I don’t know why ModPowAbstractionGMPImpl component does not satisfy the 
requirement of PrimeGenerator.  Again, this only occurs while running with 
Pax-Exam.  Thanks for your help.

Best regards,
Alex soto




> On Jun 13, 2020, at 1:29 AM, Jean-Baptiste Onofre <j...@nanthrax.net> wrote:
> 
> Hi again,
> 
> I tested ConfigExampleTest#testScr adding the ConfigurationPolicy.REQUIRE and 
> it works fine.
> 
> Any change you reproduce the issue on simple test where I can take a look ?
> 
> Thanks,
> Regards
> JB
> 
>> Le 12 juin 2020 à 22:12, Alex Soto <alex.s...@envieta.com 
>> <mailto:alex.s...@envieta.com>> a écrit :
>> 
>> Hello,
>> 
>> I started migrating to Karaf 4.2.9 (from 4.2.8) and my integration tests are 
>> now all failing. Some SCR components are never activated, specifically the 
>> ones with configurationPolicy = ConfigurationPolicy.REQUIRE. However, if I 
>> run the application standalone, everything works correctly, it is only when 
>> running with Pax-Exam that this happens.  Any idea?
>> 
>> Running with Pax-Exam version 4.13.2
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
> 

Reply via email to