tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan S Fisher (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TOMEE-1983) NullPointerException is thrown from a consumer created by JMSContext when queue is empty
Date Thu, 08 Dec 2016 00:24:58 GMT

     [ https://issues.apache.org/jira/browse/TOMEE-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan S Fisher updated TOMEE-1983:
-------------------------------------
    Attachment: JMSPoller.java

> NullPointerException is thrown from a consumer created by JMSContext when queue is empty
> ----------------------------------------------------------------------------------------
>
>                 Key: TOMEE-1983
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1983
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 7.0.0, 7.0.1, 7.0.2
>            Reporter: Jonathan S Fisher
>            Priority: Critical
>         Attachments: JMSPoller.java
>
>
> NullPointerException is thrown from a consumer created by JMSContext when queue is empty.
> If you create a consumer using JMXContext, it will throw an exception if the queue it's
attached to is empty.
> Attached is a piece of code that reproduces the error
> Stack Trace:
> INFO: Successfully established connection to broker [tcp://localhost:61616?soTimeout=1000&soWriteTimeout=1000&connectionTimeout=1000]
> java.lang.NullPointerException
> 	at org.apache.openejb.resource.activemq.jms2.JMSConsumerImpl.wrap(JMSConsumerImpl.java:136)
> 	at org.apache.openejb.resource.activemq.jms2.JMSConsumerImpl.receiveBody(JMSConsumerImpl.java:114)
> 	at com.tomitribe.training.jms.JMSPoller.poll(JMSPoller.java:37)
> 	at com.tomitribe.training.jms.JMSPoller.postConstruct(JMSPoller.java:27)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext$LifecycleInvocation.invoke(ReflectionInvocationContext.java:237)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
> 	at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
> 	at org.apache.openejb.monitoring.StatsInterceptor.PostConstruct(StatsInterceptor.java:109)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
> 	at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
> 	at org.apache.openejb.BeanContext.newInstance(BeanContext.java:1708)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager.createInstance(SingletonInstanceManager.java:179)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager.access$100(SingletonInstanceManager.java:69)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager$1.call(SingletonInstanceManager.java:120)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager$1.call(SingletonInstanceManager.java:118)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager.getInstance(SingletonInstanceManager.java:129)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager.initialize(SingletonInstanceManager.java:93)
> 	at org.apache.openejb.core.singleton.SingletonInstanceManager.start(SingletonInstanceManager.java:84)
> 	at org.apache.openejb.core.singleton.SingletonContainer.start(SingletonContainer.java:125)
> 	at org.apache.openejb.assembler.classic.Assembler.startEjbs(Assembler.java:1602)
> 	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:945)
> 	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1257)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1115)
> 	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
> 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5076)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1405)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1395)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message