I make apps for other people

Posts from September, 2016

Fixing the Unknown Source error in Java

Posted by Chris Jones
On September 19th, 2016 at 16:32

Permalink | Trackback | Links In |

Comments Off on Fixing the Unknown Source error in Java
Posted in General

Given a Maven Java project with dependencies, you might come across a project (like I did) with very old dependencies.  In my case, I found references to OpenSAML 1.1b, a never really released POM that was included with older (2012 and earlier) versions of Aspero JASIG CAS.  While testing my replacement for the CAS server, I encountered cryptic DOM parsing errors.
Caused by: org.opensaml.SAMLException
at org.opensaml.SAMLException.getInstance(Unknown Source)
at org.opensaml.SAMLResponse.fromDOM(Unknown Source)
at org.opensaml.SAMLResponse.<init>(Unknown Source)
at org.jasig.cas.client.validation.Saml11TicketValidator.parseResponseFromServer(Saml11TicketValidator.java:51)

Neither running the server with a debugger attached nor running a unit test which duplicated the exception helped:  the breakpoints were ignored because the debugging symbols were stripped by the original ant build which produced the JAR.