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

Quadratic AI

Quadratic AI – The Spreadsheet with AI, Code, and Connections

  • AI-Powered Insights: Ask questions in plain English and get instant visualizations
  • Multi-Language Support: Seamlessly switch between Python, SQL, and JavaScript in one workspace
  • Zero Setup Required: Connect to databases or drag-and-drop files straight from your browser
  • Live Collaboration: Work together in real-time, no matter where your team is located
  • Beyond Formulas: Tackle complex analysis that traditional spreadsheets can't handle

Get started for free.

Watch The Demo 📊✨

Top comments (0)

Permit.io Launch week

Auth that fits in your CI/CD

Permit CLI Launch Week is here! Live demos, daily drops, and giveaways — see how to automate fine-grained access control straight from your terminal.

Sign up

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay