IdP class not found exception

1,024 views
Skip to first unread message

Richard Allen

unread,
Sep 15, 2011, 11:39:18 PM9/15/11
to us...@shibboleth.net, John Lazos, Timothy Cameron
Hello Shibboleth community,

My name is Rick and I am working on Meteor 4.0 for the National Student Clearinghouse.  We are in the process of building support for Shibboleth into Meteor 4.0.  So far I have built an IdP v2.3.3 and installed the SP v2.3.4 on Mac OS X 10.6.8.  I deployed the WAR into a Tomcat 7.0 server and got the stacktrace below on startup. After looking into the contents of the lib dir in the WAR it appeared that the Xerces jars from the 'endorsed' folder were not built into the jar so I stuffed them into the lib dir manually and tried starting Tomcat again, but I got the same error.  Has anyone seen this issue before or have an idea of what Xerces jars/versions I should be using besides the ones provided with your IdP build / download?

Any help or insight you could provide would be greatly appreciated.  Also, thanks for posting the users group entries from the past, that was very helpful in getting this far, as was the extensive WIKI material...

Regards, Rick

INFO: Deploying web application archive idp.war

Sep 15, 2011 7:47:25 AM org.apache.catalina.core.ApplicationContext log

INFO: Initializing Spring root WebApplicationContext

Sep 15, 2011 7:47:26 AM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.OpensamlConfig' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]: Cannot resolve reference to bean 'shibboleth.ParserPool' while setting bean property 'parserPool'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]: Cannot create inner bean 'shibboleth.XercesSecurityManager' of type [org.apache.xerces.util.SecurityManager] while setting bean property 'builderAttributes' with key [TypedStringValue: value [http://apache.org/xml/properties/security-manager], target type [null]]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.xerces.util.SecurityManager] for bean with name 'shibboleth.XercesSecurityManager' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.xerces.util.SecurityManager

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)

at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)

at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:680)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]: Cannot create inner bean 'shibboleth.XercesSecurityManager' of type [org.apache.xerces.util.SecurityManager] while setting bean property 'builderAttributes' with key [TypedStringValue: value [http://apache.org/xml/properties/security-manager], target type [null]]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.xerces.util.SecurityManager] for bean with name 'shibboleth.XercesSecurityManager' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.xerces.util.SecurityManager

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)

... 26 more

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.xerces.util.SecurityManager] for bean with name 'shibboleth.XercesSecurityManager' defined in URL [file:/opt/shibboleth-idp/conf/internal.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.xerces.util.SecurityManager

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1105)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:386)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)

... 41 more

Caused by: java.lang.ClassNotFoundException: org.apache.xerces.util.SecurityManager

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)

at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)

at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)

... 46 more

Sep 15, 2011 7:47:26 AM org.apache.catalina.core.StandardContext startInternal

SEVERE: Error listenerStart

Sep 15, 2011 7:47:26 AM org.apache.catalina.core.StandardContext startInternal

SEVERE: Context [/idp] startup failed due to previous errors

Leif Johansson

unread,
Sep 16, 2011, 3:12:33 AM9/16/11
to us...@shibboleth.net
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/16/2011 05:39 AM, Richard Allen wrote:
> Hello Shibboleth community,
>
> My name is Rick and I am working on Meteor 4.0 for the National Student
> Clearinghouse. We are in the process of building support for Shibboleth
> into Meteor 4.0. So far I have built an IdP v2.3.3 and installed the SP
> v2.3.4 on Mac OS X 10.6.8. I deployed the WAR into a Tomcat 7.0 server
> and got the stacktrace below on startup. After looking into the contents
> of the lib dir in the WAR it appeared that the Xerces jars from the
> 'endorsed' folder were not built into the jar so I stuffed them into the
> lib dir manually and tried starting Tomcat again, but I got the same
> error. Has anyone seen this issue before or have an idea of what Xerces
> jars/versions I should be using besides the ones provided with your IdP
> build / download?
>
> Any help or insight you could provide would be greatly appreciated.
> Also, thanks for posting the users group entries from the past, that
> was very helpful in getting this far, as was the extensive WIKI material...
>

The jars from the 'endorsed' dir need special care. See if your tomcat
has a subdirectory of lib called 'endorsed' and stick them there making
sure you don't duplicate stuff.

Cheers Leif
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5y9uEACgkQ8Jx8FtbMZnfWCACfTw+XijwY1XG2il8WsYFOxCi4
qBYAoIQdKr9IjiZpOLy7a6UbN2G/3G64
=2a2B
-----END PGP SIGNATURE-----
--
To unsubscribe from this list send an email to users-un...@shibboleth.net

Peter Schober

unread,
Sep 16, 2011, 4:44:28 AM9/16/11
to us...@shibboleth.net
* Richard Allen <thatsaf...@gmail.com> [2011-09-16 05:40]:

> I deployed the WAR into a Tomcat 7.0 server and got the stacktrace
> below on startup. After looking into the contents of the lib dir in
> the WAR it appeared that the Xerces jars from the 'endorsed' folder
> were not built into the jar so I stuffed them into the lib dir
> manually and tried starting Tomcat again, but I got the same error.

As Leif said, the endorsed jars need to be handled specially, which is
described in the documentation:
https://wiki.shibboleth.net/confluence/display/SHIB2/IdPApacheTomcatPrepare
(First item in section "Required Configuration Changes")

This mage is linked to as item 1. on the installation documentation:
https://wiki.shibboleth.net/confluence/display/SHIB2/IdPInstall

Also note that if you need to support SOAP requests (attribute
queries, mosty) with that IdP -- however unlikely -- the page above
also mentions that Tomcat7 is not supported yet.
-peter

Richard Allen

unread,
Sep 18, 2011, 3:47:30 PM9/18/11
to Shib Users
Leif and Peter,

Thanks for the helpful advice and pointing out the Tomcat config guide.  I switched to Tomcat 6 and placed the jars from the 'endorsed' directory in $CATALINA_HOME/endorsed (for me /Library/Tomcat/endorsed) and the problem is resolved...Rick
Reply all
Reply to author
Forward
0 new messages