DEV Community

Tony Colston
Tony Colston

Posted on

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

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
...

Enter fullscreen mode Exit fullscreen mode

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" >
Enter fullscreen mode Exit fullscreen mode

And no more error. :(

Top comments (0)