SunCertPathBuilderException: unable to find valid certification path to requested target

35 views
Skip to first unread message

Andrew Pennebaker

unread,
Apr 13, 2015, 2:11:41 PM4/13/15
to jasig-c...@googlegroups.com
I'm able to use CAS to login to a developer application at work, but when my coworker tries to login, he gets:

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:322)

We've done our best to match the known working configuration, but he still gets the above error on his machine. Any tips?

System:

* Tomcat 6
* Maven 3
* Java JDK 1.7
* Mac OS X Yosemite

.bash_profile:

# Homebrew
PATH="/usr/local/bin:$PATH"

#
# Tomcat
#

export TOMCAT_HOME="/usr/local/Cellar/tomcat6/6.0.43"
export CATALINA_HOME="$TOMCAT_HOME/libexec"
export CATALINA_OPTS="$CATALINA_OPTS -Xms2g -Xmx2g -XX:MaxPermSize=1024M -XX:PermSize=512M -XX:NewRatio=3 -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+AggressiveOpts -Djavax.net.ssl.trustStore=$HOME/mycerts -Djavax.net.ssl.trustStorePassword=thing -Djavax.net.ssl.keyStore=$HOME/mycerts -Djavax.net.ssl.keyStorePassword=thing"

alias tomstart='$TOMCAT_HOME/bin/startup.sh'
alias tomstop='$TOMCAT_HOME/bin/shutdown.sh 20'
alias tomlog='tail -f $CATALINA_HOME/logs/catalina.out'

# Java
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

export PATH

Andrew Pennebaker

unread,
Apr 13, 2015, 6:20:37 PM4/13/15
to jasig-c...@googlegroups.com
Update: We were able to fix the SSL error by preventing the CATALINA_OPTS variable from compounding with previous CATALINA_OPTS values:

export CATALINA_OPTS="-Xms2g -Xmx2g -XX:MaxPermSize=1024M -XX:PermSize=512M -XX:NewRatio=3 -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+AggressiveOpts -Djavax.net.ssl.trustStore=$HOME/mycerts -Djavax.net.ssl.trustStorePassword=thing -Djavax.net.ssl.keyStore=$HOME/mycerts -Djavax.net.ssl.keyStorePassword=thing"
Reply all
Reply to author
Forward
0 new messages