Hey all,
I'm having some issues retrieving a session from the resourceResolver and also using the repository to log in to a session.
With the resourceResolver, i'm passing the ResourceResolver object from a JSP file over to a class file and then performing an adaptTo(Session.class). Once this is done, the session is returned as NULL and i'm obviously unable to utilize it. Any ideas as to why?
Since that issue came up, i switched over to using a @Component and @Service annotations and accessing the session via the SlingRepository. Taking this approach, i get an error "java.lang.LinkageError: javax/jcr/Session Help" when i try to call a method on the session object. Any insight to this would also be helpful.
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
It looks like there's something wrong with your bundle. Can you verify that you are importing the javax.jcr package and not embedding it?
Views
Replies
Total Likes
It looks like there's something wrong with your bundle. Can you verify that you are importing the javax.jcr package and not embedding it?
Views
Replies
Total Likes
I had it in my pom file, added <scope>provided</scope> to the dependency and all is now good. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies