DEV Community

loading...

if you get a random useless error using mvn and testng about certs

Tony Colston
wanna be gamedev ... all around nerd and dev
・1 min read

This is the error I was getting

There was an error in the forked process
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...

Seriously not helpful when trying to run a testng test using maven and surefire.

To fix it I changed the xml header in the testng.xml file. Sigh.

There is no reason for this type of stuff. There are parts of Java programming that are a dumpster fire and this is a good example of it. No way text in an xml file should cause such an error. Just a complete failure on the part of Java/testng/maven/surefire? Someone in the chain does not actually want you to use their product... who knows where the failure lies.

I changed the header from the header found on the testng website to this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

And no more error. :(

Discussion (0)