sakai classloading woes

Thu, Dec 7, 2006

It’s a long and lonely road is the old shibboleth highway. Full of tumbleweed and parched bones. No wonder. So the latest on the GSK for Sakai is this. I’ve got everything installed and running. Done a UDP and a PodManager to build a bridge between SAML attributes and Sakai’s subsystem and I’m 90% there. But now I’ve hit Sakai’s classloading nightmare. Here’s the problem.

The PodManager, that provides the bridge between SAML and Sakai is a Sakai component that lives in components/sakai-pod-manager-pack. As it works with Pod classes, Pod.class is in:


so Pod.class is loaded by the components classloader.

The /shibb portal is contained in /webapps so it has it’s own classloader. So when the Shibboleth session is complete, i.e. the user has authenticated at their IdP and the Guard at Sakai has their attributes, the Guard creates a Pod and bungs their attributes into it. That Pod class was loaded by the webapps classloader. Pod.class is in:


All well and good. /shibb/gx traps this Pod and asks the PodManager to register it.

Now the trouble begins.

The Pod that webapps/shibb creates, when it’s passed to PodManager.register(Pod pod), causes this error:

java.lang.LinkageError: loader constraints violated when linking org/guanxi/common/Pod class

The Pod class from /webapps/shibb has crossed the classloader boundary to /components. Now this is dark ages stuff. Linkage errors? In the name of the wee man.

Anyway, I’m now trying to resolve this issue and it might take a wee while. I could probably dump the whole lot in /shared/lib but that’s not a nice solution. I think perhaps guanxi-common-1.2.9.jar is not granular enough. Well, what I mean is it’s not designed for usage in Sakai.

What’s really the problem is shibbing an application. One size certainly does not fit all. In an ideal world, the Guard would use a Sakai service to produce a Pod but Sakai services don’t exist outside Sakai. So how would a Guard ever know about Sakai, or every other application on the planet for that matter.

As ever in Shibboleth, it’s always that last little bit…

comments powered by Disqus