According to the console, jackrabbit-server, commons-auth, and jcr.base all import javax.jcr from the same bundle (jcr.api).
On 2/12/10 11:29 AM, Ian Boston wrote: > Is it possible the Sessions are coming from different classloaders ? > One embedded inside the server bundle (or perhapse base) and the other > deployed directly ? > > class != class often means the bytecode came from a different classloader. > > Ian > > > > On 12 Feb 2010, at 16:22, Justin Edelson wrote: > >> I'm at a loss here. Carsten (or anyone else) - any idea what's up with >> the request below? >> >> debugging, I can see that the actual Session class is XASessionImpl. >> javax.jcr.Session is indeed one of the interfaces passed to >> Proxy.newProxyInstance(). The class loader looks right (the bundle >> classloader for jackrabbit-server). >> >> This is with the current trunk. >> >> Justin >> >> $ curl -u admin:admin http://localhost:8888/index.html?sudo=anonymous >> <html> >> <head> >> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> >> <title>Error 500 >> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxy cannot be >> cast to javax.jcr.Session</title> >> </head> >> <body><h2>HTTP ERROR 500</h2> >> <p>Problem accessing /index.html. Reason: >> <pre> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxy >> cannot be cast to javax.jcr.Session</pre></p><h3>Caused >> by:</h3><pre>java.lang.ClassCastException: >> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxy cannot be >> cast to javax.jcr.Session >> at $Proxy0.impersonate(Unknown Source) >> at >> org.apache.sling.commons.auth.impl.SlingAuthenticator.handleImpersonation(SlingAuthenticator.java:870) >> at >> org.apache.sling.commons.auth.impl.SlingAuthenticator.getSession(SlingAuthenticator.java:538) >> at >> org.apache.sling.commons.auth.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:351) >> at >> org.apache.sling.engine.impl.SlingMainServlet.handleSecurity(SlingMainServlet.java:859) >> at >> org.apache.felix.http.base.internal.context.ServletContextImpl.handleSecurity(ServletContextImpl.java:224) >> at >> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:86) >> at >> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:77) >> at >> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42) >> at >> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49) >> at >> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) >> at >> org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:50) >> at >> org.apache.sling.launchpad.testservices.filters.HttpServiceExtFilter.doFilter(HttpServiceExtFilter.java:31) >
