Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

任务调度子任务从有值修改到无值,数据库会存一个""字符串,导致查询子任务时""转long类型出错 #620

Closed
2256337618 opened this issue Apr 2, 2021 · 1 comment

Comments

@2256337618
Copy link

出错地址:QuartzJobServiceImpl.java:136 findbyid方法中的参数转long类型失败

修改: QuartzJobServiceImpl.java85行 if(quartzJob.getSubTask() != null){ 改为 if(StringUtils.isNotBlank(quartzJob.getSubTask())){

完整报错信息:elAdmin- 2021-04-02 14:33:47 [el-async-1] ERROR m.z.c.thread.AsyncTaskExecutePool - ====For input string: ""====
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at me.zhengjie.modules.quartz.service.impl.QuartzJobServiceImpl.executionSubJob(QuartzJobServiceImpl.java:136)
at me.zhengjie.modules.quartz.service.impl.QuartzJobServiceImpl$$FastClassBySpringCGLIB$$ee2aa31e.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.util.concurrent.FutureTask.run$$$capture(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
elAdmin- 2021-04-02 14:33:47 [el-async-1] ERROR m.z.c.thread.AsyncTaskExecutePool - exception method:executionSubJob

@2256337618
Copy link
Author

版本:2.5
环境:生产环境
更正: 是修改ExecutionJob类85行的代码

QuartzJobServiceImpl

@elunez elunez closed this as completed in 4b845b7 Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant