B4G: Logback configuration error detected
search cancel

B4G: Logback configuration error detected

book

Article ID: 280096

calendar_today

Updated On: 03-04-2024

Products

Endevor

Issue/Introduction

Endevor Bridge for Git failed to start with the following error:

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: java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.util.PropertySetter@91f97f95 - Failed to invoke valueOf{} method in class [ch.qos.logback.core.ut
il.FileSize] with value [maxFileSize_IS_UNDEFINED]
ERROR in ch.qos.logback.core.joran.util.PropertySetter@4dbe619b - Failed to invoke valueOf{} method in class [ch.qos.logback.core.ut
il.FileSize] with value [totalSizeCap_IS_UNDEFINED]

Environment

Endevor V19

B4G 2.14.3

Cause

Application.yaml has the default logging setting

  logging:
    # Logging level of the application
    git-bridge-level: INFO

However, JVM loader path has the wrong setting: 

IJO="$IJO -Dloader.path=/path/to/bfg_home"    << this is  USS dir where B4G is placed, parent dir of LIB 

The incorrect loader path is causing B4G unable to find the Java logger. 

Resolution

Update the JVM options and set

IJO="$IJO -Dloader.path=/path/to/bfg_home/lib"

Or remove the  -Dloader.path from the JVM options, this will allow B4G to load from the default path, which is $PWD/lib, where PWD is set to the USS directory where BridgeForGit is placed (/path/to/bfg_home)