question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PKIX path building failed unable to find valid certification path to requested target Payara Server

See original GitHub issue

Hello, I’m trying to run the api in a JEE application, using payara server. But when I run the simple routine of sending a message to a group I get an exception. I have already tried to enter the telegram certificate in the keystore.jks and cacert.jks of the $ PAYARA_HOME / glassfish / domains / lardosmeussonhos / config server, but it did not resolve. can you help me?

This is the exception: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.pengrad.telegrambot.impl.TelegramBotClient.send(TelegramBotClient.java:59) at com.pengrad.telegrambot.TelegramBot.execute(TelegramBot.java:41) … This is a part of the code:

`TelegramBot bot = new TelegramBot(TOKEN); SendResponse sendResponse = bot.execute(new SendMessage(CHAT_ID, MENSAGEM));

System.out.println("Mensagem Enviada? " + sendResponse.isOk());`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
roabolcommented, Apr 28, 2019

Thank you @pengrad. It worked very well!!!

0reactions
pengradcommented, Jun 25, 2020

Hi @roabol, create new issue please and give as much details as possible

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find valid certification path to requested target in ...
Expand Configurations, then expand server-config, then click JVM Settings. · Click the JVM Options tab, then click Add JVM Option and enter - ......
Read more >
PKIX path building failed error message
The most common reason for this issue is the certificate is provided by an internal Root CA or is a Self-Signed Certificate. This...
Read more >
Solve “unable to find valid certification path to requested target”
This post is about a common error that most java developers would have witnessed in their career. The problem appears with a cryptic...
Read more >
How to resolve PKIX path building failed/unable to find valid ...
Reason: The error due to the system firewall. · Solution: The solution is very simple. · To download the certificate, follow the below...
Read more >
PKIX path building failed - unable to find valid certification ...
The article presents the steps to import required certificates and enable Java application to connect to Azure SQL DB/Managed Instance.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found