[cas-user] CAS 5.1.4 Server with JDBC and SAML - Deployment error on Wildfly 10

22 views
Skip to first unread message

SebastianU

unread,
Sep 25, 2017, 4:26:03 PM9/25/17
to CAS Community
Hi,

I'm migrating to Wildfly 10 and CAS 5.x and I'm getting errors deploying default overlay template...

My pom.xml includes:


<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${cas.version}</version>
</dependency>
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-saml</artifactId>
<version>${cas.version}</version>
</dependency>

...
<cas.version>5.1.4</cas.version>

Deployment fails with following error:

22:16:43,264 WARN  [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 112) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.OpenSAMLConfig' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.support.saml.OpenSamlConfigBean]: Factory method 'openSamlConfigBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.utilities.java.support.xml.BasicParserPool]: Factory method 'parserPool' threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.util.SecurityManager from [Module "deployment.cas.war:main" from Service Module Loader]
22:16:43,279 ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 112) Application startup failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.OpenSAMLConfig' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.support.saml.OpenSamlConfigBean]: Factory method 'openSamlConfigBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.utilities.java.support.xml.BasicParserPool]: Factory method 'parserPool' threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.util.SecurityManager from [Module "deployment.cas.war:main" from Service Module Loader]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.support.saml.OpenSamlConfigBean]: Factory method 'openSamlConfigBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.utilities.java.support.xml.BasicParserPool]: Factory method 'parserPool' threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.util.SecurityManager from [Module "deployment.cas.war:main" from Service Module Loader]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 37 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ParserPool' defined in class path resource [org/apereo/cas/config/CoreSamlConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.utilities.java.support.xml.BasicParserPool]: Factory method 'parserPool' threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.util.SecurityManager from [Module "deployment.cas.war:main" from Service Module Loader]


Do I need some special configuration I missed so far?

Any help appreciated!

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/335cd378-631c-430c-beb4-1bd55eec18a9%40apereo.org.

Abylay

unread,
Dec 7, 2017, 7:05:35 AM12/7/17
to CAS Community

Had the same issue today on CAS 5.2.0
To resolve I did:
1. Include following dependency to pom.xml of cas server overlay:
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency> 
2. Add this property to cas.properties configuration:
cas.samlCore.securityManager=org.apache.xerces.util.SecurityManager

Hope that will save time for people having the same trouble.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/9b4ec6f2-867f-4127-9246-363457abff8c%40apereo.org.

Filip Majernik

unread,
Feb 10, 2020, 12:21:28 PM2/10/20
to CAS Community
Hi Abylay,
I know this is a bit older thread. However, I have run into the same problem. I was using CA 5.1.1 as maven overlay with some custom implementation. Now I wanted to update to 5.3 (can't o higher, because need to be on java 8). I am getting exactly the same exception:

Caused by: java.lang.IllegalArgumentException: com.sun.org.apache.xerces.internal.util.SecurityManager cannot be cast to org.apache.xerces.util.SecurityManager

I have tried your solution. Anyway, I have already had the XERCES impl on the classpath. Also added the cas.properties config property. But the error is still keeping appearing. Could you maybe share your pom.xml? Thanks
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/bfe12d04-b291-485b-8bed-a8577983559f%40apereo.org.
Reply all
Reply to author
Forward
0 new messages