Amila, Even though you create a durable subscription what Qpid authorization manger gets is a non-durable subscriptions and hence a different execution path (yet another bug in Qpid? :-(). Only change was the way the queue name is derived and now it is fixed to handle both cases.
Thanks, Danushka On Tue, Feb 1, 2011 at 8:13 PM, Amila Suriarachchi <[email protected]> wrote: > hi, > > I created a topic (myBroker) with the MB ui. Then when I try to subscribes > to the topic in JMS it gives this exception. > > [2011-02-01 20:09:48,625] ERROR {org.apache.qpid.client.AMQConnection} - > Throwable Received but no listener set: org.apache.qpid.AMQException: ch=1 > id=5 ExecutionException(errorCode=UNAUTHORIZED_ACCESS, commandId=8, > description=Cannot subscribe to '1': Permission denied) [error code 403: > access refused] > > > Caused by: org.wso2.carbon.event.core.exception.EBRuntimeException: Can not > subscribe to jms > at > org.wso2.carbon.event.core.internal.delivary.jms.JMSDelivaryManager.subscribe(JMSDelivaryManager.java:101) > at > org.wso2.carbon.event.core.internal.CarbonEventBroker.subscribe(CarbonEventBroker.java:82) > at > org.wso2.carbon.event.ws.internal.receivers.CarbonEventingMessageReceiver.handleSubscribe(CarbonEventingMessageReceiver.java:151) > ... 30 more > Caused by: javax.jms.JMSException: Error registering consumer: > org.apache.qpid.AMQException: timed out waiting for sync: complete = 0, > point = 6 [error code 541: internal error] > at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2012) > at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:1955) > at > org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:286) > at > org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:766) > at > org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102) > at > org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:1953) > at > org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:977) > at > org.apache.qpid.client.AMQSession.createDurableSubscriber(AMQSession.java:1111) > at > org.apache.qpid.client.AMQSession.createDurableSubscriber(AMQSession.java:1026) > at > org.apache.qpid.client.AMQTopicSessionAdaptor.createDurableSubscriber(AMQTopicSessionAdaptor.java:73) > at > org.wso2.carbon.event.core.internal.delivary.jms.JMSDelivaryManager.subscribe(JMSDelivaryManager.java:94) > ... 32 more > Caused by: org.apache.qpid.AMQException: timed out waiting for sync: > complete = 0, point = 6 [error code 541: internal error] > at > org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1003) > at > org.apache.qpid.client.AMQSession_0_10.sync(AMQSession_0_10.java:983) > at > org.apache.qpid.client.AMQSession_0_10.sendQueueBind(AMQSession_0_10.java:365) > at org.apache.qpid.client.AMQSession$2.execute(AMQSession.java:659) > at > org.apache.qpid.client.failover.FailoverNoopSupport.execute(FailoverNoopSupport.java:67) > at org.apache.qpid.client.AMQSession.bindQueue(AMQSession.java:655) > at > org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2816) > at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120) > at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:1989) > ... 42 more > > > But however I have given the necessary permissions and it seems the > following check, returns true as well. > > if (userRealm.getAuthorizationManager().isUserAuthorized( > username, permissionID, > > TreeNode.Permission.SUBSCRIBE.toString().toLowerCase())) { > // Store subscription > RegistryClient.createSubscription(routingKey, > queueName, username, isDurable); > > return Result.ALLOWED; > } > > Can be reproduce by adding a subscription from the subscription menu. > > thanks, > Amila. > > _______________________________________________ > Carbon-dev mailing list > [email protected] > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > >
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
