Hi @robbierami ,
A service in the "Satisfied" state means:
The component is valid and all required references are resolved.
But it is not activated yet usually because:
- The service has no consumer (lazy activation).
- @Component(immediate = true) is missing (deferred activation).
- Optional or dynamic references may cause unexpected behavior.
Try below steps:
Step 1: Use Felix Console to Diagnose
Visit: http://localhost:4502/system/console/components
Search for your component by class name or package.
Click on the component entry to inspect it.
Look for:
"References" section: check if any are marked as unsatisfied or optional.
"Configuration" and "Properties": see if it’s missing config or awaiting activation.
Step 2: Check Your Code Annotations
package com.example.core.services.impl;
import com.example.core.services.MyCustomService;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Reference;
@Component(
service = MyCustomService.class,
immediate = true // =>This ensures service is activated immediately
)
public class MyCustomServiceImpl implements MyCustomService {
@Reference
private SomeDependencyService dependency;
@Activate
protected void activate() {
System.out.println("MyCustomServiceImpl activated.");
}
}
Make sure:
You use immediate = true for services that should activate as soon as they are satisfied.
You don't mark services as immediate = false unless using on-demand (consumer-initiated) behavior.
Step 3: Check If the Referenced Service Is Active
Go to: http://localhost:4502/system/console/components
Check for SomeDependencyService.
Ensure:
It's in Active state.
It’s not Disabled, Unsatisfied, or Missing.
Step 4: Debug Logs (to Find Hidden Issues)
Go to: http://localhost:4502/system/console/slinglog
Add these loggers:
org.apache.felix.scrDEBUG
org.apache.felix.scr.implDEBUG
org.osgi.frameworkDEBUG
org.apache.sling
Step 5: Force Activation
You can activate manually via console if needed:
Go to http://localhost:4502/system/console/components
Click Activate button under your service
Or update it to:
@Component(
service = MyCustomService.class,
immediate = true
)
Then re-deploy your bundle.
Regards,
Amit