Hi ,
I am using AEM6.4 and I have created an OSGi service which I'm trying to call from my custom workflow process but getting NullPointerException when calling these service methods. ;/
Even when hovering over on the service object declared within my workflow process -it shows null. (refer screenshot below).
Also, I have used apache felix scr 'Reference' annotation here. Not sure if that is expected in 6.4?
And yes, my bundle is compiled(without any error), installed and active. (refer screenshot below)
Any suggestion what I might be doing wrong?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Please check below links for migrating SCR to OSGI annotations
https://www.argildx.com/migration-of-scr-annotations-to-ds-annotations/
http://sgaem.blogspot.com/2017/07/migration-of-scr-annotations-to-osgi-r6.html
Views
Replies
Total Likes
Hi,
could be issue with SCR Felix reference annotation if you are using osgi annotation to declare process service, try with Osgi R6 annotations
import
org.osgi.service.component.annotations.Reference;
Views
Replies
Total Likes
Hi Arun,
Thanks for your suggestion, yes, using the 'org.osgi.service.component.annotations.Reference;' worked.
One more question on the same node, I have to introduce some OSGi config (say: service.endpoint.url) for the same service using @Property annotation but I'm unable to.
The service builds successfully and is available under the bundle but the entry under the -'/system/console/ConfigMgr' to add respective configuration isn't available.
Unfortunately the @Property annotation I can't find under OSGi hence using the 'org.apache.felix.scr.annotations.Property;' annotations for that.
Please suggest what could be wrong here?
Or share a post/link with an example of an OSGi service in AEM6.4 using the following annotations:-
@Component
@Service
@Reference
@Property
- Thanks
Views
Replies
Total Likes
Hi,
Please check below links for migrating SCR to OSGI annotations
https://www.argildx.com/migration-of-scr-annotations-to-ds-annotations/
http://sgaem.blogspot.com/2017/07/migration-of-scr-annotations-to-osgi-r6.html
Views
Replies
Total Likes
Thanks, Arun - you are a savior..!
This is exactly what I was looking for but was unable to find anything relevant even on Adobe helpx docs.
One more thing - I have another open question in Adobe forum, can you please see if you can guide with that too.
Thanks again..!
Views
Replies
Total Likes