我的cron作业表达式如下:
gift.award.cron= 0 0/5 * * * ?
每5分钟触发一次。但是我收到了以下异常消息。
org.apache.axis.AxisFault: ; nested exception is:
org.xml.sax.SAXException: For input string: "?"
java.lang.NumberFormatException: For input string: "?"
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.Call.invoke(Call.java:2470)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at hms.quiz.operation.reload.etisalat.client.WsMrechargeHsenidmobileSoapBindingStub.doBillPayment(WsMrechargeHsenidmobileSoapBindingStub.java:251)
at hms.quiz.operation.reload.etisalat.EtisalatReloadService.processBillPayment(EtisalatReloadService.java:108)
at hms.quiz.operation.reload.etisalat.EtisalatReloadService.reloadUser(EtisalatReloadService.java:87)
at hms.quiz.scheduler.GiftAwardJob.executeInternal(GiftAwardJob.java:65)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.xml.sax.SAXException: For input string: "?"
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
... 9 common frames omitted
这里可能出了什么问题?
答案 0 :(得分:0)
将表达式从0 0/5 * * * ?
更改为0 0/5 * * * ? *
即只需尝试将表达式的7个参数设置为长。
尽管我知道最后一个参数Year是可选的。