Yes, add *<packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>*
to your maven plugin section in your pom.xml file. Example of the one I
use below.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warName>cas</warName>
<failOnMissingWebXml>false</failOnMissingWebXml>
<recompressZippedFiles>false</recompressZippedFiles>
<archive>
<compress>false</compress>
<manifestFile>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp/META-INF/MANIFEST.MF
</manifestFile>
</archive>
<overlays>
<overlay>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-webapp</artifactId>
</overlay>
</overlays>
*<packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>*
</configuration>
</plugin>
On Friday, February 24, 2017 at 4:37:25 AM UTC-5, armando.mart1s wrote:
>
> Thanks a lot for your answer Todd. Do you know if there is a way to
> exclude this libraries in the pom.xml?
>
> Le 23 févr. 2017 19:22, "Todd Pratt" <[email protected] <javascript:>> a
> écrit :
>
> You are correct, if you've used the cas overlay template to build it then
> it would include tomcat embed libraries and you would need to remove them
> from the war file that it built to deploy on your own tomcat server.
>
>
> On Thursday, February 23, 2017 at 11:34:09 AM UTC-5, armando.mart1s wrote:
>>
>> Hi,
>>
>> I'm trying to configure a cas server with ldap support but when i start
>> my tomcat8, i always have this error :
>>
>> 2017-02-23 17:11:45,449 WARN
>> [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext]
>>
>> - <Exception encountered during context initialization - cancelling refresh
>> attempt: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'servletContainer' defined in class path resource
>> [org/apereo/cas/config/CasEmbeddedContainerConfiguration.class]: Bean
>> instantiation via factory method failed; nested exception is
>> org.springframework.beans.BeanInstantiationException: Failed to instantiate
>> [org.springframework.boot.context.embedded.EmbeddedServletContainerFactory]:
>> Factory method 'servletContainer' threw exception; nested exception is
>> java.lang.LinkageError: loader constraint violation: loader (instance of
>> org/apache/catalina/loader/WebappClassLoader) previously initiated loading
>> for a different type with name "org/apache/coyote/ProtocolHandler">
>>
>>
>> It seems to me that there is a conflict between a cas java class and a
>> tomcat8 java class. But i don't understand how i can solve this problem....
>>
>> Thanks
>>
>> --
>> Armando Martins
>>
> --
> - CAS gitter chatroom: https://gitter.im/apereo/cas
> - CAS mailing list guidelines:
> https://apereo.github.io/cas/Mailing-Lists.html
> - CAS documentation website: https://apereo.github.io/cas
> - CAS project website: https://github.com/apereo/cas
> ---
> 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 [email protected] <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/2a7df723-2088-4225-9673-ef16dd699798%40apereo.org
>
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/2a7df723-2088-4225-9673-ef16dd699798%40apereo.org?utm_medium=email&utm_source=footer>
> .
>
>
>
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/d2e26065-6d0f-4e4d-9d9c-263278bd0a7f%40apereo.org.