CAS Client Compilation Error

36 views
Skip to first unread message

Steve Cheung

unread,
Nov 11, 2019, 9:20:10 AM11/11/19
to CAS Community
Hi all,

I am using the JDK 11 to build the package but encounter this compilation error. The code is from https://github.com/apereo/java-cas-client.

Do anyone has idea about how to solve it? Many thanks.

Regards, Steve

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project cas-client-core: Compilation failure: Compilation failure: 

[ERROR] /Users/stevecheung/Documents/Steve_Temp/workspace/java-cas-client/cas-client-core/src/main/java/org/jasig/cas/client/session/SingleSignOutHandler.java:[30,22] package javax.xml.bind does not exist

[ERROR] /Users/stevecheung/Documents/Steve_Temp/workspace/java-cas-client/cas-client-core/src/main/java/org/jasig/cas/client/session/SingleSignOutHandler.java:[250,38] cannot find symbol

[ERROR]   symbol:   variable DatatypeConverter

[ERROR]   location: class org.jasig.cas.client.session.SingleSignOutHandler

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

[ERROR] 

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :cas-client-core

Andy Ng

unread,
Nov 11, 2019, 7:50:11 PM11/11/19
to CAS Community
Hi Steve,

Have not tried building this using jdk11.

However, looking at this line here: https://github.com/apereo/java-cas-client/blob/cas-client-3.6.1/pom.xml#L94

It seems the project is built using jdk 8, so I am not sure if it supports jdk 11.

- Andy

Steve Cheung

unread,
Nov 11, 2019, 8:40:08 PM11/11/19
to CAS Community
Hi Andy,

Thanks for your prompt reply.


When I used JDK 1.8 to compile, however, it prompts another error. I am using the master branch to build. Did you build successfully before? 


Beside the compilation error, I have another question. I am helping to move all client's J2EE web app to private cloud running on Tomcat. It is container base, so one application will be hosted in one container.  In order to keep the SSO across multiple tomcats, so I am looking to integrate this CAS client into Tomcat to avoid too many code changes on application. Am I on the right direction?

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO] 

[INFO] Apereo CAS Client for Java 3.6.2-SNAPSHOT .......... SUCCESS [  4.221 s]

[INFO] Jasig CAS Client for Java - Core ................... FAILURE [ 14.564 s]

[INFO] Jasig CAS Client for Java - JBoss Integration ...... SKIPPED

[INFO] Jasig CAS Client for Java - Distributed Proxy Storage Support: EhCache SKIPPED

[INFO] Jasig CAS Client for Java - Distributed Proxy Storage Support: Memcached SKIPPED

[INFO] Jasig CAS Client for Java - SAML Protocol Support .. SKIPPED

[INFO] Jasig CAS Client for Java - Spring Boot Support .... SKIPPED

[INFO] Jasig CAS Client for Java - Common Tomcat Integration Support SKIPPED

[INFO] Jasig CAS Client for Java - Tomcat 6.x Integration . SKIPPED

[INFO] Jasig CAS Client for Java - Tomcat 7.x Integration . SKIPPED

[INFO] Jasig CAS Client for Java - Tomcat 8.x Integration . SKIPPED

[INFO] Jasig CAS Client for Java - Tomcat 8.5.x Integration SKIPPED

[INFO] Jasig CAS Client for Java - Tomcat 9.0.x Integration SKIPPED

[INFO] Jasig CAS Client for Java - Jetty Container Integration 3.6.2-SNAPSHOT SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 19.338 s

[INFO] Finished at: 2019-11-12T09:21:58+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar (default-jar) on project cas-client-core: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar: java.lang.NoSuchMethodError: org.codehaus.plexus.archiver.jar.JarArchiver.setMinimalDefaultManifest(Z)V

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>org.apache.maven.plugins:maven-jar-plugin:3.2.0

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/Users/stevecheung/.m2/repository/org/apache/maven/plugins/maven-jar-plugin/3.2.0/maven-jar-plugin-3.2.0.jar

[ERROR] urls[1] = file:/Users/stevecheung/.m2/repository/org/codehaus/plexus/plexus-archiver/3.0.1/plexus-archiver-3.0.1.jar

[ERROR] urls[2] = file:/Users/stevecheung/.m2/repository/org/codehaus/plexus/plexus-io/2.6/plexus-io-2.6.jar

[ERROR] urls[3] = file:/Users/stevecheung/.m2/repository/org/iq80/snappy/snappy/0.3/snappy-0.3.jar

[ERROR] urls[4] = file:/Users/stevecheung/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar

[ERROR] urls[5] = file:/Users/stevecheung/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar

[ERROR] urls[6] = file:/Users/stevecheung/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar

[ERROR] urls[7] = file:/Users/stevecheung/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar

[ERROR] urls[8] = file:/Users/stevecheung/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar

[ERROR] urls[9] = file:/Users/stevecheung/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar

[ERROR] urls[10] = file:/Users/stevecheung/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

[ERROR] urls[11] = file:/Users/stevecheung/.m2/repository/org/apache/maven/shared/file-management/3.0.0/file-management-3.0.0.jar

[ERROR] urls[12] = file:/Users/stevecheung/.m2/repository/org/apache/maven/shared/maven-shared-io/3.0.0/maven-shared-io-3.0.0.jar

[ERROR] urls[13] = file:/Users/stevecheung/.m2/repository/org/apache/maven/maven-archiver/3.5.0/maven-archiver-3.5.0.jar

[ERROR] urls[14] = file:/Users/stevecheung/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar

[ERROR] urls[15] = file:/Users/stevecheung/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar

[ERROR] urls[16] = file:/Users/stevecheung/.m2/repository/org/codehaus/plexus/plexus-utils/3.3.0/plexus-utils-3.3.0.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

[ERROR] 

[ERROR] -----------------------------------------------------

[ERROR] 

[ERROR] -> [Help 1]


Thanks, Steve

Ray Bon

unread,
Nov 14, 2019, 4:53:35 PM11/14/19
to cas-...@apereo.org
Steve,

From a security point of view, you want logins to each application to be separate. One application per tomcat is ok, but if two application on one tomcat, then user has access to both. However, I suspect that mod_auth_cas works this way.

Let us know how this goes. It could simplify deployment because CAS client would be part of the tomcat playbook and application configuration would not need to include CAS bits.

What would happen in a proxy setup? The application would need access to the PGT but this would be help by tomcat.

Ray
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

Steve Cheung

unread,
Nov 14, 2019, 9:07:05 PM11/14/19
to cas-...@apereo.org
Hi Ray ,

Thanks for your reply. For my project case, one application will be hosted on one container only. And once the user logged in application A and he/she is able to access application B in other tomcat directly.


Thats's why I am looking for install the cas client in each tomcat in future. For the mod_auth_cas, since I am not familiar, any document / technical can be shared to me?

Thanks, Steve




--
- 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/dcac9d082f438b6c5523473ecb3cb649099922c8.camel%40uvic.ca.

Ray Bon

unread,
Nov 15, 2019, 12:51:02 PM11/15/19
to cas-...@apereo.org
Steve,

I have not used mod_auth_cas myself, here is the code base, https://github.com/apereo/mod_auth_cas

Ray
Reply all
Reply to author
Forward
0 new messages