Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7497565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:08:40+00:00 2026-05-29T19:08:40+00:00

I have a Java client trying to access a server with a self-signed certificate.

  • 0

I have a Java client trying to access a server with a self-signed certificate.

When I try to Post to the server, I get the following error:

unable to find valid certification path to requested target

Having done some research on the issue, I then did the following.

  1. Saved my servers domain name as a root.cer file.

  2. In my Glassfish server’s JRE, I ran this:

    keytool -import -alias example -keystore cacerts -file root.cer
    
  3. To check the cert was added to my cacert successfully, I did this:

    keytool -list -v -keystore cacerts
    

    I can see the cert is present.

  4. I then restarted Glassfish and retried the ‘post’.

I am still getting the same error.

I have a feeling this is because my Glassfish is not actually reading the cacert file that I have amended but maybe some other one.

Have any of you had this issue and can push me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:08:42+00:00Added an answer on May 29, 2026 at 7:08 pm

    Unfortunately – it could be many things – and lots of app servers and other java ‘wrappers’ are prone to play with properties and their ‘own’ take on keychains and what not. So it may be looking at something totally different.

    Short of truss-ing – I’d try:

    java -Djavax.net.debug=all -Djavax.net.ssl.trustStore=trustStore ...
    

    to see if that helps. Instead of ‘all’ one can also set it to ‘ssl’, key manager and trust manager – which may help in your case. Setting it to ‘help’ will list something like below on most platforms.

    Regardless – do make sure you fully understand the difference between the keystore (in which you have the private key and cert you prove your own identity with) and the trust store (which determines who you trust) – and the fact that your own identity also has a ‘chain’ of trust to the root – which is separate from any chain to a root you need to figure out ‘who’ you trust.

    all            turn on all debugging
    ssl            turn on ssl debugging
    
    The   following can be used with ssl:
        record       enable per-record tracing
        handshake    print each handshake message
        keygen       print key generation data
        session      print session activity
        defaultctx   print default SSL initialization
        sslctx       print SSLContext tracing
        sessioncache print session cache tracing
        keymanager   print key manager tracing
        trustmanager print trust manager tracing
        pluggability print pluggability tracing
    
        handshake debugging can be widened with:
        data         hex dump of each handshake message
        verbose      verbose handshake message printing
    
        record debugging can be widened with:
        plaintext    hex dump of record plaintext
        packet       print raw SSL/TLS packets
    

    Source: # See http://download.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#Debug

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a java server app and am trying to get my android
I am trying to get remote debugging working with Java on Solaris OS. Following
I have the following Java socket client app, that sends same string to socket
I have a bugzilla server which i am trying to access through the rest
I have a lovely little Java client that sends signed email messages. We have
I have a Java client that calls a web service at the moment using
I have a java client program that uses mdns with service discovery to find
I have Java and Flash client applications. What is the best way for the
I have a Java web service and a Java web client making use of
I have a JSF web client and a Java client that both use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.