search cancel

B4G initial start up failure: ClassNotFoundException

book

Article ID: 230577

calendar_today

Updated On:

Products

Endevor Software Change Manager (SCM)

Issue/Introduction

Uploading the BridgeForGit-2.9.0.jar file to z/OS USS,  then start Bridge for Git application using the following command: 

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

And received the following error messages:

Exception in thread "main" 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.NoClassDefFoundError: org.springframework.boot.SpringApplication                           
        at com.ca.endevor.boot.BootloaderApp.main(BootloaderApp.java:21)                                        
        ... 8 more                                                                                              
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication                         
        at java.net.URLClassLoader.findClass(URLClassLoader.java:610)                                           
        at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942)                                          
        at java.lang.ClassLoader.loadClass(ClassLoader.java:887)                                                
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)    
        at java.lang.ClassLoader.loadClass(ClassLoader.java:870)                                                
        ... 9 more            

 

Environment

Release : 18.1

Component : BRIDGE FOR GIT 2.9.0

Resolution

To start B4G in USS, jar file, lib folder, and application.yml all need to reside in USS.  

Application.yml is included in the templates.zip from the Bridge for Git application, customize application.yml before starting up B4G. 

If the lib or application.yml is not in the same folder of the jar file, use

-Dloader.path=<third party libs path>
--spring.config.additional-location=file:/path/to/application.yml 

in B4G initial startup command.