java.lang.IllegalStateException: Could not register object [org.kie.scanner.KieRepositoryScannerImpl@65e8dc1a] under bean name 'ks-releaseId#scanner': there is already object [org.kie.scanner.KieRepositoryScannerImpl@1aca633b] bound

Google Groups | 段军卫 | 7 months ago
  1. 0

    java.lang.IllegalStateException: Could not register object [org.kie.scanner.KieRepositoryScannerImpl

    Google Groups | 7 months ago | 段军卫
    java.lang.IllegalStateException: Could not register object [org.kie.scanner.KieRepositoryScannerImpl@65e8dc1a] under bean name 'ks-releaseId#scanner': there is already object [org.kie.scanner.KieRepositoryScannerImpl@1aca633b] bound
  2. 0

    Error in shop-admin-javafx example since 3.0.3.GA upgrade

    Google Groups | 3 years ago | Stephen Ross
    java.lang.IllegalStateException: Could not register object [org.granite.client.tide.spring.SpringEventBus@35b102dd] under bean name 'eventBus': there is already object [org.granite.client.tide.spring.SpringEventBus@35b102dd] bound
  3. 0

    [Thanks to Baruch for his original forum post related to this issue at http://forum.springframework.org/showthread.php?p=185875] Running the following test produces the stack trace below: public class ResourceBundlesBugTests { public @Test void test() { JavaConfigApplicationContext ctx = new JavaConfigApplicationContext(Config1.class, Config2.class); assertThat(ctx.getBean(TestBean.class).getName(), equalTo("foo")); } @ResourceBundles("issues/config1") public static class Config1 { public @Bean Object bar() { return new Object(); } } @ResourceBundles("issues/config2") public static class Config2 { public @Bean TestBean foo() { return new TestBean("foo"); } } } Cause: Line 134 of ConfigurationModelBeanDefinitionReader registers a new singleton named valueSource without checking to see if it already exists. -- Error Log from JUnit -- Class: issues.ResourceBundlesBugTests Method: test Actual: null Expected: null Stack Trace: java.lang.IllegalStateException: Could not register object [org.springframework.config.java.valuesource.MessageSourceValueSource@3d4c49] under bean name 'valueSource': there is already object [org.springframework.config.java.valuesource.MessageSourceValueSource@5b5783] bound at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.registerSingleton(DefaultSingletonBeanRegistry.java:123) at org.springframework.config.java.internal.factory.support.ConfigurationModelBeanDefinitionReader.loadBeanDefinitionsForResourceBundles(ConfigurationModelBeanDefinitionReader.java:137) at org.springframework.config.java.internal.factory.support.ConfigurationModelBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationModelBeanDefinitionReader.java:87) at org.springframework.config.java.internal.factory.support.ConfigurationModelBeanDefinitionReader.loadBeanDefinitions(ConfigurationModelBeanDefinitionReader.java:73) at org.springframework.config.java.internal.factory.support.AbstractJavaConfigBeanDefinitionReader.loadBeanDefinitionsFromModel(AbstractJavaConfigBeanDefinitionReader.java:76) at org.springframework.config.java.internal.factory.support.AbstractJavaConfigBeanDefinitionReader.loadBeanDefinitions(AbstractJavaConfigBeanDefinitionReader.java:54) at org.springframework.config.java.internal.process.InternalConfigurationPostProcessor.parseAnyConfigurationClasses(InternalConfigurationPostProcessor.java:104) at org.springframework.config.java.internal.process.InternalConfigurationPostProcessor.postProcessBeanFactory(InternalConfigurationPostProcessor.java:56) at org.springframework.config.java.context.JavaConfigApplicationContext.invokeBeanFactoryPostProcessors(JavaConfigApplicationContext.java:85) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:363) at org.springframework.config.java.context.JavaConfigApplicationContext.<init>(JavaConfigApplicationContext.java:54) at issues.ResourceBundlesBugTests.__CLR2_3_1zi4lt36cl(ResourceBundlesBugTests.java:15) at issues.ResourceBundlesBugTests.test(ResourceBundlesBugTests.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Spring JIRA | 8 years ago | Chris Beams
    java.lang.IllegalStateException: Could not register object [org.springframework.config.java.valuesource.MessageSourceValueSource@3d4c49] under bean name 'valueSource': there is already object [org.springframework.config.java.valuesource.MessageSourceValueSource@5b5783] bound
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problem with KIE Scanner

    Google Groups | 2 years ago | Zelimir Koljesar
    java.lang.IllegalStateException: Could not register object [org.kie.scanner.KieRepositoryScannerImpl@587c7377] under bean name 'drools-rules-import#scanner': there is already object [org.kie.scanner.KieRepositoryScannerImpl@587c7377] bound
  6. 0

    If spring-boot-autoconfigure source jar is added to classpath along with spring-boot-autoconfigure binary jar, spring-boot sample project fails to start with hard to understand error message: {code} Exception in thread "main" java.lang.IllegalStateException: Could not register object [org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer$AutoConfigurationReportLogger@2fd6b6c7] under bean name 'autoConfigurationReportLogger': there is already object [org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer$AutoConfigurationReportLogger@5bfa9431] bound at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.registerSingleton(DefaultSingletonBeanRegistry.java:129) at org.springframework.beans.factory.support.DefaultListableBeanFactory.registerSingleton(DefaultListableBeanFactory.java:778) at org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer.initialize(AutoConfigurationReportLoggingInitializer.java:60) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:403) at org.springframework.boot.SpringApplication.run(SpringApplication.java:287) at org.springframework.boot.SpringApplication.run(SpringApplication.java:749) at org.springframework.boot.SpringApplication.run(SpringApplication.java:738) at ru.yandex.salmon.SalmonMain.main(SalmonMain.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:491) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) {code} It fails due to the fact that spring.factories of spring-boot-configuration is added twice to the classpath. This problem is easy to detect: if two objects of the same type added to SpringApplication.initializers, then spring-boot should either: * print nice diagnostics message * or just quietly ignore second initializer

    Spring JIRA | 3 years ago | Stepan Koltsov
    java.lang.IllegalStateException: Could not register object [org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer$AutoConfigurationReportLogger@2fd6b6c7] under bean name 'autoConfigurationReportLogger': there is already object [org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer$AutoConfigurationReportLogger@5bfa9431] bound

    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. java.lang.IllegalStateException

      Could not register object [org.kie.scanner.KieRepositoryScannerImpl@65e8dc1a] under bean name 'ks-releaseId#scanner': there is already object [org.kie.scanner.KieRepositoryScannerImpl@1aca633b] bound

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.registerSingleton()
    2. Spring Beans
      DefaultSingletonBeanRegistry.registerSingleton
      1. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.registerSingleton(DefaultSingletonBeanRegistry.java:124)
      1 frame
    3. org.kie.spring
      KieImportFactoryBean.postProcessBeanFactory
      1. org.kie.spring.factorybeans.KieImportFactoryBean.registerKieBases(KieImportFactoryBean.java:129)
      2. org.kie.spring.factorybeans.KieImportFactoryBean.postProcessBeanFactory(KieImportFactoryBean.java:108)
      2 frames
    4. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
      2. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
      3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
      3 frames
    5. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      3 frames
    6. Glassfish Core
      ContainerBase$StartChild.call
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      5. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      5 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      5. java.lang.Thread.run(Thread.java:722)
      5 frames