You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
I am running org.apache.sling.launchpad-8.jar unmodified and fresh install on jdk7. I followed the steps to run your sample/tutorial. I work on unmodified sample data and execute a "Like me" operation on the "http://localhost:8080/content/adaptto/2015/day1/rookie-session.html"
The LikeMe component in line 67 calls ValueMap writeProps = request.getResource().adaptTo(ModifiableValueMap.class);
which leaves the writeProps = NULL. Consequently writeProps.get(...) in line 67 throws NPE. see below.
If I execute request.getResource().adaptTo(ValueMap.class) instead, I get a beautiful ValueMap (non-null!).
I have checked for security issues (like administrative resolver...) but was unlucky.
Please advice.
Exception:
`Internal Server Error (500)
The requested URL /content/adaptto/2015/day1/rookie-session.likeme.html resulted in an error in org.adaptto.rookie.demo.components.LikeMe.
Exception:
java.lang.NullPointerException
at org.adaptto.rookie.demo.components.LikeMe.updateLikeCounter(LikeMe.java:67)
at org.adaptto.rookie.demo.components.LikeMe.doPost(LikeMe.java:48)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
[...]
The text was updated successfully, but these errors were encountered:
Cool demo, especially for a beginner like me.
I am running org.apache.sling.launchpad-8.jar unmodified and fresh install on jdk7. I followed the steps to run your sample/tutorial. I work on unmodified sample data and execute a "Like me" operation on the "http://localhost:8080/content/adaptto/2015/day1/rookie-session.html"
The LikeMe component in line 67 calls
ValueMap writeProps = request.getResource().adaptTo(ModifiableValueMap.class);
which leaves the writeProps = NULL. Consequently writeProps.get(...) in line 67 throws NPE. see below.
If I execute
request.getResource().adaptTo(ValueMap.class)
instead, I get a beautiful ValueMap (non-null!).I have checked for security issues (like administrative resolver...) but was unlucky.
Please advice.
Exception:
`Internal Server Error (500)
The requested URL /content/adaptto/2015/day1/rookie-session.likeme.html resulted in an error in org.adaptto.rookie.demo.components.LikeMe.
Exception:
java.lang.NullPointerException
at org.adaptto.rookie.demo.components.LikeMe.updateLikeCounter(LikeMe.java:67)
at org.adaptto.rookie.demo.components.LikeMe.doPost(LikeMe.java:48)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
[...]
The text was updated successfully, but these errors were encountered: