Problem building with SPNEGO support

62 views
Skip to first unread message

spfma...@e.mail.fr

unread,
Feb 9, 2022, 5:33:04 AM2/9/22
to cas-...@apereo.org
Hi,
 
As I still don't understand how to customize webflow, I decided to give a try to mixed mode authentication. Seems to be close from why I am trying to get.
 
So I tried to enable SPNEGO support following the instructions found here : https://apereo.github.io/cas/6.4.x/authentication/SPNEGO-Authentication.html
 
After downloading the latest "jcifs.jar" to "lib/jcifs-ext.jar" at the root of my project (clone of the overlay repo), I added the following two lines in my "build.grade" :
implementation "org.apereo.cas:cas-server-support-spnego-webflow:${project.'cas.version'}"
implementation files("${projectDir}/lib/jcifs-ext.jar")
 
The build phase seems to run correctly, but at runtime I get this blocking exception "java.lang.NoClassDefFoundError: jcifs/spnego/Authentication".
 
If I explode the war, the jar file is present
find . -name jcifs*
./lib/jcifs-ext.jar
./build/app/WEB-INF/lib/jcifs-1.3.17.jar
./build/app/WEB-INF/lib/jcifs-ext.jar
 
I also tried to rebuild after commenting the line including the "jcifs-ext.jar" as it seems there is a jar in the base webapp (though the doc says the opposite) but the result is the same.
 
Is there something else to configure to solve this problem ? Sounds like a classpath missing something, but in this context I don't know where to check or what to add.
 
Regards
 


FreeMail powered by mail.fr

spfma...@e.mail.fr

unread,
Feb 9, 2022, 9:22:24 AM2/9/22
to cas-...@apereo.org
Hi again,
 
It seems there was a conflict with between "cifs-1.3.17.jar" provided in the base war and the added "jcifs-ext.jar".
 
Thank to the log4j maelstrom, I was able to find the up-to-date syntax to exclude a JAR from the build process  :
 
    configurations.implementation {
        exclude group: 'jcifs', module: '*'
    }

    implementation "org.apereo.cas:cas-server-support-spnego-webflow:${project.'cas.version'}"
    implementation files("${projectDir}/lib/jcifs-ext.jar")
 
I don't know if it's the right way to do it, but it works !
 
Regards
--
- 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/20220209102229.C5D78C00A1%40smtp04.mail.de.
Reply all
Reply to author
Forward
0 new messages