Issue with okta-spring-boot-saml-example




I have downloaded sample “Okta SAML Toolkit for Java” from downloads. While trying to build war file from maven, I am getting following error “Failed to execute goal on project webapp: Could not resolve dependencies for project com.okta:webapp:war:2.0.5-fa68307: Failed to collect dependencies at com.okta:saml-toolkit:jar:2.0.5-fa68307: Failed to read artifact descriptor for com.okta:saml-toolkit:jar:2.0.5-fa68307: Could not transfer artifact com.okta:saml-toolkit:pom:2.0.5-fa68307 from/to central-okta-topic ( Connect to [] failed: Operation timed out (Connection timed out)”

Is this still valid link? If not what is correct link for the same.



Hey @nprasad18

You can remove the repository and pluginRepository from the root pom which will download the jars from central (or your where your maven settings.xml points).

You will run into an issue with jndi:jndi:1.2.1:jar and jta:jta:jar:1.0.1 I’m guessing you just exclude them or install them directly in your local maven repository.

I’ll create a task for us to update this project.



Thanks that helped. I installed both jndi & saml-tookit jar manually into local maven repository. But did not remove any dependencies, it would caused build to fail.

I have another issue BTW.
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/webapp-2.0.5-fa68307] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]

I tried to set higher memory using following command export CATALINA_OPTS="-Xms512M -Xmx1024M"
But did not help. Any solutions here to get through this problem?

  • Prasad


I tried to set
-Xmx2048m -Xms512m

But still I get above error mentioned


Looks like there are two versions of bouncy castle on the classpath org.bouncycastle:bcprov-jdk15on:jar:1.51 and org.bouncycastle:bcprov-jdk16:jar:1.45

You should be able to exclude one:


If that doesn’t help, let me know the OS and JDK you are using and I’ll try to reproduce the issue.


Did not find the pom.xml. Rebuilding maven package did the trick, error went away


@bdemers - I am able to build, deploy war file and able to run tomcat without issues. But I have new issue

when i run localhost:8080/hello - I get following message - org.apache.tomcat.util.http.parser.Cookie.logInvalidHeader A cookie header was received [responseType":[“id_token”,“token”],“state”:“9Y3dpMVUprhK3sJpHL43qI2DF0WBWEscckj6LBiC6rrXzTaYj2EyiMdr8JhwvssL”,“nonce”:“tfTlcaiYZCvygdOc5O8rG1lbaBkM4SUiRRPIzkcKi0upJ0diEkOaBBzq1f91NwvP”,“scopes”:[“openid”,“profile”,“email”],“urls”:{“issuer”:“",“authorizeUrl”:“”,“userinfoUrl”:"”}}; okta-oauth-nonce=tfTlcaiYZCvygdOc5O8rG1lbaBkM4SUiRRPIzkcKi0upJ0diEkOaBBzq1f91NwvP; okta-oauth-state=9Y3dpMVUprhK3sJpHL43qI2DF0WBWEscckj6LBiC6rrXzTaYj2EyiMdr8JhwvssL; connect.sid=s%3AqlAMZeLmFdWWSxvzbiJTigSUD7bW8Ub1.tpqmL49njnCXOPiZd1Pf6pAazlUUxNHfthqqg3NOANU] that contained an invalid cookie.

Please let me know what should I do for the same.

Also, localhost:8080/hello give me 404 page.



Reach out to support: they should be able to get you moving again.

Also, if you want to take a look at a Spring SAML example you can take a look at this blog post:


I checked out sprint-boot-saml app.

I get following errors
Attaching agents: []
Exception in thread “main” java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/

Java Version 9.0,.4
Maven Version - Apache Maven 3.5.3

I tried few fixes suggested on stack-overflow, but other issues came. Is there fix for these versions?



I was able fix the issue. Here are the changes I have made to pom.xml

    <relativePath/> <!-- lookup parent from repository -->



What exactly did you change? If I generate a blank Java + Maven project on, it has already has these properties, except it uses Java 8 by default.

	<relativePath/> <!-- lookup parent from repository -->



Sorry, I was OOO for last two weeks.

I downloaded project from here

Here are contents from pom.xml