Dies ist eine alte Version des Dokuments!


net.shibboleth.plugin.storage.jdbc

Das Problem äußert sich, wenn eine veraltete Plugin-Version für net.shibboleth.plugin.storage.jdbc installiert ist.

Logfiles:

Tomcat catalina.log:
====BEGIN====
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/idp] startup failed due to previous errors
====END====

Tomcat localhost.log:
====BEGIN====
SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageService] for bean with name 'JDBCStorageService' defined in file [/opt/shibboleth-idp/conf/global.xml]: problem with class file or dependent class
        at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1508)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:683)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:651)
                 ....
====END====

Version 2.0.0 muss mindestens installiert sein, um mit IdP 5.x kompatibel zu sein. Eine Aktualisierung des Plugins ist erst nach dem IdP 5 Upgrade möglich.

detaillierte Lister aller installierten Plugins:

root@idp:/bin/plugin.sh -fl 
Plugin: net.shibboleth.plugin.storage.jdbc	Current Version: 1.0.3
	Versions 
	1.0.4:	Min=4.1.0	Max=5.0.0	Support level: Current
	1.0.1:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.0:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.3:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.2:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	2.0.0:	Min=5.0.0	Max=6.0.0	Support level: Current

Liste verfügbarer Updates:

root@idp:/opt/shibboleth-idp# bin/plugin.sh -L
Plugin net.shibboleth.plugin.storage.jdbc: version 2.0.0 available for install

Aktualisieren des Plugins behebt den Fehler:

root@idp:/opt/shibboleth-idp# bin/plugin.sh -u net.shibboleth.plugin.storage.jdbc

Beim Aufruf der Statusseite im Browser erscheint im Browserfenster die Fehlermeldung „Ein Fehler ist aufgetreten: ServletException“. In den IdP-Logs findet sich folgende Meldung:

ERROR [jakarta.servlet.ServletException:144] - 
jakarta.servlet.ServletException: Handler dispatch failed: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/jstl/core/Config
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1104)
Caused by: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/jstl/core/Config
        at org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:103)

Der Fehler lässt sich durch Einbinden einer aktuelleren Version von jakarta jstl beheben.

$ wget -P /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
https://repo.maven.apache.org/maven2/org/glassfish/web/jakarta.servlet.jsp.jstl/3.0.1/jakarta.servlet.jsp.jstl-3.0.1.jar
$ wget -P /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
 https://repo.maven.apache.org/maven2/jakarta/servlet/jsp/jstl/jakarta.servlet.jsp.jstl-api/3.0.0/jakarta.servlet.jsp.jstl-api-3.0.0.jar

Danach build erneut ausführen und Tomcat neu starten:

$ sudo /opt/shibboleth-idp/bin/build.sh -Didp.target.dir=/opt/shibboleth-idp  
$ sudo systemctl restart tomcat10.service 

Entsprechend https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631612/LDAPAuthnConfiguration wurde die LDAP-Konfiguration in V4.1 geändert. Die Datei conf/authn/ldap-authn-config.xml wird nicht mehr mitgeliefert/benötigt.

Wurde diese Datei in V 4.1 nicht gelöscht und die entsprechende Referenz „<import resource=„ldap-authn-config.xml“ />“ in conf/authn/password-authn-config.xml nicht entfernt findet sich folgende Fehlermeldung im Logfile des IdP:

WARN [net.shibboleth.shared.spring.context.FilesystemGenericWebApplicationContext:616] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.ldaptive.auth.PooledBindAuthenticationHandler] for bean with name 'authHandler' defined in file [/opt/shibboleth-idp/conf/authn/ldap-authn-config.xml]
ERROR [org.springframework.webflow.execution.FlowExecutionException:88] -
org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'CallAuthenticationFlow' of flow 'authn'
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:573)

Lösung:

  • Löschen der Datei conf/authn/ldap-auth-config.xml gelöscht werden
  • entfernen der entsprechende Referenz „<import resource=„ldap-authn-config.xml“ />“ in conf/authn/password-authn-config.xml
  • ggf. muss zusätzlich in der password-auth-config.xml folgender Abschnitt hinzugefügt werden, wenn dieser fehlt
    <util:list id="shibboleth.authn.Password.Validators">
        <ref bean="shibboleth.LDAPValidator" />
    </util:list>

Vielen Dank an Michael Pietsch für´s Teilen!

  • Zuletzt geändert: vor 17 Monaten