elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.36k stars 7.36k forks source link

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

Closed 2256337618 closed 3 years ago

2256337618 commented 3 years ago

出错地址: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 commented 3 years ago

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

QuartzJobServiceImpl