[Building Sakai] Axis, jars, classloading: Any ideas?

Nicola Monat-Jacobs nicola at longsight.com
Thu Jul 28 14:54:46 PDT 2011


I thought I'd throw it out there to see of anyone had some ideas on this
one. I'm writing a custom UserDirectoryProvider so that we can provision
users from an external system that's not LDAP. The external system exposes a
web services interface that we can query for info about users so we can
provision their accounts.

This all works fine when the users log in to Sakai, or when I use the Become
User tool.

However, we also want to provide an SSO-like aspect for the users, but if we
use SakaiPortalLogin or even SakaiScript->getSessionForUser, we get the
following error:

org.apache.axis.AxisFault : ; nested exception is:
java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
cannot be cast to org.apache.axis.attachments.Attachments

We're using axis to make calls to the external system, so we have axis.jar
in
./components/sakai-provider-pack/WEB-INF/lib/
as well as
./webapps/sakai-axis/WEB-INF/lib/

This doesn't seem to cause any issues with normal use, but there's something
about the workflow:
client ws request to sakai -> sakai calls custom provider -> provider makes
ws request to external system

that causes something screwy to happen with the loading of axis.jar. Google
seems to agree that the error message above is often triggered when there's
a duplicate axis.jar somewhere.

I'd be interested to hear if anyone has any ideas about how to mitigate what
seems to be a class loading issue.

Thanks!

- Nicola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110728/64f4801f/attachment.html 


More information about the sakai-dev mailing list