Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate camel context create event #1356

Closed
tdiesler opened this issue Oct 4, 2016 · 1 comment
Closed

Duplicate camel context create event #1356

tdiesler opened this issue Oct 4, 2016 · 1 comment
Assignees
Labels

Comments

@tdiesler
Copy link
Contributor

tdiesler commented Oct 4, 2016

Relates to #1215

Currently running into this

15:12:48,371 WARN  [org.apache.camel.management.DefaultManagementLifecycleStrategy] (MSC service thread 1-4) This CamelContext(contextG) will be registered using the name: contextG-1 due to clash with an existing name already registered in MBeanServer.
15:12:48,378 WARN  [org.apache.camel.util.EventHelper] (MSC service thread 1-4) Error notifying event Starting CamelContext: contextG. This exception will be ignored. : org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.jboss.camel.context.contextG is already registered
    at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
    at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
    at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
    at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
    at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
    at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
    at org.wildfly.extension.camel.service.CamelContextBindingService.addService(CamelContextBindingService.java:65)
    at org.wildfly.extension.camel.CamelCoreSubsystemExtension.addCamelContext(CamelCoreSubsystemExtension.java:67)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:255)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:252)
    at java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:891)
    at org.wildfly.extension.camel.parser.SubsystemState.processExtensions(SubsystemState.java:95)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl.addCamelContext(CamelContextRegistryService.java:252)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$1.notify(CamelContextRegistryService.java:228)
    at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
    at org.apache.camel.util.EventHelper.notifyCamelContextStarting(EventHelper.java:70)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3084)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920)
    at org.apache.camel.impl.DefaultCamelContext$Proxy$_$$_WeldClientProxy.start(Unknown Source)
    at org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:422)
@tdiesler tdiesler added the bug label Oct 4, 2016
@tdiesler tdiesler added this to the 4.3.0 milestone Oct 4, 2016
@tdiesler tdiesler self-assigned this Oct 4, 2016
@tdiesler
Copy link
Contributor Author

tdiesler commented Oct 4, 2016

Here the trace of the two start events

15:45:59,759 INFO  [org.wildfly.extension.camel] (MSC service thread 1-4) Camel context descriptors found
15:45:59,760 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-4) Apache Camel 2.18.0 (CamelContext: contextG) is starting
15:45:59,761 INFO  [org.apache.camel.management.ManagedManagementStrategy] (MSC service thread 1-4) JMX is enabled
15:45:59,892 ERROR [stderr] (MSC service thread 1-4) java.lang.RuntimeException: EVENT: Starting CamelContext: contextG
15:45:59,893 ERROR [stderr] (MSC service thread 1-4)    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$1.notify(CamelContextRegistryService.java:226)
15:45:59,894 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
15:45:59,894 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.util.EventHelper.notifyCamelContextStarting(EventHelper.java:70)
15:45:59,895 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3084)
15:45:59,896 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182)
15:45:59,897 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
15:45:59,897 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953)
15:45:59,897 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976)
15:45:59,898 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953)
15:45:59,898 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
15:45:59,899 ERROR [stderr] (MSC service thread 1-4)    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920)
15:45:59,899 ERROR [stderr] (MSC service thread 1-4)    at org.wildfly.extension.camel.deployment.CamelContextActivationProcessor.deploy(CamelContextActivationProcessor.java:52)
15:45:59,900 ERROR [stderr] (MSC service thread 1-4)    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
15:45:59,900 ERROR [stderr] (MSC service thread 1-4)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
15:45:59,901 ERROR [stderr] (MSC service thread 1-4)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
15:45:59,901 ERROR [stderr] (MSC service thread 1-4)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
15:45:59,902 ERROR [stderr] (MSC service thread 1-4)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
15:45:59,902 ERROR [stderr] (MSC service thread 1-4)    at java.lang.Thread.run(Thread.java:745)
15:45:59,905 INFO  [org.wildfly.extension.camel] (MSC service thread 1-4) Camel context starting: contextG
15:45:59,905 INFO  [org.wildfly.extension.camel] (MSC service thread 1-1) Bound camel naming object: java:jboss/camel/context/contextG
15:46:00,466 INFO  [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-4) Loaded 302 type converters
15:46:00,495 INFO  [org.apache.camel.impl.DefaultRuntimeEndpointRegistry] (MSC service thread 1-4) Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
15:46:00,569 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-4) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
15:46:00,611 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-4) Route: route1 started and consuming from: direct://start
15:46:00,612 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-4) Total 1 routes, of which 1 are started.
15:46:00,615 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-4) Apache Camel 2.18.0 (CamelContext: contextG) started in 0.853 seconds
15:46:00,624 INFO  [org.jboss.as.arquillian] (MSC service thread 1-8) Arquillian deployment detected: ArquillianConfig[service=jboss.arquillian.config."adf3ef0a-e878-415c-9764-0549000b5a6a.jar",unit=adf3ef0a-e878-415c-9764-0549000b5a6a.jar,tests=[org.wildfly.camel.test.cdi.CDISpringContextInjectionTest]]
15:46:00,968 INFO  [org.jboss.weld.Event] (MSC service thread 1-7) WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType<?>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
15:46:01,948 WARN  [org.jboss.as.weld] (MSC service thread 1-7) WFLYWELD0052: Using deployment classloader to load proxy classes for module org.apache.camel.core:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.weld.spi]
15:46:02,145 INFO  [org.wildfly.extension.camel] (MSC service thread 1-7) Camel context descriptors found
15:46:02,164 INFO  [org.apache.camel.cdi.CdiCamelExtension] (MSC service thread 1-7) Camel CDI is starting Camel context [contextG]
15:46:02,166 INFO  [org.apache.camel.impl.DefaultCamelContext] (MSC service thread 1-7) Apache Camel 2.18.0 (CamelContext: contextG) is starting
15:46:02,166 INFO  [org.apache.camel.management.ManagedManagementStrategy] (MSC service thread 1-7) JMX is enabled
15:46:02,176 WARN  [org.apache.camel.management.DefaultManagementLifecycleStrategy] (MSC service thread 1-7) This CamelContext(contextG) will be registered using the name: contextG-1 due to clash with an existing name already registered in MBeanServer.
15:46:02,190 ERROR [stderr] (MSC service thread 1-7) java.lang.RuntimeException: EVENT: Starting CamelContext: contextG
15:46:02,190 ERROR [stderr] (MSC service thread 1-7)    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$1.notify(CamelContextRegistryService.java:226)
15:46:02,191 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
15:46:02,191 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.util.EventHelper.notifyCamelContextStarting(EventHelper.java:70)
15:46:02,191 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3084)
15:46:02,191 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182)
15:46:02,192 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
15:46:02,192 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953)
15:46:02,192 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976)
15:46:02,192 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953)
15:46:02,198 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
15:46:02,199 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920)
15:46:02,200 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.impl.DefaultCamelContext$Proxy$_$$_WeldClientProxy.start(Unknown Source)
15:46:02,200 ERROR [stderr] (MSC service thread 1-7)    at org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:422)
15:46:02,200 ERROR [stderr] (MSC service thread 1-7)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:46:02,200 ERROR [stderr] (MSC service thread 1-7)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:46:02,201 ERROR [stderr] (MSC service thread 1-7)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:46:02,201 ERROR [stderr] (MSC service thread 1-7)    at java.lang.reflect.Method.invoke(Method.java:498)
15:46:02,201 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
15:46:02,201 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:144)
15:46:02,202 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:313)
15:46:02,202 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:125)
15:46:02,202 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:291)
15:46:02,203 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:269)
15:46:02,203 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:302)
15:46:02,203 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:291)
15:46:02,203 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:160)
15:46:02,204 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:154)
15:46:02,204 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
15:46:02,204 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35)
15:46:02,204 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
15:46:02,205 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:449)
15:46:02,205 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
15:46:02,205 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:96)
15:46:02,206 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
15:46:02,206 ERROR [stderr] (MSC service thread 1-7)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
15:46:02,206 ERROR [stderr] (MSC service thread 1-7)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
15:46:02,207 ERROR [stderr] (MSC service thread 1-7)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
15:46:02,207 ERROR [stderr] (MSC service thread 1-7)    at java.lang.Thread.run(Thread.java:745)
15:46:02,209 WARN  [org.apache.camel.util.EventHelper] (MSC service thread 1-7) Error notifying event Starting CamelContext: contextG. This exception will be ignored. : org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.jboss.camel.context.contextG is already registered
    at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
    at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
    at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
    at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
    at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
    at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
    at org.wildfly.extension.camel.service.CamelContextBindingService.addService(CamelContextBindingService.java:65)
    at org.wildfly.extension.camel.CamelCoreSubsystemExtension.addCamelContext(CamelCoreSubsystemExtension.java:67)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:258)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$2.accept(CamelContextRegistryService.java:255)
    at java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:891)
    at org.wildfly.extension.camel.parser.SubsystemState.processExtensions(SubsystemState.java:95)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl.addCamelContext(CamelContextRegistryService.java:255)
    at org.wildfly.extension.camel.service.CamelContextRegistryService$CamelContextRegistryImpl$1.notify(CamelContextRegistryService.java:230)
    at org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
    at org.apache.camel.util.EventHelper.notifyCamelContextStarting(EventHelper.java:70)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3084)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920)
    at org.apache.camel.impl.DefaultCamelContext$Proxy$_$$_WeldClientProxy.start(Unknown Source)
    at org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:422)

@tdiesler tdiesler removed this from the 4.3.0 milestone Oct 4, 2016
@tdiesler tdiesler added invalid and removed bug labels Oct 4, 2016
@tdiesler tdiesler closed this as completed Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant