B4G: error":"invalid_request","error_description":Missing required parameter: code.
search cancel

B4G: error":"invalid_request","error_description":Missing required parameter: code.

book

Article ID: 231735

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

After setting up the Bridge for Git prereqs and completing the customization of the application yml file,  then execute the setup command in the z/OS V2.3 USS environment :

/usr/lpp/java/J8.0/bin/java -jar -Dfile.encoding=UTF-8 BridgeForGit-2.9.0.jar

Got Application Failed to Start message with the following error: 

 

2021-12-20 12:03:12.172  INFO 16846517 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.48]
2021-12-20 12:03:12.213  INFO 16846517 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-12-20 12:03:12.214  INFO 16846517 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6589 ms
2021-12-20 12:03:12.687 DEBUG 16846517 --- [           main] c.c.e.i.connector.rest.SpringRestClient  : Request: POST https://XXX.XXX.XXX.XX/oauth/token?client_id=****************************************************************&client_secret=****************************************************************&grant_type=authorization_code&redirect_uri=host:8080 (headers=[Content-Type:"application/json", Accept:"application/json"])
2021-12-20 12:03:13.281 ERROR 16846517 --- [           main] c.c.e.i.connector.rest.SpringRestClient  : Request: POST https://XXX.XXX.XXX.XX/oauth/token?client_id=****************************************************************&client_secret=****************************************************************&grant_type=authorization_code&redirect_uri=http://host:8080 (headers=[Content-Type:"application/json", Accept:"application/json"])
2021-12-20 12:03:13.281 ERROR 16846517 --- [           main] c.c.e.i.connector.rest.SpringRestClient  : Response: {"error":"invalid_request","error_description":"Missing required parameter: code."}
2021-12-20 12:03:13.283 DEBUG 16846517 --- [           main] c.c.e.i.connector.rest.SpringRestClient  : 

org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: [{"error":"invalid_request","error_description":"Missing required parameter: code."}]

 

 

 

Environment

Release : 18.1

Component : BRIDGE FOR GIT 2.9.0

Resolution

Upgrade to BRIDGE FOR GIT 2.9.3. 

Also found that port (8080) defined in application.yml for B4G is already in use by the other application,  change the port number in application.yml then restart the B4G application.