Announcement Announcement Module
Collapse
No announcement yet.
RegexpMethodPointcutAdvisor configuration failing in 2.0-rc3 ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RegexpMethodPointcutAdvisor configuration failing in 2.0-rc3 ?

    Below configuration was fine in 2.0-rc2, but gives an error in 2.0-rc3.

    Configuration:
    Code:
      <bean id="advisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
        <property name="advice">
          <ref bean="interceptor" />
        </property>
        <property name="patterns">    
          <list>
            <value>.*save.*</value>
            <value>.*do.*</value>
            <value>.*delete.*</value>
          </list>
        </property>
      </bean>
    The error:
    Code:
    2006-08-17 09:12:47,129 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advisor' defined in class path resource [service.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalArgumentException: 'patterns' cannot be null or empty.
    Caused by:
    java.lang.IllegalArgumentException: 'patterns' cannot be null or empty.
            at org.springframework.util.Assert.notEmpty(Assert.java:214)
            at org.springframework.aop.support.AbstractRegexpMethodPointcut.setPatterns(AbstractRegexpMethodPointcut.java:82)
            at org.springframework.aop.support.RegexpMethodPointcutAdvisor.getPointcut(RegexpMethodPointcutAdvisor.java:150)
            at org.springframework.aop.support.AbstractPointcutAdvisor.toString(AbstractPointcutAdvisor.java:71)
            at java.lang.String.valueOf(String.java:2131)
            at java.lang.StringBuffer.append(StringBuffer.java:370)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)

  • #2
    I created an issue for this

    http://opensource.atlassian.com/proj...rowse/SPR-2441

    Comment


    • #3
      For reference, this has been fixed in the latest nightlies, see the jira ticket.

      Comment

      Working...
      X