Problem : unable to find valid certification path to requested target

4,812 views
Skip to first unread message

Phil

unread,
Jul 26, 2010, 6:02:14 AM7/26/10
to Google App Engine
Hello,

I've created the example code 'guestbook'. However, when I upload the
program, I receive this error :

com.google.appengine.tools.admin.AdminException: Unable to update app:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
62)

I use the OS linux (Ubuntu).

What could be the problem?

Many thanks

Phil

unread,
Jul 27, 2010, 3:30:41 AM7/27/10
to Google App Engine
I've found my problem. I needed to add the certificate of Google into
my cacerts of java.

Thanks

Sandeep Niduvali

unread,
Sep 29, 2015, 8:21:02 AM9/29/15
to Google App Engine
Hi I followed the below steps which I got from a different site and I could not yet resolve the same issue.
Would you plz share me the steps you followed to resolve the issue.

Steps to import Google' SSL certifcate 
============================= 

(1) Visit https://appengine.google.com/ using your browser (I tried 
this using IE6 but I am sure other browsers will have a similar 
functionality). 

(2) Click the "Lock" icon at the status bar. You will see Certificate 
dialog. Click "Details" tab. 

(3) Click "Copy to" button and follow the wizard. Select "DER 
encoded.." on the Export File Format page. Click "Next" 

(4) Browse to some folder, give it a name and click "Save". Example: c: 
\dev\keystore\google.cer 

(5) Run the below command from your JRE/BIN folder. Make sure you 
adjust the locations of -keystore and -file in the below command. 

keytool -import -keystore C:\programs\Java\jre6\lib\security\cacerts - 
file c:\dev\keystore\google.cer 

(7) Try Deploy again. If your Deploy tool is using the same JRE where 
you imported the google SSL certificate in above steps, you should be 
fine now. 
----------------------

Patrice (Cloud Platform Support)

unread,
Sep 29, 2015, 12:22:45 PM9/29/15
to Google App Engine
Hi Sandeep,

According to the second message on this thread, I believe that what he did was add the certificate to his cacerts folder, which you seem to be doing in your step 6.

Can you link to the site where you found these in case I need to investigate further?

Thanks

Sandeep Niduvali

unread,
Sep 30, 2015, 2:52:45 AM9/30/15
to Google App Engine
Hi Patrice,

Yes I add the SSL Certificate of the site:https://appengine.google.com/ into my 'cacerts'.
I got the steps from a google group and the link is https://groups.google.com/forum/#!topic/google-appengine-java/t-WM-J4T168

My dev environment details are:

OS: Windows 7
JDK and JRE: 1.7.0

I am copying the log from my command prompt. Plz help me to resolve the issue. I have been stuck with the issue for last one week and I cannot proceed due to the issue.

----------------------------------------------------------------------
C:\GAE\guestbook>C:\GAE\guestbook>mvn appengine:update -DproxySet=true -DproxyHo
st=gateway.zscaler.net -DproxyPort=9400 -Djava.home="C:\Program Files\Java\jdk1.
7.0\jre" -Dserver="appengine.google.com" -Dsdk_root="C:\Program Files\Google\app
engine-java-sdk-1.9.26"
'C:\GAE\guestbook' is not recognized as an internal or external command,
operable program or batch file.

C:\GAE\guestbook>mvn appengine:update -DproxySet=true -DproxyHost=gateway.zscale
r.net -DproxyPort=9400 -Djava.home="C:\Program Files\Java\jdk1.7.0\jre" -Dserver
="appengine.google.com" -Dsdk_root="C:\Program Files\Google\appengine-java-sdk-1
.9.26"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building guestbook 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> appengine-maven-plugin:1.9.26:update (default-cli) > package @ guestb
ook >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ guestbook
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\GAE\guestbook\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ guestbook ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- versions-maven-plugin:2.2:display-dependency-updates (default) @ gues
tbook ---
[INFO] artifact javax.servlet:servlet-api: checking for updates from central
[INFO] artifact com.googlecode.objectify:objectify: checking for updates from ce
ntral
[INFO] artifact com.google.appengine:appengine-testing: checking for updates fro
m central
[INFO] artifact com.google.appengine:appengine-api-1.0-sdk: checking for updates
 from central
[INFO] artifact com.google.appengine:appengine-api-stubs: checking for updates f
rom central
[INFO] artifact jstl:jstl: checking for updates from central
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   com.google.appengine:appengine-api-1.0-sdk .......... 1.9.26 -> 1.9.27
[INFO]   com.google.appengine:appengine-api-stubs ............ 1.9.26 -> 1.9.27
[INFO]   com.google.appengine:appengine-testing .............. 1.9.26 -> 1.9.27
[INFO]   com.googlecode.objectify:objectify .................... 4.0.1 -> 5.1.8
[INFO]   javax.servlet:servlet-api ......................... 2.5 -> 3.0-alpha-1
[INFO]
[INFO]
[INFO] --- versions-maven-plugin:2.2:display-plugin-updates (default) @ guestboo
k ---
[INFO]
[INFO] All plugins with a version specified are using the latest versions.
[INFO]
[WARNING] The following plugins do not have their version specified:
[WARNING]   maven-clean-plugin .......................... (from super-pom) 2.5
[WARNING]   maven-deploy-plugin ......................... (from super-pom) 2.7
[WARNING]   maven-install-plugin ........................ (from super-pom) 2.4
[WARNING]   maven-resources-plugin ...................... (from super-pom) 2.6
[WARNING]   maven-site-plugin ........................... (from super-pom) 3.3
[WARNING]   maven-surefire-plugin .................... (from super-pom) 2.12.4
[INFO]
[INFO] Project defines minimum Maven version as: 3.1.0
[INFO] Plugins require minimum Maven version of: 3.1.0
[INFO] Note: the super-pom from Maven 3.3.3 defines some of the plugin
[INFO]       versions and may be influencing the plugins required minimum Maven
[INFO]       version.
[INFO]
[INFO] No plugins require a newer version of Maven than specified by the pom.
[INFO]
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ gu
estbook ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\GAE\guestbook\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ guestbo
ok ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ guestbook ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ guestbook ---
[INFO] Packaging webapp
[INFO] Assembling webapp [guestbook] in [C:\GAE\guestbook\target\guestbook-1.0-S
NAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [C:\GAE\guestbook/src/main/webapp/WEB-INF] to
 [C:\GAE\guestbook\target\guestbook-1.0-SNAPSHOT]
[INFO] Copying webapp resources [C:\GAE\guestbook\src\main\webapp]
[INFO] Webapp assembled in [309 msecs]
[INFO] Building war: C:\GAE\guestbook\target\guestbook-1.0-SNAPSHOT.war
[INFO]
[INFO] <<< appengine-maven-plugin:1.9.26:update (default-cli) < package @ guestb
ook <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.9.26:update (default-cli) @ guestbook ---
[INFO]
[INFO] Google App Engine Java SDK - Updating Application
[INFO]
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] Updating Google App Engine Application
[INFO] Running -V 1 --oauth2 update C:\GAE\guestbook\target/guestbook-1.0-SNAPSH
OT
********************************************************
The API version in this SDK is no longer supported on the server!
-----------
Latest SDK:
Release: 1.9.27
Timestamp: Tue Aug 18 23:58:24 IST 2015
API versions: [1]

-----------
Your SDK:
Release: 1.9.26
Timestamp: Thu Aug 13 00:00:50 IST 2015
API versions: [1.0]

-----------
K.
********************************************************
Please enter code: 4/fBCCF5GJKBd12qQPpjOKtJBoL_YrzBLFU8TZKha9Szk
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExce
ption: unable to find valid certification path to requested target

C:\GAE\guestbook>
----------------------------------------------------------------------

Patrice (Cloud Platform Support)

unread,
Sep 30, 2015, 10:26:10 AM9/30/15
to Google App Engine
Hi again Sandeep. 

I just tried to remove the cert from my JRE/LIB/SECURITY folder and it stopped working. Simply adding it back from Appengine.google.com works fine, so I'm a bit stumped into what's happening here.

I've tried to look around and found this which, even if a bit dated, may help you here.

In general though, even if it's not necessarily fun to do, I believe there could be an issue with your JRE or Java SDK where it doesn't pick up the right cacerts. I remember for a project I once had both 1.6 and 1.7 and the 1.7 would not pick up its own cacerts. Maybe a fresh reinstall of everything will fix the issue? (even if painful)

Cheers

Sandeep Niduvali

unread,
Oct 1, 2015, 4:41:18 AM10/1/15
to Google App Engine
Hi Patrice,

I uninstalled my JDK 7 and installed it again and then imported the SSL certificate of from Appengine.google.com
Still the same issue occurs while deploying application to appengine :(

any other thoughts?

Thanks,
Sandeep

Patrice (Cloud Platform Support)

unread,
Oct 1, 2015, 10:54:02 AM10/1/15
to Google App Engine
Hi again,

I did some searching around and it could be a firewall that's blocking this, or some network configuration. I saw a customer reporting that Kaspersky Internet Security 2015's "web anti-virus" module was blocking his deployments.

Maybe you have something similar holding you up?

Cheers

Priya Jain

unread,
Jun 10, 2020, 10:49:02 AM6/10/20
to Google App Engine
Hi,

I have having the same issue with DialogFlow. It seems to work fine on my personal network but when I execute with  company network I am getting the exception that says it is caused by io.grpc.StatusRuntimeException, javax.net.ssl.SSLHandshakeException, sun.security.validator.ValidatorException, and sun.security.provider.certpath.SunCertPathBuilderException.

Could you pleas let me know how and from where you have downloaded the certificate?.


On Tuesday, July 27, 2010 at 1:00:41 PM UTC+5:30, Phil wrote:
Reply all
Reply to author
Forward
0 new messages