DEV Community

Tony Colston
Tony Colston

Posted on

2

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay