Issue with upgrading to SAML3

Brent Putman putmanb at georgetown.edu
Mon Jan 7 18:37:29 EST 2019


On 1/6/19 7:19 PM, Eze Ikonne wrote:
>
>  
>
> In the latest changes I included the following jars:
>
>  
>
>
> opensaml-api-3.4.1.jar
>
> opensaml-impl-3.4.1.jar
>
>  
>

(Those 2 don't actually exist, but I'll assume an email typo).


> openws-1.5.6.jar
>
> xmltooling-1.4.6.jar
>

Well, that's not right.  You should not have openws or xmltooling in use
with OpenSAML v3. What led you to believe that?  Those are for the v2
stack only.  In v3 they are completely absorbed and replaced by the
various modules of java-opensaml (i.e. opensaml-*) and/or other jar
dependencies defined in the the POM(s). 

You may need other opensaml-* jar artifacts depending on what you are
doing. In particular for SAML stuff, you'll need opensaml-saml-api and
opensaml-saml-impl and their dependencies.  But most importantly you
need to include all the dependencies of the java-opensaml modules used
in your app, both third-party and those from our project.  We're
Maven-based, so it's easiest if you are Maven-based as well and use
Maven for dependency mgmt, or at least something Maven-adjacent like Gradle.


>  
>
>
>         try {
>
>             //DefaultBootstrap.bootstrap(); ------ existing line,
> which was throwing error
>
>             InitializationService.initialize(); -- new line added now
>

That is correct, that's how you init v3.  DefaultBootstrap is no longer
used. 


> Caused by: java.lang.ClassNotFoundException:
> net.shibboleth.utilities.java.support.component.ComponentInitializationException
>
>               at
> java.net.URLClassLoader.findClass(URLClassLoader.java:609) ~[?:1.8.0]
>
>               at
> java.lang.ClassLoader.loadClassHelper(ClassLoader.java:925) ~[?:2.9
> (06-26-2018)]
>
>               at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
> ~[?:2.9 (06-26-2018)]
>
>               at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:343) ~[?:1.8.0]
>
>               at java.lang.ClassLoader.loadClass(ClassLoader.java:853)
> ~[?:2.9 (06-26-2018)]
>
>               ... 19 more
>
>

That sounds like you are missing the java-support jar dependency.  That
is a Shibboleth project jar artifact, which is a dependency of all of
the modules of java-opensaml.  Again, using Maven or something based on
Maven (Gradle) will resolve and manage all of these for you automatically.

If you don't use Maven, Grade, etc, then you're on your own.  At the
very least you'd likely need to run something like 'mvn dependency:list'
at least once on one of the lower-level java-opensaml modules to get a
sense of all the dependencies you need to include.  Be aware that that's
only going to give you a point-in-time list for that particular version.
If/when we add additional deps in the future for newer versions, you
won't know about them until something fails (hopefully at compile time
and not at runtime in production...)

Thanks,
Brent



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20190107/254dfe46/attachment-0001.html>


More information about the dev mailing list