Samsung / LPVS

License Pre-Validation Service analyzes which open source components and licenses are used in every patch. It returns the list of restricted licenses and the possibility of license violation on the comment with the exact code location and the open source component information.

Home Page:https://samsung.github.io/LPVS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"ApplicationContext" Injection Failure in GitHubWebhooksController

kyudori opened this issue · comments

Describe the bug
main branch LPVS doesn't run.

To Reproduce
Build LPVS Application with Maven and Run it
mvn clean install
cd target/
java -jar lpvs-*.jar

Error logs

root@KyudoriGram:/mnt/c/users/khh53/desktop/lpvs/LPVS_main/target# java -jar lpvs-*.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.7.10)

2023-09-08 15:37:21.636  INFO 512 --- [           main] com.lpvs.LicensePreValidationSystem      : Starting LicensePreValidationSystem v1.1.0 using Java 11.0.19 on KyudoriGram with PID 512 (/mnt/c/users/khh53/desktop/lpvs/LPVS_main/target/lpvs-1.1.0.jar started by root in /mnt/c/users/khh53/desktop/lpvs/LPVS_main/target)
2023-09-08 15:37:21.652  INFO 512 --- [           main] com.lpvs.LicensePreValidationSystem      : No active profile set, falling back to 1 default profile: "default"
2023-09-08 15:37:25.007  INFO 512 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-09-08 15:37:25.258  INFO 512 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 203 ms. Found 5 JPA repository interfaces.
2023-09-08 15:37:27.450  INFO 512 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7896 (http)
2023-09-08 15:37:27.495  INFO 512 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-09-08 15:37:27.496  INFO 512 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
2023-09-08 15:37:27.722  INFO 512 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-09-08 15:37:27.722  INFO 512 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5788 ms
2023-09-08 15:37:28.499  INFO 512 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-09-08 15:37:28.853  INFO 512 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.6.15.Final
2023-09-08 15:37:30.050  INFO 512 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2023-09-08 15:37:30.815  INFO 512 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-09-08 15:37:31.791  INFO 512 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2023-09-08 15:37:31.920  INFO 512 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2023-09-08 15:37:35.181  INFO 512 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-09-08 15:37:35.260  INFO 512 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-09-08 15:37:36.856  INFO 512 --- [           main] com.lpvs.service.LPVSLicenseService      : LICENSES: loaded 5 licenses from DB.
2023-09-08 15:37:36.916  INFO 512 --- [           main] com.lpvs.service.LPVSLicenseService      : LICENSE CONFLICTS: loaded 3 license conflicts from DB.
2023-09-08 15:37:36.920  INFO 512 --- [           main] com.lpvs.service.LPVSDetectService       : License detection scanner: scanoss
2023-09-08 15:37:37.030  WARN 512 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gitHubWebhooksController': Unsatisfied dependency expressed through field 'applicationContext'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.catalina.core.ApplicationContext' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2023-09-08 15:37:37.033  INFO 512 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-09-08 15:37:37.040  INFO 512 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2023-09-08 15:37:37.096  INFO 512 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2023-09-08 15:37:37.099  INFO 512 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-09-08 15:37:37.139  INFO 512 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-09-08 15:37:37.273 ERROR 512 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Field applicationContext in com.lpvs.controller.GitHubWebhooksController required a bean of type 'org.apache.catalina.core.ApplicationContext' that could not be found.

The injection point has the following annotations:
        - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'org.apache.catalina.core.ApplicationContext' in your configuration.

Screenshots
image

Test environment configuration (please complete the following information):

  • Java: 11
  • LPVS Release: 1.1.0

@o-kopysov Can you take a look at this issue?