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

我使用的是jdk1.8 在运行时出现类型转换异常java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer #32

Open
1604051738 opened this issue May 21, 2020 · 3 comments

Comments

@1604051738
Copy link

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at com.jfinal.plugin.activerecord.Model.getInt(Model.java:203)
at top.qianxinyao.hotrecommend.HotRecommender.recommend(HotRecommender.java:50)
at top.qianxinyao.Main.JobSetter.executeInstantJob(JobSetter.java:114)
at top.qianxinyao.Main.JobSetter.executeInstantJobForCertainUsers(JobSetter.java:125)
at top.qianxinyao.Main.Main.main(Main.java:40)
Thu May 21 15:17:30 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at com.jfinal.plugin.activerecord.Model.getInt(Model.java:203)
at top.qianxinyao.hotrecommend.HotRecommender.recommend(HotRecommender.java:50)
at top.qianxinyao.Main.JobSetter.executeInstantJob(JobSetter.java:114)
at top.qianxinyao.Main.JobSetter.executeInstantJobForCertainUsers(JobSetter.java:125)
at top.qianxinyao.Main.Main.main(Main.java:40)
Thu May 21 15:17:30 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at com.jfinal.plugin.activerecord.Model.getInt(Model.java:203)
at top.qianxinyao.hotrecommend.HotRecommender.recommend(HotRecommender.java:50)
at top.qianxinyao.Main.JobSetter.executeInstantJob(JobSetter.java:114)
at top.qianxinyao.Main.JobSetter.executeInstantJobForCertainUsers(JobSetter.java:125)
at top.qianxinyao.Main.Main.main(Main.java:40)
HR has contributed 0 recommending news on average
HR end at Thu May 21 15:17:30 CST 2020
本次推荐结束于Thu May 21 15:17:30 CST 2020

@1604051738
Copy link
Author

已解决

@sefei-hao
Copy link

求解决方法

@Elton123456
Copy link

遇到了同样的问题,升级pom.xml文件中的jfinal版本可以解决

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

3 participants