Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 39317 invoked from network); 7 Dec 2010 22:17:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Dec 2010 22:17:27 -0000 Received: (qmail 74971 invoked by uid 500); 7 Dec 2010 22:17:26 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 74947 invoked by uid 500); 7 Dec 2010 22:17:26 -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 74939 invoked by uid 99); 7 Dec 2010 22:17:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 22:17:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 22:17:24 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oB7MH2W4004299 for ; Tue, 7 Dec 2010 22:17:02 GMT Message-ID: <1433244.1591291760222561.JavaMail.jira@thor> Date: Tue, 7 Dec 2010 17:17:02 -0500 (EST) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Subject: [jira] Assigned: (CXF-3168) Usage of whitespace in @Path regular expressions raises service deployment errors In-Reply-To: <6296114.2811291662551687.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin reassigned CXF-3168: ------------------------------------- Assignee: Sergey Beryozkin > Usage of whitespace in @Path regular expressions raises service deployment errors > --------------------------------------------------------------------------------- > > Key: CXF-3168 > URL: https://issues.apache.org/jira/browse/CXF-3168 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.3.0 > Reporter: Glen Mazza > Assignee: Sergey Beryozkin > Priority: Minor > > See: http://www.corneliadavis.com/blog/index.php/tag/rest-cxf-regex/ > The following regular expression works fine (for an elephant maintenance system at a zoo): > @Path("/{id:\\d+}") > public Person getElephantSubresource(@PathParam("id") int id); > However, placing spaces around the colon delimiter as follows: > @Path("/{id : \\d+}") > public Person getElephantSubresource(@PathParam("id") int id); > ... causes these exceptions to occur at service deployment time: > org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: > PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'serviceBeans' threw exception; nested exception is java.util.regex.PatternSyntaxException: Illegal repetition near index 0 > /{id : \d+}(/.*)? > ^ > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) > at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:22 > .... > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: java.util.regex.PatternSyntaxException: Illegal repetition near index 0 > /{id : \d+}(/.*)? > ^ > at java.util.regex.Pattern.error(Pattern.java:1713) > at java.util.regex.Pattern.closure(Pattern.java:2775) > at java.util.regex.Pattern.sequence(Pattern.java:1889) > at java.util.regex.Pattern.expr(Pattern.java:1752) > at java.util.regex.Pattern.compile(Pattern.java:1460) > at java.util.regex.Pattern.(Pattern.java:1133) > at java.util.regex.Pattern.compile(Pattern.java:823) > at org.apache.cxf.jaxrs.model.URITemplate.(URITemplate.java:89) > at org.apache.cxf.jaxrs.model.URITemplate.createTemplate(URITemplate.java:302) > at org.apache.cxf.jaxrs.model.URITemplate.createTemplate(URITemplate.java:289) > at org.apache.cxf.jaxrs.utils.ResourceUtils.createOperationInfo(ResourceUtils.java:328) > at org.apache.cxf.jaxrs.utils.ResourceUtils.evaluateResourceClass(ResourceUtils.java:204) > The version with spaces is as shown on page 47 of Bill Burke's RESTFul Java with JAX-RS book (O'Reilly). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.