Hi all,

I had this problem back in mid-June and it's reared its head again.
Basically, in a JSP, I am trying to adapt an OCM mapped resource and I'm
getting null back.  Felix originally fixed this problem in [1]
but it's back and I'm having troubles again.  The easiest way to see
this is to deploy the samples/simple-demo bundle and go to
http://localhost:8080/sample/content/home.html.  You should get a null
pointer exception because this call:

    final SamplePage samplePage = resource.adaptTo(SamplePage.class);

in
samples/simple-demo/src/main/resources/SLING-INF/content/apps/sling/Samp
lePage/html.jsp returns null.  Any ideas what the problem might be this
time?  I'm finding it a bit tricky debugging the OCM mapped resources
;-)

As an aside, should I be staying away from OCM?  I like the idea and it
works great when it does work, but I don't want to be outside of the
norm here if it's not a good technology.  Or I could possibly supply
some tests given a little guidance to make sure it's breakage becomes
more obvious.

[1] https://issues.apache.org/jira/browse/SLING-546

Cheers,
Craig

Reply via email to