Failed to Upload Analytics: java.lang.IllegalStateException: Failed to execute CommandLineRunner

When trying to upload report analytics through CLI interface I am receiving the error message below and no longer able to upload reports to Katalon Analytics. It has been working just fine for the past few weeks.

    + java -jar katalon-report-uploader-0.0.3.jar --kit.server.api=http://analytics.katalon.com --projectId=xxxx --path=/var/lib/jenkins/workspace/xxxxx/katalon/report --email=xxxxxx --password=xxxxx --type=katalon
2019-04-29 12:44:43.158  INFO 1620 --- [           main] c.k.k.r.uploader.UploaderApplication     : Starting UploaderApplication v0.0.3 on df4090f506f5 with PID 1620 (/var/lib/jenkins/workspace/xxx/Dev/katalon-report-uploader-0.0.3.jar started by root in /var/lib/jenkins/workspace/xxx/Dev)
2019-04-29 12:44:43.172 DEBUG 1620 --- [           main] c.k.k.r.uploader.UploaderApplication     : Running with Spring Boot v1.5.3.RELEASE, Spring v4.3.7.RELEASE
2019-04-29 12:44:43.172  INFO 1620 --- [           main] c.k.k.r.uploader.UploaderApplication     : No active profile set, falling back to default profiles: default
2019-04-29 12:44:43.257  INFO 1620 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@69663380: startup date [Mon Apr 29 12:44:43 UTC 2019]; root of context hierarchy
2019-04-29 12:44:44.191  INFO 1620 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-04-29 12:44:44.433 DEBUG 1620 --- [           main] c.k.k.report.uploader.helper.HttpHelper  : Request: POST https://analytics.katalon.com/oauth/token HTTP/1.1
2019-04-29 12:44:44.881 DEBUG 1620 --- [           main] c.k.k.report.uploader.helper.HttpHelper  : Response: HttpResponseProxy{HTTP/1.1 200  [Date: Mon, 29 Apr 2019 12:44:44 GMT, Content-Type: application/json;charset=UTF-8, Connection: keep-alive, Server: Apache/2.4.38 (Amazon) OpenSSL/1.0.2k-fips, X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, Strict-Transport-Security: max-age=31536000 ; includeSubDomains, X-Frame-Options: DENY, X-Application-Context: application:fixed,production,listener:8080, Set-Cookie: kan_remember_me=false; Path=/; HttpOnly, Set-Cookie: kan_access_token=04468d77-bdc4-4922-aebc-b4aab50c3527; Path=/; HttpOnly, Set-Cookie: kan_refresh_token=1b7a313c-dcae-4be1-a009-175622c01d94; Path=/; HttpOnly, Set-Cookie: kan_expiry=1556973883869; Path=/, Vary: Accept-Encoding] org.apache.http.client.entity.DecompressingEntity@343f4d3d}
2019-04-29 12:44:44.924  INFO 1620 --- [           main] c.k.k.r.uploader.service.UploadService   : Uploading log files in folder path: /var/lib/jenkins/workspace/OWH-Docker/katalon/report
2019-04-29 12:44:44.925  INFO 1620 --- [           main] c.k.k.report.uploader.helper.FileHelper  : Looking for log files
2019-04-29 12:44:44.929  INFO 1620 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-04-29 12:44:44.937 ERROR 1620 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.IllegalStateException: Failed to execute CommandLineRunner
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:779) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:760) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:747) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	at com.katalon.kit.report.uploader.UploaderApplication.main(UploaderApplication.java:16) [classes!/:0.0.3]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [katalon-report-uploader-0.0.3.jar:0.0.3]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [katalon-report-uploader-0.0.3.jar:0.0.3]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [katalon-report-uploader-0.0.3.jar:0.0.3]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [katalon-report-uploader-0.0.3.jar:0.0.3]
Caused by: java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/xxx/katalon/report
	at com.katalon.kit.report.uploader.helper.ExceptionHelper.wrap(ExceptionHelper.java:9) ~[classes!/:0.0.3]
	at com.katalon.kit.report.uploader.helper.FileHelper.scanFiles(FileHelper.java:52) ~[classes!/:0.0.3]
	at com.katalon.kit.report.uploader.service.UploadService.perform(UploadService.java:71) ~[classes!/:0.0.3]
	at com.katalon.kit.report.uploader.service.UploadService.upload(UploadService.java:63) ~[classes!/:0.0.3]
	at com.katalon.kit.report.uploader.UploaderApplication.run(UploaderApplication.java:21) [classes!/:0.0.3]
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:776) [spring-boot-1.5.3.RELEASE.jar!/:1.5.3.RELEASE]
	... 14 common frames omitted
Caused by: java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/xxxx/katalon/report
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_191]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_191]
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_191]
	at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[na:1.8.0_191]
	at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) ~[na:1.8.0_191]
	at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[na:1.8.0_191]
	at java.nio.file.Files.readAttributes(Files.java:1737) ~[na:1.8.0_191]
	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219) ~[na:1.8.0_191]
	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276) ~[na:1.8.0_191]
	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322) ~[na:1.8.0_191]
	at java.nio.file.Files.walkFileTree(Files.java:2662) ~[na:1.8.0_191]
	at java.nio.file.Files.walkFileTree(Files.java:2742) ~[na:1.8.0_191]
	at com.katalon.kit.report.uploader.helper.FileHelper.scanFiles(FileHelper.java:38) ~[classes!/:0.0.3]

Facing same issue on my machine. Is there any workaround or solution ?

Hi there,

I’m sorry for the late reply. Based on this java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/xxxx/katalon/report, we can see there’s no report folder to be found. Please double-check and make sure that the report uploader has permission to access the report folder.

Hope it helps!

Jass

1 Like