# Error while Java Application connectivity for APM server

**URL:** <https://discuss.elastic.co/t/error-while-java-application-connectivity-for-apm-server/298137>\
**Category:** APM\
**Tags:** java\
**Created:** [February 24, 2022, 9:25am UTC](https://discuss.elastic.co/t/error-while-java-application-connectivity-for-apm-server/298137 "2022-02-24T09:25:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smart\_admin1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smart_admin1/32/102266_2.png) [@smart\_admin1](https://discuss.elastic.co/u/smart_admin1)\
**Post date:** [February 24, 2022, 9:25am UTC](https://discuss.elastic.co/t/error-while-java-application-connectivity-for-apm-server/298137/1 "2022-02-24T09:25:14Z")

</div>

co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Event handling failure  
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.ssl.Alert.createSSLException(Unknown Source) ~[?:?]  
at sun.security.ssl.TransportContext.fatal(Unknown Source) ~[?:?]

I am getting this as an error while connected with APM server can you help us to fix this issue

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [February 24, 2022, 4:21pm UTC](https://discuss.elastic.co/t/error-while-java-application-connectivity-for-apm-server/298137/2 "2022-02-24T16:21:43Z")

</div>

Hi @smart_admin1 ,

Can you describe your setup in more detail please ?

- what agent version is used ?
- what is the agent configuration ?
- what is the apm-server configuration ?
- does apm-server is hosted on Elastic cloud or self-hosted ? If self-hosted, do you use self-signed certificates ?

From the part of the stack trace that you provided, this looks like a certificate validation issue on the client (on Java agent side) that is unable to communicate with apm-server, but providing more details would be required for further investigation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2022, 12:22pm UTC](https://discuss.elastic.co/t/error-while-java-application-connectivity-for-apm-server/298137/3 "2022-03-17T12:22:08Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
