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

Christopher L. Shannon closed AMQ-7243.
---------------------------------------
    Resolution: Not A Problem

This doesn't seem like a problem... this looks like you just didn't pass in a 
start date. There are two getAllJobs methods and the one you called according 
to the stack trace requires passing in a start and end date as arguments. If 
they were null then this exception would happen. So the solution is to either 
give it a proper date range or to call the getAllJobs() method that doesn't 
require giving a start/end range.

See: 
[https://github.com/apache/activemq/blob/activemq-5.15.9/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java#L123]

and 

[https://github.com/apache/activemq/blob/activemq-5.15.9/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java#L108]

> NPE when calling getAllJobs on JobScheduler MBean
> -------------------------------------------------
>
>                 Key: AMQ-7243
>                 URL: https://issues.apache.org/jira/browse/AMQ-7243
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMX, Job Scheduler
>    Affects Versions: 5.15.6
>            Reporter: François Courtault
>            Priority: Critical
>
> Hello,
> When calling getAllJobs on JobScheduler MBean, I got an exception:
> javax.management.RuntimeMBeanException: java.lang.NullPointerException
>  at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
> at
>  
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
>     ....
>  Caused by: java.lang.NullPointerException
> at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
> at java.text.DateFormat.parse(DateFormat.java:364)
> at 
> org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport.java:36)
> at 
> org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedulerView.java:70)
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to