You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "christian ohr (Created) (JIRA)" <ji...@apache.org> on 2012/04/17 15:19:19 UTC

[jira] [Created] (CAMEL-5187) JMX issues on WebSphere

JMX issues on WebSphere
-----------------------

                 Key: CAMEL-5187
                 URL: https://issues.apache.org/jira/browse/CAMEL-5187
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.9.1
         Environment: WebSphere 7
            Reporter: christian ohr
            Priority: Minor


While setting up a Camel web application for WebSphere (7) I encountered two issues

1. Documentation: the Camel JMX docs proposes the following settings for WebSphere:
{code}
<camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" mbeanServerDefaultDomain="WebSphere"/>
{code}

This registers the beans with the PlatformMbeanServer instead of the WebSphere MBean server. The following setup works better:
{code}
<camel:jmxAgent id="agent" createConnector="false" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>
{code}

2. For each Camel route, the same Tracer and DefaultErrorHandler MBeans are tried to be registered over and over again. Because WebSphere changes the ObjectNames on registration, 

{{server.isRegistered(name);}} in {{DefaultManagementAgent#registerMBeanWithServer}} always returns false, which causes the MBean to be re-registered, which again cause Exceptions, e.g.

{code}
14:35:48,198 [WebContainer : 4] [] WARN  - DefaultManagementLifecycleStrategy.onErrorHandlerAdd(485) | Could not register error handler builder: ErrorHandlerBuilderRef[CamelDefaultErrorHandlerBuilder] as ErrorHandler MBean.
javax.management.InstanceAlreadyExistsException: org.apache.camel:cell=wdf-lap-0319Node01Cell,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)",context=wdf-lap-0319/camelContext,type=errorhandlers,node=wdf-lap-0319Node01,process=server1
	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:465)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1496)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:975)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:929)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:494)
	at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:484)
	at org.apache.camel.management.DefaultManagementAgent.registerMBeanWithServer(DefaultManagementAgent.java:320)
	at org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:236)
...
{code}

The web application starts up, but with a lot of exceptions in the log.

Proposal:
Instead of using a Set<ObjectName> for mbeansRegistered, use a Map<ObjectName, ObjectName> where the key is the "Camel" ObjectName and the value is the actually deployed ObjectName.

I will provide a patch that illustrates the idea.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5187) JMX issues on WebSphere

Posted by "christian ohr (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

christian ohr updated CAMEL-5187:
---------------------------------

    Patch Info: Patch Available
    
> JMX issues on WebSphere
> -----------------------
>
>                 Key: CAMEL-5187
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5187
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.1
>         Environment: WebSphere 7
>            Reporter: christian ohr
>            Priority: Minor
>         Attachments: CAMEL-5178.patch
>
>
> While setting up a Camel web application for WebSphere (7) I encountered two issues
> 1. Documentation: the Camel JMX docs proposes the following settings for WebSphere:
> {code}
> <camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> This registers the beans with the PlatformMbeanServer instead of the WebSphere MBean server. The following setup works better:
> {code}
> <camel:jmxAgent id="agent" createConnector="false" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> 2. For each Camel route, the same Tracer and DefaultErrorHandler MBeans are tried to be registered over and over again. Because WebSphere changes the ObjectNames on registration, 
> {{server.isRegistered(name);}} in {{DefaultManagementAgent#registerMBeanWithServer}} always returns false, which causes the MBean to be re-registered, which again cause Exceptions, e.g.
> {code}
> 14:35:48,198 [WebContainer : 4] [] WARN  - DefaultManagementLifecycleStrategy.onErrorHandlerAdd(485) | Could not register error handler builder: ErrorHandlerBuilderRef[CamelDefaultErrorHandlerBuilder] as ErrorHandler MBean.
> javax.management.InstanceAlreadyExistsException: org.apache.camel:cell=wdf-lap-0319Node01Cell,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)",context=wdf-lap-0319/camelContext,type=errorhandlers,node=wdf-lap-0319Node01,process=server1
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:465)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1496)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:975)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:929)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:494)
> 	at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:484)
> 	at org.apache.camel.management.DefaultManagementAgent.registerMBeanWithServer(DefaultManagementAgent.java:320)
> 	at org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:236)
> ...
> {code}
> The web application starts up, but with a lot of exceptions in the log.
> Proposal:
> Instead of using a Set<ObjectName> for mbeansRegistered, use a Map<ObjectName, ObjectName> where the key is the "Camel" ObjectName and the value is the actually deployed ObjectName.
> I will provide a patch that illustrates the idea.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5187) JMX issues on WebSphere

Posted by "christian ohr (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

christian ohr updated CAMEL-5187:
---------------------------------

    Attachment: CAMEL-5178.patch
    
> JMX issues on WebSphere
> -----------------------
>
>                 Key: CAMEL-5187
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5187
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.1
>         Environment: WebSphere 7
>            Reporter: christian ohr
>            Priority: Minor
>         Attachments: CAMEL-5178.patch
>
>
> While setting up a Camel web application for WebSphere (7) I encountered two issues
> 1. Documentation: the Camel JMX docs proposes the following settings for WebSphere:
> {code}
> <camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> This registers the beans with the PlatformMbeanServer instead of the WebSphere MBean server. The following setup works better:
> {code}
> <camel:jmxAgent id="agent" createConnector="false" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> 2. For each Camel route, the same Tracer and DefaultErrorHandler MBeans are tried to be registered over and over again. Because WebSphere changes the ObjectNames on registration, 
> {{server.isRegistered(name);}} in {{DefaultManagementAgent#registerMBeanWithServer}} always returns false, which causes the MBean to be re-registered, which again cause Exceptions, e.g.
> {code}
> 14:35:48,198 [WebContainer : 4] [] WARN  - DefaultManagementLifecycleStrategy.onErrorHandlerAdd(485) | Could not register error handler builder: ErrorHandlerBuilderRef[CamelDefaultErrorHandlerBuilder] as ErrorHandler MBean.
> javax.management.InstanceAlreadyExistsException: org.apache.camel:cell=wdf-lap-0319Node01Cell,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)",context=wdf-lap-0319/camelContext,type=errorhandlers,node=wdf-lap-0319Node01,process=server1
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:465)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1496)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:975)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:929)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:494)
> 	at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:484)
> 	at org.apache.camel.management.DefaultManagementAgent.registerMBeanWithServer(DefaultManagementAgent.java:320)
> 	at org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:236)
> ...
> {code}
> The web application starts up, but with a lot of exceptions in the log.
> Proposal:
> Instead of using a Set<ObjectName> for mbeansRegistered, use a Map<ObjectName, ObjectName> where the key is the "Camel" ObjectName and the value is the actually deployed ObjectName.
> I will provide a patch that illustrates the idea.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5187) JMX issues on WebSphere

Posted by "Claus Ibsen (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-5187:
----------------------------------

    Assignee: Claus Ibsen
    
> JMX issues on WebSphere
> -----------------------
>
>                 Key: CAMEL-5187
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5187
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.1
>         Environment: WebSphere 7
>            Reporter: christian ohr
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: CAMEL-5178.patch
>
>
> While setting up a Camel web application for WebSphere (7) I encountered two issues
> 1. Documentation: the Camel JMX docs proposes the following settings for WebSphere:
> {code}
> <camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> This registers the beans with the PlatformMbeanServer instead of the WebSphere MBean server. The following setup works better:
> {code}
> <camel:jmxAgent id="agent" createConnector="false" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> 2. For each Camel route, the same Tracer and DefaultErrorHandler MBeans are tried to be registered over and over again. Because WebSphere changes the ObjectNames on registration, 
> {{server.isRegistered(name);}} in {{DefaultManagementAgent#registerMBeanWithServer}} always returns false, which causes the MBean to be re-registered, which again cause Exceptions, e.g.
> {code}
> 14:35:48,198 [WebContainer : 4] [] WARN  - DefaultManagementLifecycleStrategy.onErrorHandlerAdd(485) | Could not register error handler builder: ErrorHandlerBuilderRef[CamelDefaultErrorHandlerBuilder] as ErrorHandler MBean.
> javax.management.InstanceAlreadyExistsException: org.apache.camel:cell=wdf-lap-0319Node01Cell,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)",context=wdf-lap-0319/camelContext,type=errorhandlers,node=wdf-lap-0319Node01,process=server1
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:465)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1496)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:975)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:929)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:494)
> 	at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:484)
> 	at org.apache.camel.management.DefaultManagementAgent.registerMBeanWithServer(DefaultManagementAgent.java:320)
> 	at org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:236)
> ...
> {code}
> The web application starts up, but with a lot of exceptions in the log.
> Proposal:
> Instead of using a Set<ObjectName> for mbeansRegistered, use a Map<ObjectName, ObjectName> where the key is the "Camel" ObjectName and the value is the actually deployed ObjectName.
> I will provide a patch that illustrates the idea.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5187) JMX issues on WebSphere

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5187.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10.0
                   2.9.3

Thanks for the patch. I updated the doc as well.
                
> JMX issues on WebSphere
> -----------------------
>
>                 Key: CAMEL-5187
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5187
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.1
>         Environment: WebSphere 7
>            Reporter: christian ohr
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.3, 2.10.0
>
>         Attachments: CAMEL-5178.patch
>
>
> While setting up a Camel web application for WebSphere (7) I encountered two issues
> 1. Documentation: the Camel JMX docs proposes the following settings for WebSphere:
> {code}
> <camel:jmxAgent id="agent" createConnector="true" mbeanObjectDomainName="org.yourname" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> This registers the beans with the PlatformMbeanServer instead of the WebSphere MBean server. The following setup works better:
> {code}
> <camel:jmxAgent id="agent" createConnector="false" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="false" mbeanServerDefaultDomain="WebSphere"/>
> {code}
> 2. For each Camel route, the same Tracer and DefaultErrorHandler MBeans are tried to be registered over and over again. Because WebSphere changes the ObjectNames on registration, 
> {{server.isRegistered(name);}} in {{DefaultManagementAgent#registerMBeanWithServer}} always returns false, which causes the MBean to be re-registered, which again cause Exceptions, e.g.
> {code}
> 14:35:48,198 [WebContainer : 4] [] WARN  - DefaultManagementLifecycleStrategy.onErrorHandlerAdd(485) | Could not register error handler builder: ErrorHandlerBuilderRef[CamelDefaultErrorHandlerBuilder] as ErrorHandler MBean.
> javax.management.InstanceAlreadyExistsException: org.apache.camel:cell=wdf-lap-0319Node01Cell,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)",context=wdf-lap-0319/camelContext,type=errorhandlers,node=wdf-lap-0319Node01,process=server1
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:465)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1496)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:975)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:929)
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:494)
> 	at com.ibm.ws.management.PlatformMBeanServer.registerMBean(PlatformMBeanServer.java:484)
> 	at org.apache.camel.management.DefaultManagementAgent.registerMBeanWithServer(DefaultManagementAgent.java:320)
> 	at org.apache.camel.management.DefaultManagementAgent.register(DefaultManagementAgent.java:236)
> ...
> {code}
> The web application starts up, but with a lot of exceptions in the log.
> Proposal:
> Instead of using a Set<ObjectName> for mbeansRegistered, use a Map<ObjectName, ObjectName> where the key is the "Camel" ObjectName and the value is the actually deployed ObjectName.
> I will provide a patch that illustrates the idea.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira