BFG startup "Validate Bitbucket Server connection error" with EDC5129I
search cancel

BFG startup "Validate Bitbucket Server connection error" with EDC5129I

book

Article ID: 420257

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Endevor Bridge For Git failing to validate connection to Bitbucket server:

*****

 JVMJZBL2007E Stack trace follows:
 java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
     at java.lang.reflect.Method.invoke(Method.java:508)
     at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
     at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
     at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
     at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
 Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframew
 ork.boot.web.server.WebServerException: Unable to start embedded Tomcat
...
 Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'OAuthToJWTFilter' define
 d in URL Ýjar:file:/_PRDS/EBG1/BFG/BridgeForGit-2.15.10.jar!/BOOT-INF/classes!/com/ca/endevor/boot/security/OAuthToJWTFilter.class¨:
  Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.Unsatisfied
 DependencyException: Error creating bean with name 'tokenProvider' defined in URL Ýjar:file:/_PRDS/EBG1/BFG/BridgeForGit-2.15.10.jar
 !/BOOT-INF/classes!/com/ca/endevor/boot/security/TokenProvider.class¨: Unsatisfied dependency expressed through constructor paramete
 r 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with
 name 'app-com.ca.endevor.boot.config.AppProperties': Could not bind properties to 'AppProperties' : prefix=app, ignoreInvalidFields=
 false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind
 properties under 'app' to com.ca.endevor.boot.config.AppProperties

...

APPLICATION FAILED TO START
 ***************************
0Description:
0Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'app' to com.ca.en
 devor.boot.config.AppProperties failed:
0    Reason:
0    Reason: There was an error when trying to start Bridge for Git.
0    Reason: Validate Bitbucket Server connection error: com.ca.endevor.integration.connector.rest.exception.RestConnectorException:
 java.io.FileNotFoundException: not-set (EDC5129I No such file or directory.)
...
 Action:
0Update your application's configuration

*****

Environment

Endevor Bridge For Git

Cause

The bitbucket properties were not configured in the application.yml file and adding them resolved the errors.

During that process encountered syntax error:
*****
23:01:51.792 Ýmain¨ ERROR org.springframework.boot.SpringApplication - Application org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping in 'reader', line 505, column 5:                                               
        url: https://stash.server1.com                                        
        ¬                                                                       
expected <block end>, but found '<block mapping start>' in 'reader', line 522, column 6:                                               
         use-oauth2: true                                                       
         ¬         
*****

Resolution

Support advised that yaml files rely heavily on precise indentation and whitespace for block structures. Suggested to check for 1 extra space in front of "use-oauth2: true". Can run parse test with YAML Lint tool (https://www.yamllint.com/). 
The user was able to resolve the syntax errors.