context.lookup() can return null
--------------------------------
Key: JBESB-1484
URL:
http://jira.jboss.com/jira/browse/JBESB-1484
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Rosetta
Affects Versions: 4.2.1
Environment: SOA-P 4.2.0.beta1, Oracle DB
Reporter: Martin Vecera
I get the following bug in NotifyQueues:
2008-01-15 15:57:44,285 ERROR [STDERR] java.lang.reflect.InvocationTargetException
2008-01-15 15:57:44,286 ERROR [STDERR] at
sun.reflect.GeneratedConstructorAccessor164.newInstance(Unknown Source)
2008-01-15 15:57:44,286 ERROR [STDERR] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
2008-01-15 15:57:44,286 ERROR [STDERR] at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
2008-01-15 15:57:44,286 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:144)
2008-01-15 15:57:44,286 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
2008-01-15 15:57:44,286 ERROR [STDERR] at
org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
2008-01-15 15:57:44,287 ERROR [STDERR] at
sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
2008-01-15 15:57:44,287 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-01-15 15:57:44,287 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:585)
2008-01-15 15:57:44,287 ERROR [STDERR] at
org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
2008-01-15 15:57:44,287 ERROR [STDERR] at
org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
2008-01-15 15:57:44,287 ERROR [STDERR] at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
2008-01-15 15:57:44,287 ERROR [STDERR] at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
2008-01-15 15:57:44,287 ERROR [STDERR] at
org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:156)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
2008-01-15 15:57:44,288 ERROR [STDERR] at
sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
2008-01-15 15:57:44,288 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-01-15 15:57:44,288 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:585)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:242)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:145)
2008-01-15 15:57:44,288 ERROR [STDERR] at $Proxy78.onMessage(Unknown Source)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:802)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
2008-01-15 15:57:44,288 ERROR [STDERR] at
org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
2008-01-15 15:57:44,288 ERROR [STDERR] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
2008-01-15 15:57:44,288 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
2008-01-15 15:57:44,289 ERROR [STDERR] Caused by: java.lang.NullPointerException
2008-01-15 15:57:44,289 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotifyQueues.createProducer(NotifyQueues.java:112)
2008-01-15 15:57:44,289 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotifyJMS.setUpProducers(NotifyJMS.java:407)
2008-01-15 15:57:44,289 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotifyQueues.setQueues(NotifyQueues.java:79)
2008-01-15 15:57:44,289 ERROR [STDERR] at
org.jboss.soa.esb.notification.NotifyQueues.<init>(NotifyQueues.java:74)
2008-01-15 15:57:44,289 ERROR [STDERR] ... 37 more
2008-01-15 15:57:44,291 ERROR [org.jboss.soa.esb.notification.NotificationList] Can't
instantiate target <target class="NotifyQueues">
<queue
jndiName="queue/A"/>
</target>
org.jboss.soa.esb.ConfigurationException: NotifyQueues does not extend
NotificationTarget
at
org.jboss.soa.esb.notification.NotificationTarget.fromParams(NotificationTarget.java:151)
at
org.jboss.soa.esb.notification.NotificationList.notifyAll(NotificationList.java:162)
at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:93)
at sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMethodInfo.java:165)
at
org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.processSuccess(OverriddenActionLifecycleProcessor.java:108)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipeline.java:610)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:384)
at
org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:156)
at
org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205)
at org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:242)
at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:145)
at $Proxy78.onMessage(Unknown Source)
at
org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:802)
at
org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
at
org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at
org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at
org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at
org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
at
org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
This happened ~20 times of 10,000 messages processed. As a result, the message has been
lost.
The offending code in NotifyQueues.java (marked with >>> <<<):
Context context = NamingContext.getServerContext(environment);
Queue queue=null;
try
{
>> queue = (Queue) context.lookup(destinationName);
<<<
}
This context.lookup() returns null sometimes.
I was able to reproduce it only when the ESB listener's queue is served with >1
thread and the service was deployed on two nodes in the cluster (clustered JMS,
ServiceInvoker used RoundRobin policy).
BEWARE! The context.lookup() is used on many different places without checking the return
value != null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira