Hi friends,
Am getting the null when injecting the resolverFactory object in Java class through Fleix Annotations(@Reference).
How i can use the sling and cq implicit object java class.It can be useful in JSP.But how in java class???
Please tell me a solution
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
In Java recommended approach is to use @reference to get a service reference. If you are getting null for resolverFactory in your service (Your class should be service as well) please create a daycare ticket with steps to reproduce this issue.
Other way to get a reference would be in your activate method of service (Your class) using bundlecontext (Similar to this http://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html#getS...))
Yogesh
Views
Replies
Total Likes
In Java recommended approach is to use @reference to get a service reference. If you are getting null for resolverFactory in your service (Your class should be service as well) please create a daycare ticket with steps to reproduce this issue.
Other way to get a reference would be in your activate method of service (Your class) using bundlecontext (Similar to this http://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html#getS...))
Yogesh
Views
Replies
Total Likes
Yogesh Upadhyay wrote...
In Java recommended approach is to use @reference to get a service reference. If you are getting null for resolverFactory in your service (Your class should be service as well) please create a daycare ticket with steps to reproduce this issue.
Other way to get a reference would be in your activate method of service (Your class) using bundlecontext (Similar to this http://www.knopflerfish.org/releases/current/docs/javadoc/org/osgi/framework/BundleContext.html#getS...))
Yogesh
Yes.For @Service annotated class itself am getting the null.
Why am getting null..
Thanks in advance
Views
Replies
Total Likes