org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)

Atlassian JIRA | Phil Johnson | 10 months ago
  1. 0

    I've been racking my brain on this issue for several days now. When following the Atlassian Developer Tutorial for using merge-check module: (Via atlassian-plugin-sdk-6.2.2) https://developer.atlassian.com/bitbucket/server/docs/latest/tutorials-and-examples/controlling-when-pull-requests-can-be-merged.html I continually receive the following error: ( Basically the dynamic component injection is not working the way the tutorial hints it should, which is likely due to an underlying Springboot change? ) Either way, I'm going to donate $75 to the cause of choice for anyone who can point me at a resolution. I've had several other people try it out here, and get the same results - so the code is verbatim what the tutorial states. (Oh, i'm using Java8, with atlas-create-bitbucket-plugin rather then: atlas-create-stash-plugin - which is outdated). [INFO] [talledLocalContainer] 2016-02-19 15:58:49,501 ERROR [http-nio-7990-exec-7] admin @OJX1QEx958x1031x5 olqddm 10.35.50.12 "GET /rest/ap i/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" c.a.p.m.PrefixDelegatingModuleFactory Detected an error instantiatin g the module via Spring. This usually means that you haven't created a <component-import> for the interface you're trying to use. https://de veloper.atlassian.com/x/TAEr for more details. [INFO] [talledLocalContainer] 2016-02-19 15:58:49,577 ERROR [http-nio-7990-exec-7] admin @OJX1QEx958x1031x5 olqddm 10.35.50.12 "GET /rest/ap i/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exceptio n while processing REST request: "GET /rest/api/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" [INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.mycompany .bitbucket.merge.checks.IsAdminMergeCheck': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassia n.bitbucket.permission.PermissionService]: : No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionService] found for dep endency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(ResourceFilter.java:59) [httpservice-brid ge-0.6.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:89) [atlas sian-connect-plugin-1.1.65-bitbucket-03.jar:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter .java:88) [StashAuthenticationFilter.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(B eforeLoginPluginAuthenticationFilter.java:109) [BeforeLoginPluginAuthenticationFilter.class:na]

    Atlassian JIRA | 10 months ago | Phil Johnson
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
  2. 0

    I've been racking my brain on this issue for several days now. When following the Atlassian Developer Tutorial for using merge-check module: (Via atlassian-plugin-sdk-6.2.2) https://developer.atlassian.com/bitbucket/server/docs/latest/tutorials-and-examples/controlling-when-pull-requests-can-be-merged.html I continually receive the following error: ( Basically the dynamic component injection is not working the way the tutorial hints it should, which is likely due to an underlying Springboot change? ) Either way, I'm going to donate $75 to the cause of choice for anyone who can point me at a resolution. I've had several other people try it out here, and get the same results - so the code is verbatim what the tutorial states. (Oh, i'm using Java8, with atlas-create-bitbucket-plugin rather then: atlas-create-stash-plugin - which is outdated). [INFO] [talledLocalContainer] 2016-02-19 15:58:49,501 ERROR [http-nio-7990-exec-7] admin @OJX1QEx958x1031x5 olqddm 10.35.50.12 "GET /rest/ap i/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" c.a.p.m.PrefixDelegatingModuleFactory Detected an error instantiatin g the module via Spring. This usually means that you haven't created a <component-import> for the interface you're trying to use. https://de veloper.atlassian.com/x/TAEr for more details. [INFO] [talledLocalContainer] 2016-02-19 15:58:49,577 ERROR [http-nio-7990-exec-7] admin @OJX1QEx958x1031x5 olqddm 10.35.50.12 "GET /rest/ap i/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exceptio n while processing REST request: "GET /rest/api/latest/projects/PROJECT_1/repos/rep_1/pull-requests/1/merge HTTP/1.1" [INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.mycompany .bitbucket.merge.checks.IsAdminMergeCheck': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassia n.bitbucket.permission.PermissionService]: : No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionService] found for dep endency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5 .0.5_1453887622000.jar:na] [INFO] [talledLocalContainer] at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(ResourceFilter.java:59) [httpservice-brid ge-0.6.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:89) [atlas sian-connect-plugin-1.1.65-bitbucket-03.jar:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter .java:88) [StashAuthenticationFilter.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(B eforeLoginPluginAuthenticationFilter.java:109) [BeforeLoginPluginAuthenticationFilter.class:na]

    Atlassian JIRA | 10 months ago | Phil Johnson
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
  3. 0

    After upgrading from commons:1.10.2 and jpa:1.8.2 to the Gosling combo (1.11, 1.9.) I get the following exception in my unit tests: {noformat} org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jpaContext': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Set]: : No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:276) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:278) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1326) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1024) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:276) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:278) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) {noformat} The exception really confuses me because there _is_ an {{EntityManager}} available in the context (at least before Gosling). I confirmed this one more time by adding the following code to the unit test class and then check for not-null in the test: {code:java} @PersistenceContext private EntityManager entityManager; {code} Any ideas how to tackle this?

    Spring JIRA | 1 year ago | Marcel Stör
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jpaContext': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Set]: : No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    After upgrading from commons:1.10.2 and jpa:1.8.2 to the Gosling combo (1.11, 1.9.) I get the following exception in my unit tests: {noformat} org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jpaContext': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Set]: : No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:276) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:278) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1326) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1024) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125) at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109) at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:276) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:278) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) {noformat} The exception really confuses me because there _is_ an {{EntityManager}} available in the context (at least before Gosling). I confirmed this one more time by adding the following code to the unit test class and then check for not-null in the test: {code:java} @PersistenceContext private EntityManager entityManager; {code} Any ideas how to tackle this?

    Spring JIRA | 1 year ago | Marcel Stör
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jpaContext': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Set]: : No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManager] found for dependency [collection of javax.persistence.EntityManager]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  6. 0

    springframework Archives - BlogoSfera

    co.uk | 11 months ago
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userActionController' defined in file [C:\Users\bartlomiej.zuk\workspaceEclipse4\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\examplespringproject\WEB-INF\classes\com\mkyong\web\controller\UserActionController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.mkyong.dao.UserRepository]: : No qualifying bean of type [com.mkyong.dao.UserRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.mkyong.dao.UserRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.beans.factory.NoSuchBeanDefinitionException

      No qualifying bean of type [com.atlassian.bitbucket.permission.PermissionS ervice] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.jav a:749) ~[ConstructorResolver.class:4.2.2.RELEASE] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:39) ~[Cla ssPrefixModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java :100) ~[PrefixDelegatingModuleFactory.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$FastClassBySpringCGLIB$$e05be356.invoke(<gener ated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[MethodProxy.class:4.2.2.RELEAS E] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:93) ~[OsgiS afeProxyProvider$1.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.module.PrefixDelegatingModuleFactory$$EnhancerBySpringCGLIB$$d419edf4.createModule(< generated>) ~[ReflectUtils.class:na] [INFO] [talledLocalContainer] at com.atlassian.bitbucket.scm.pull.MergeRequestCheckModuleDescriptor.getModule(MergeRequestCheckModuleDescr iptor.java:24) ~[MergeRequestCheckModuleDescriptor.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.doCheck(DefaultMergeRequestCheckService .java:70) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCh eckService.java:56) ~[DefaultMergeRequestCheckService.class:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:262) ~[DefaultPullRequestService.class:na] [INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvo cationHandler.java:30) ~[ContextClassLoaderSettingInvocationHandler.class:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker .java:56) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.j ava:60) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceT CCLInterceptor.java:70) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLIntercept or.java:53) ~[na:na] [INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextA dvice.java:57) ~[na:na] [INFO] [talledLocalContainer] at com.atlassian.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:428) ~[bitbu cket-rest-4.3.2.jar:na] [INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)

      at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter()
    2. com.atlassian.applinks
      ContextFilter.doFilter
      1. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
      2. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
      3. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
      4. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26)
      4 frames