[jboss-user] [JBoss Messaging] - IllegalStateException when invoking MessageProducer.send

mskonda do-not-reply at jboss.com
Wed Aug 2 05:24:33 EDT 2006


I have an inflow mdb which invokes an EJB which publishes the message to a Topic.

When the messageproducer.send(msg) is invoked inside the EJB, the following exception is caused (TRACE turned on):

2006-08-02 10:10:38,574 TRACE [org.jboss.jms.client.container.ClientLogInterceptor] invoking ProducerDelegate[-1].send(null, delegator->JBossMessage[0]:PERSISTENT, -1, -1, 0)
2006-08-02 10:10:38,575 TRACE [org.jboss.jms.client.container.ProducerAspect] Using producer's default delivery mode: 2
2006-08-02 10:10:38,575 TRACE [org.jboss.jms.client.container.ProducerAspect] Using producer's default priority: 4
2006-08-02 10:10:38,575 TRACE [org.jboss.jms.client.container.ProducerAspect] Using producer's default destination: JBossTopic[ldn.cmi2.data.patsSrc.private.bespokeXML]
2006-08-02 10:10:38,575 TRACE [org.jboss.jms.message.MessageIdGenerator] Getting next message id=2670592
2006-08-02 10:10:38,577 TRACE [org.jboss.jms.client.container.ClientLogInterceptor] invoking SessionDelegate[-2147483643].send(JBossMessage[2670592]:PERSISTENT)
2006-08-02 10:10:38,577 TRACE [org.jboss.jms.client.delegate.DelegateSupport] invoking send on server
2006-08-02 10:10:38,577 TRACE [org.jboss.jms.server.remoting.JMSServerInvocationHandler] invoking org.jboss.remoting.InvocationRequest at 1662429
2006-08-02 10:10:38,602 TRACE [org.jboss.jms.server.container.ServerLogInterceptor] invoking SessionAdvised->SessionEndpoint[-2147483643].send(JBossMessage[2670592]:PERSISTENT)
2006-08-02 10:10:38,612 ERROR [org.jboss.jms.client.container.ExceptionInterceptor] Caught RuntimeException
java.lang.IllegalStateException: Unable to resolve MethodInvocation advice org.jboss.jms.server.container.SecurityAspect.handleSend
	at org.jboss.aop.advice.AbstractAdvice.resolveAdvice(AbstractAdvice.java:228)
	at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:125)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
	at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:842)
	at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:82)
	at org.jboss.remoting.Client.invoke(Client.java:610)
	at org.jboss.remoting.Client.invoke(Client.java:602)
	at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:112)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
	at org.jboss.jms.client.container.TransactionAspect.handleSend(TransactionAspect.java:170)
	at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect11.invoke(TransactionAspect11.java)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:134)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
	at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
	at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:237)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
	at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
	at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:134)
	at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
	at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
	at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
	at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
	at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
	at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
	at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
	at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
	at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:208)
	at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
	at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
	at com.mizuho.london.cmi2.common.messaging.ejb.PublisherBean.publish(PublisherBean.java:212)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
	at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
	at org.jboss.ejb.Container.invoke(Container.java:873)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
	at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
	at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
	at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
	at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
	at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
	at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
	at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
	at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
	at $Proxy56.publish(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.mizuho.london.cmi2.common.ejb.RemoteObjectFactory.callMethod(RemoteObjectFactory.java:138)
	at com.mizuho.london.cmi2.common.ejb.RemoteObjectFactory.invoke(RemoteObjectFactory.java:83)
	at com.mizuho.london.cmi2.connectors.socket.source.SocketResourceAdapterMessageBean.invoke(SocketResourceAdapterMessageBean.java:215)
	at com.mizuho.london.cmi2.connectors.socket.source.SocketResourceAdapterMessageBean.processMessage(SocketResourceAdapterMessageBean.java:114)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
	at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
	at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
	at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
	at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
	at org.jboss.ejb.Container.invoke(Container.java:873)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
	at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
	at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
	at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
	at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
	at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
	at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:237)
	at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:117)
	at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
	at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
	at $Proxy59.processMessage(Unknown Source)
	at com.mizuho.london.cmi2.pats.source.PatsSocketWorker.push(PatsSocketWorker.java:142)
	at com.mizuho.london.cmi2.pats.source.PatsSocketWorker.submitStringMessage(PatsSocketWorker.java:122)
	at com.mizuho.london.cmi2.pats.source.PatsSocketWorker.run(PatsSocketWorker.java:103)
	at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:200)
	at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:261)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
	at java.lang.Thread.run(Thread.java:595)
2006-08-02 10:10:38,621 TRACE [org.jboss.jms.client.container.ExceptionInterceptor] Caught JMSException:javax.jms.IllegalStateException: Unable to resolve MethodInvocation advice org.jboss.jms.server.container.SecurityAspect.handleSend

I searched the forum to find the similar exception, but the solution wasn't approriate.

Can any one please look into this?

I am (still) CR2 with SP1
source:

  | public void publish(Message msg) throws Exception
  | 	{
  | 		
  | 		/*
  | 		 * We have to check the incoming message. If the
  | 		 * message is a stringmessage, create a JMS string
  | 		 * message publish it to the destination. If 
  | 		 * the message is a bytes message, create a JMS
  | 		 * bytes messages and send the raw data as is. 
  | 		 */
  | 		
  | 		try
  | 		{
  | 			if (msg instanceof StringMessage)
  | 			{
  | 				_logger.debug("String Message processing");
  | 				
  | 				StringMessage strMsg = (StringMessage) msg;
  | 				
  | 				String type = strMsg.getType();
  | 				
  | 				ObjectMessage jmsObjectMsg = (ObjectMessage)_session.createObjectMessage(strMsg);
  | 				
  | 				jmsObjectMsg.setStringProperty("type",type);
  | 				
  | 				_messageProducer.send(jmsObjectMsg);
  | 				
  | 				
  | 			} 
  | ..
  | }
  | 
  | public void ejbCreate()
  | 	{
  | 		_logger.debug("Publisher bean created");
  | 
  | 		InitialContext ctx = null;
  | 		Destination d = null;
  | 		try
  | 		{
  | 			
  | 			ctx = new InitialContext();
  | 			
  | 			ConnectionFactory f = (ConnectionFactory) ctx
  | 					.lookup(CONNECTION_FACTORY);
  | 			
  | 			d = (Destination) ctx.lookup(ENC_PREFIX + DESTINATION_NAME);
  | 
  | 			Connection conn = (Connection) f.createConnection();
  | 
  | 			_session = (Session) conn.createSession(false,
  | 					Session.AUTO_ACKNOWLEDGE);
  | 			
  | 			_messageProducer = _session.createProducer(d);
  | 			
  | 			_logger.debug("Producer created" + _messageProducer.toString());
  | 
  | 		} catch (Exception e)
  | 		{
  | 			_logger.error("Exception creating bean:" + e.getMessage());
  | 			/*
  | 			 * throw this back to client - let the client handle this
  | 			 */
  | 			throw new EJBException(e);
  | 		}
  | 	}
  | 
Thanks
Madhu

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962395#3962395

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962395



More information about the jboss-user mailing list