Example configurations (loading remote fiels) don't work anymore

Description

Configurations from v0.8 don't work anymore with v0.9 if they load metadata from remote URLs. The examples at the bottom of https://wiki.shibboleth.net/confluence/display/MA1/3.1+General+Configuration also don't work anymore with v0.9.

For people upgrading or starting new with the Shibboleth MA this is very frustrating and can be a show stopper for them if they don't have any working examples they can start with.

The error one typically gets when using the old configuration is:

------------------------------------------------------------------------- WARN - Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'source' defined in URL
[file:/opt/metadata-aggregator/edugain-metadata-config.xml]: Cannot
create inner bean
'net.shibboleth.utilities.java.support.httpclient.HttpResource#43bd930a'
of type [net.shibboleth.utilities.java.support.httpclient.HttpResource]
while setting bean property 'DOMResource'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class
[net.shibboleth.utilities.java.support.httpclient.HttpResource] for bean
with name
'net.shibboleth.utilities.java.support.httpclient.HttpResource#43bd930a'
defined in URL
[file:/opt/metadata-aggregator/edugain-metadata-config.xml]; nested
exception is java.lang.ClassNotFoundException:
net.shibboleth.utilities.java.support.httpclient.HttpResource
ERROR - Unable to initialize Spring context
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'source' defined in URL
[file:/opt/metadata-aggregator/edugain-metadata-config.xml]: Cannot
create inner bean
'net.shibboleth.utilities.java.support.httpclient.HttpResource#43bd930a'
of type [net.shibboleth.utilities.java.support.httpclient.HttpResource]
while setting bean property 'DOMResource'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class
[net.shibboleth.utilities.java.support.httpclient.HttpResource] for bean
with name
'net.shibboleth.utilities.java.support.httpclient.HttpResource#43bd930a'
defined in URL
[file:/opt/metadata-aggregator/edugain-metadata-config.xml]; nested
exception is java.lang.ClassNotFoundException:
net.shibboleth.utilities.java.support.httpclient.HttpResource
...
Caused by: java.lang.ClassNotFoundException:
net.shibboleth.utilities.java.support.httpclient.HttpResource
-------------------------------------------------------------------------
After much guesswork and reading
https://wiki.shibboleth.net/confluence/display/MA1/ReleaseNotes I
finally got example 2 working with these changes:

16c16
< <bean
class="net.shibboleth.utilities.java.support.httpclient.HttpResource">

> <bean class="net.shibboleth.ext.spring.resource.HTTPResource">
28,29c28,29
< <property name="certificateFile">
< <bean id="ukCertFile" class="java.io.File">

> <property name="resource">
> <bean id="ukCertFile"
class="org.springframework.core.io.FileSystemResource">

Environment

None

Activity

Ian Young 
September 27, 2016 at 12:52 PM

Thanks for reporting this. As part of MDA-159, I have reorganized the example configurations and made sure they all now work with V0.9.x.

The new page for configuration examples is here:

https://wiki.shibboleth.net/confluence/display/MA1/Configuration+Examples

Please let me know if you run into any additional issues.

Fixed

Details

Assignee

Reporter

Affects versions

Created May 31, 2016 at 6:18 AM
Updated September 27, 2016 at 12:52 PM
Resolved September 27, 2016 at 12:52 PM