Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DF1310CE6 for ; Fri, 22 Nov 2013 22:44:35 +0000 (UTC) Received: (qmail 95071 invoked by uid 500); 22 Nov 2013 22:44:35 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 95039 invoked by uid 500); 22 Nov 2013 22:44:35 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 95030 invoked by uid 99); 22 Nov 2013 22:44:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 22:44:35 +0000 Date: Fri, 22 Nov 2013 22:44:35 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5415) javax.management.RuntimeOperationsException when register performance mbean using cxf webclient with service name contains ? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13830378#comment-13830378 ] Sergey Beryozkin commented on CXF-5415: --------------------------------------- I was reluctant at first to fix it because it is really a WebClient creation bug/limitation (see CXF-5418) or possibly of the custom code that a query may leak into its QName, however just for the sake of avoiding such exceptions it makes sense to escape '?'. Please consider using an absolute path only to uniquely identify a given WebClient. Query is an optional part of the request itself and it will be shown as part of the (JMX) operation property. The same WebClient may have more queries added to it, so it is better to keep them out of the service target identification. WebClient itself won't get queries added to its QName starting from 3.0.0-milestone2. If you use UriInfo then consider using UriInfo.getAbsolutePath to get the queries stripped off. Thanks > javax.management.RuntimeOperationsException when register performance mbean using cxf webclient with service name contains ? > ---------------------------------------------------------------------------------------------------------------------------- > > Key: CXF-5415 > URL: https://issues.apache.org/jira/browse/CXF-5415 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.7.7 > Environment: WIN7 > Salesforce service with Auth2 Bearer authorization > Reporter: Zhangbohong GAO > Labels: escape > > In [CXF-4873] you guys fixed escape {color:red}?{color} problem in OPERATION part. > But in service name, it can still contains a {color:red}?{color} character. > For example, when I try to connect Salesforce with Auth2 bearer authorization, > I got the callback service address QName similar like this: > {code}{https://na7.salesforce.com/id/00DA0000000ajozMAA/005A0000000qeS5IAI?oauth_token=00DA0000000ajoz%21AQ4AQI9IkV9EjnMLiXWUMvYMjQPGexBrTGJSduVIpYx09NI3Rv0rVX5QMQiD_mS7OK6TbMVSzL.451_bRpcwHbhQ9se_fttQ}tRESTClient > {code} > Then below error may appear: > {code} > 2013-11-22 09:57:14,864 | WARN | 1074256089-10261 | ctMessageResponseTimeInterceptor | ctMessageResponseTimeInterceptor 147 | 124 - org.apache.cxf.c > xf-rt-management - 2.7.7 | Create Counter''s ObjectName failed. {0} > javax.management.RuntimeOperationsException > Create Counter''s ObjectName failed. {0} > Caused by: java.lang.IllegalArgumentException: Repository: cannot add mbean for pattern name org.apache.cxf:bus.id=esb_demo.OAuth2SalesforceUserInfo_ContextMap-cxf786212177,type=Performance.Counter.Client,service="https://na7.salesforce.com/id/00DA0000000ajozMAA/005A0000000qeS5IAI?oauth_token=00DA0000000ajoz%21AQ4AQI9IkV9EjnMLiXWUMvYMjQPGexBrTGJSduVIpYx09NI3Rv0rVX5QMQiD_mS7OK6TbMVSzL.451_bRpcwHbhQ9se_fttQ}tRESTClient",port="tRESTClient" > {code} > So the escape {color:red}?{color} should also be fixed on ServiceName when create the Counter''s ObjectName . -- This message was sent by Atlassian JIRA (v6.1#6144)