헤호1234
10
2021-10-14 18:07:18
4
102

jenkins 빌드 오류


INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.541 s
[INFO] Finished at: 2021-10-14T17:30:47+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) on project tlsp_web_report: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./" => "java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reportUserDetailsService': Unsatisfied dependency expressed through field 'cmUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cmUserService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
[ERROR]     Caused by: java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reportUserDetailsService': Unsatisfied dependency expressed through field 'cmUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cmUserService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
[ERROR]     Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reportUserDetailsService': Unsatisfied dependency expressed through field 'cmUserService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cmUserService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
[ERROR]     Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cmUserService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
[ERROR]     Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
[ERROR]     Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}"},"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {"Services that were unable to start:" => ["jboss.deployment.unit.\"tlsp_web_report.war\".deploymentCompleteService"],"Services that may be the cause:" => ["jboss.clustering.web.route.default-server","jboss.iiop-openjdk.poa-service.rootpoa","jboss.txn.service.remote","jboss.xts.handlers","org.wildfly.clustering.cache.default-service-provider-registry.ejb","org.wildfly.clustering.cache.default-service-provider-registry.web","org.wildfly.clustering.cache.group.ejb.passivation","org.wildfly.clustering.cache.group.hibernate.entity","org.wildfly.clustering.cache.group.hibernate.local-query","org.wildfly.clustering.cache.group.hibernate.timestamps","org.wildfly.clustering.cache.group.server.client-mappings","org.wildfly.clustering.cache.group.server.default","org.wildfly.clustering.cache.group.web.client-mappings","org.wildfly.clustering.cache.group.web.default-server","org.wildfly.clustering.cache.group.web.passivation","org.wildfly.clustering.cache.registry.ejb.passivation","org.wildfly.clustering.cache.registry.server.default","org.wildfly.clustering.cache.registry.web.passivation","org.wildfly.clustering.cache.registry-entry.ejb.passivation","org.wildfly.clustering.cache.registry-entry.hibernate.entity","org.wildfly.clustering.cache.registry-entry.hibernate.local-query","org.wildfly.clustering.cache.registry-entry.hibernate.timestamps","org.wildfly.clustering.cache.registry-entry.server.client-mappings","org.wildfly.clustering.cache.registry-entry.server.default","org.wildfly.clustering.cache.registry-entry.web.client-mappings","org.wildfly.clustering.cache.registry-entry.web.default-server","org.wildfly.clustering.cache.registry-entry.web.passivation","org.wildfly.clustering.cache.registry-factory.ejb.passivation","org.wildfly.clustering.cache.registry-factory.hibernate.entity","org.wildfly.clustering.cache.registry-factory.hibernate.local-query","org.wildfly.clustering.cache.registry-factory.hibernate.timestamps","org.wildfly.clustering.cache.registry-factory.server.client-mappings","org.wildfly.clustering.cache.registry-factory.server.default","org.wildfly.clustering.cache.registry-factory.web.client-mappings","org.wildfly.clustering.cache.registry-factory.web.default-server","org.wildfly.clustering.cache.registry-factory.web.passivation","org.wildfly.clustering.cache.service-provider-registry.ejb.client-mappings","org.wildfly.clustering.cache.service-provider-registry.ejb.passivation","org.wildfly.clustering.cache.service-provider-registry.hibernate.entity","org.wildfly.clustering.cache.service-provider-registry.hibernate.local-query","org.wildfly.clustering.cache.service-provider-registry.hibernate.timestamps","org.wildfly.clustering.cache.service-provider-registry.server.client-mappings","org.wildfly.clustering.cache.service-provider-registry.server.default","org.wildfly.clustering.cache.service-provider-registry.web.client-mappings","org.wildfly.clustering.cache.service-provider-registry.web.default-server","org.wildfly.clustering.cache.service-provider-registry.web.passivation","org.wildfly.clustering.command-dispatcher-factory.ejb","org.wildfly.clustering.command-dispatcher-factory.hibernate","org.wildfly.clustering.command-dispatcher-factory.local","org.wildfly.clustering.command-dispatcher-factory.server","org.wildfly.clustering.command-dispatcher-factory.web","org.wildfly.clustering.default-command-dispatcher-factory","org.wildfly.clustering.group.hibernate","org.wildfly.clustering.group.server","org.wildfly.clustering.group.web","org.wildfly.clustering.infinispan.cache.ejb.passivation","org.wildfly.clustering.infinispan.cache.hibernate.entity","org.wildfly.clustering.infinispan.cache.hibernate.local-query","org.wildfly.clustering.infinispan.cache.hibernate.timestamps","org.wildfly.clustering.infinispan.cache.server.client-mappings","org.wildfly.clustering.infinispan.cache.server.default","org.wildfly.clustering.infinispan.cache.store.hibernate.entity","org.wildfly.clustering.infinispan.cache.store.hibernate.local-query","org.wildfly.clustering.infinispan.cache.store.hibernate.timestamps","org.wildfly.clustering.infinispan.cache.store.server.default","org.wildfly.clustering.infinispan.cache.store.web.passivation","org.wildfly.clustering.infinispan.cache.web.client-mappings","org.wildfly.clustering.infinispan.cache.web.default-server","org.wildfly.clustering.infinispan.cache.web.passivation","org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity","org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.expiration","org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.locking","org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.memory","org.wildfly.clustering.infinispan.cache-configuration.hibernate.entity.transaction","org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query","org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.expiration","org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.locking","org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.memory","org.wildfly.clustering.infinispan.cache-configuration.hibernate.local-query.transaction","org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps","org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.expiration","org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.locking","org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.memory","org.wildfly.clustering.infinispan.cache-configuration.hibernate.timestamps.transaction","org.wildfly.clustering.infinispan.cache-configuration.server.client-mappings","org.wildfly.clustering.infinispan.cache-configuration.server.default","org.wildfly.clustering.infinispan.cache-configuration.server.default.expiration","org.wildfly.clustering.infinispan.cache-configuration.server.default.locking","org.wildfly.clustering.infinispan.cache-configuration.server.default.memory","org.wildfly.clustering.infinispan.cache-configuration.server.default.transaction","org.wildfly.clustering.infinispan.cache-configuration.web.client-mappings","org.wildfly.clustering.infinispan.cache-configuration.web.default-server","org.wildfly.clustering.infinispan.cache-configuration.web.passivation","org.wildfly.clustering.infinispan.cache-configuration.web.passivation.expiration","org.wildfly.clustering.infinispan.cache-configuration.web.passivation.locking","org.wildfly.clustering.infinispan.cache-configuration.web.passivation.memory","org.wildfly.clustering.infinispan.cache-configuration.web.passivation.transaction","org.wildfly.clustering.infinispan.cache-configuration.web.passivation.write","org.wildfly.clustering.infinispan.cache-container.hibernate","org.wildfly.clustering.infinispan.cache-container.server","org.wildfly.clustering.infinispan.cache-container.web","org.wildfly.clustering.infinispan.cache-container-configuration.hibernate","org.wildfly.clustering.infinispan.cache-container-configuration.hibernate.transport","org.wildfly.clustering.infinispan.cache-container-configuration.server","org.wildfly.clustering.infinispan.cache-container-configuration.server.transport","org.wildfly.clustering.infinispan.cache-container-configuration.web","org.wildfly.clustering.infinispan.cache-container-configuration.web.transport","org.wildfly.clustering.infinispan.default-cache.ejb","org.wildfly.clustering.infinispan.default-cache.web","org.wildfly.clustering.infinispan.default-cache-configuration.server","org.wildfly.clustering.infinispan.default-cache-configuration.web"]}}}}
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
이러한 오류가 나타납니다.. 라이센스 변경을 위한 XML만 조금 변경하였습니다 
오류 이후 다시 원복해서 빌드를 해보아도 똑같은 현상입니다.... 도와주십시요
0
  • 답변 4

  • yeori
    2k
    2021-10-14 21:29:28

    여기서 터진거 같은데요?

    available: expected at least 1 bean
      which qualifies as autowire candidate.
    
    Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}
    [ERROR]    


  • 헤호1234
    10
    2021-10-15 09:19:57
    annotation 은 전부 제대로 되어있는거 같은데 ㅠㅠ 휴... 죽겟습니다
  • lee bon
    50
    2021-10-15 10:28:38


    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRepository': Unsatisfied dependency expressed through field 'sqlSession4'; nested exception is
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=sessionTemplate4)}

    로그로 봐선 DI 과정에서 문제가 생긴것 같네요

    혹시 userRepository 빈이 주입받는 sqlSession이 제대로 컨테이너에 등록되었는지, 등록된 빈을 주입받는건지 확인을 해보셔야 할 것 같습니다.

    Qualifer 관련 로그가 보이는걸 보니 @Qualifier(value="sessionTemplate4")로 정의된 빈이 컨테이너에 등록되지 않았는데 userRepository에서 주입받으려다 예외가 발생한 것 처럼 보입니다.

  • 헤호1234
    10
    2021-10-15 15:46:15

    감사합니다 두분께서 도와주셔서 해결하였습니다.
    context.xml 에 base.datasource 추가 한걸 넣지 않아 발생했던 건이었습니다.

  • 로그인을 하시면 답변을 등록할 수 있습니다.