Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2457

5.3.0 broke a message selector that worked in 5.2.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 5.3.0
    • None
    • Selector
    • None
    • Resource adapter running in JBoss 4.2.2

    Description

      We have a MDB that connects to a topic in a standalone ActiveMQ trough the resource adapter (rar).

      The MDB has following message selector annotation:
      @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "systemCausingEvent = 'pmntgw' AND eventType = 'paymentStatusChange'")

      This has worked fine in ActiveMQ 5.2.0. When I upgraded the RAR to 5.3.0, I'm running into following exception:

      2009-10-19 09:20:46,457 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:ear=rmm-ear-1.19.1-SNAPSHOT.ear,jar=rmm-ejb-1.19.1-SNAPSHOT.jar,name=OrderStatusEventListenerMDB,service=EJB3
      org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='commonmq.rar' messaging-type=javax.jms.MessageListener properties=

      {subscriptionName=ActivationConfigProperty(subscriptionName=RMMOrderStatusEventListenerSubscription), acknowledgeMode=ActivationConfigProperty(acknowledgeMode=Auto-acknowledge), destination=ActivationConfigProperty(destination=EventService.Listener.Topic), messageSelector=ActivationConfigProperty(messageSelector=systemCausingEvent = 'ordermgt' AND eventType = 'orderStatusChange'), clientId=ActivationConfigProperty(clientId=RMMOrderStatusEventListener), destinationType=ActivationConfigProperty(destinationType=javax.jms.Topic), subscriptionDurability=ActivationConfigProperty(subscriptionDurability=Durable)}

      ; - nested throwable: (javax.resource.spi.InvalidPropertyException: Invalid settings: messageSelector not set to valid message selector: null)
      at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:290)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:189)
      at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:190)
      at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:156)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:126)
      ...

      Caused by: javax.resource.spi.InvalidPropertyException: Invalid settings: messageSelector not set to valid message selector: null
      at org.apache.activemq.ra.ActiveMQActivationSpec.validate(ActiveMQActivationSpec.java:136)
      at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:143)
      at org.jboss.resource.deployment.RARDeployment.createActivationSpec(RARDeployment.java:254)
      at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:218)
      at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
      at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:285)
      ... 147 more

      I briefly looked at ActiveMQ source and it seems like SelectorParser.parse(messageSelector) is throwing an exception without a message.
      I don't know JavaCC so this is as far as I got debugging the problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            koivuju Jukka Koivusalo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: