好奇的问题,以前在其他项目都是直接用Aop.get就能获取到,但是现在死活不行,麻烦帮忙看下呢
而且同样的代码,在win64上没报错,到linux64上就出现下面的报错了。
当
@Inject private CameraInfoService cameraInfoService ;
时,报错如下:
2021-01-15 17:58:00 [INFO]-[Thread: cron4j::scheduler[95d55d8a6b5ee7a70e1dc6b100000177057a44b26d74919e]::executor[95d55d8a6b5ee7a77f953f9500000177057af4456d64c2c3]]-[com.yfqc.facevideo.common.task.CheckCameraInfoTask.doUpdate()]: -----------------开始任务调度------------- java.lang.NullPointerException at com.yfqc.facevideo.common.task.CheckCameraInfoTask.doUpdate(CheckCameraInfoTask.java:42) at com.yfqc.facevideo.common.task.CheckCameraInfoTask.run(CheckCameraInfoTask.java:28) at it.sauronsoftware.cron4j.RunnableTask.execute(Unknown Source) at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
当
private CameraInfoService cameraInfoService = Aop.get(CameraInfoService.class);
时,报错如下:
15-Jan-2021 18:16:34.521 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter jfinal net.sf.cglib.core.CodeGenerationException: java.lang.IllegalArgumentException-->Invalid calling convention 63 at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:298) at net.sf.cglib.proxy.Enhancer$EnhancerFactoryData.newInstance(Enhancer.java:448) at net.sf.cglib.proxy.Enhancer.nextInstance(Enhancer.java:700) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:295) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:305) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:851) at com.jfinal.aop.Enhancer.enhance(Enhancer.java:40) at com.jfinal.aop.AopFactory.createObject(AopFactory.java:145) at com.jfinal.aop.AopFactory.doGet(AopFactory.java:62) at com.jfinal.aop.AopFactory.get(AopFactory.java:26) at com.jfinal.aop.Aop.get(Aop.java:85) at com.yfqc.facevideo.common.task.CheckCameraInfoTask.<init>(CheckCameraInfoTask.java:25) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at com.jfinal.plugin.cron4j.Cron4jPlugin.addTask(Cron4jPlugin.java:164) at com.jfinal.plugin.cron4j.Cron4jPlugin.<init>(Cron4jPlugin.java:128) at com.jfinal.plugin.cron4j.Cron4jPlugin.<init>(Cron4jPlugin.java:119) at com.yfqc.facevideo.common.JFinalClubConfig.configPlugin(JFinalClubConfig.java:159) at com.jfinal.core.Config.configPluginWithOrder(Config.java:70) at com.jfinal.core.Config.configJFinal(Config.java:56) at com.jfinal.core.JFinal.init(JFinal.java:61) at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:63)
项目:JFinal
将 CameraInfoService 的所有代码贴出来,应该可以找到原因