@JFinal 你好,想跟你请教个问题:
jfinal 带子查询 如 and s1 in (select gridconto_page_sqfwgl from V_FW_ZHXX) 这样条件 ,报错了
com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.ClassCastException: com.alibaba.druid.sql.visitor.SQLEvalVisitorImpl cannot be cast to com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor at com.jfinal.plugin.activerecord.Db.paginate(Db.java:554) at com.jfinal.plugin.activerecord.Db.paginate(Db.java:593) at com.simple.sqpt.services.FWCXService.doGetHouseInfo(FWCXService.java:172) at com.simple.sqpt.controller.FWCXController.getFwInfo(FWCXController.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55) at com.simple.sqpt.Interceptor.SessionInterceptor.intercept(SessionInterceptor.java:40) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73) at com.jfinal.plugin.druid.DruidStatViewHandler.handle(DruidStatViewHandler.java:58) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: com.alibaba.druid.sql.visitor.SQLEvalVisitorImpl cannot be cast to com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor at com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerSelectQueryBlock.accept0(SQLServerSelectQueryBlock.java:39) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62) at com.alibaba.druid.sql.ast.statement.SQLSelect.accept0(SQLSelect.java:65) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62) at com.alibaba.druid.sql.ast.expr.SQLInSubQueryExpr.accept0(SQLInSubQueryExpr.java:77) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.visitor.SQLEvalVisitorUtils.visit(SQLEvalVisitorUtils.java:728) at com.alibaba.druid.sql.visitor.SQLEvalVisitorImpl.visit(SQLEvalVisitorImpl.java:79) at com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr.accept0(SQLBinaryOpExpr.java:80) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.visitor.SQLEvalVisitorUtils.eval(SQLEvalVisitorUtils.java:135) at com.alibaba.druid.wall.spi.WallVisitorUtils.getValue(WallVisitorUtils.java:687) at com.alibaba.druid.wall.spi.WallVisitorUtils.getValue(WallVisitorUtils.java:944) at com.alibaba.druid.wall.spi.WallVisitorUtils.getConditionValue(WallVisitorUtils.java:904) at com.alibaba.druid.wall.spi.WallVisitorUtils.checkSelelct(WallVisitorUtils.java:215) at com.alibaba.druid.wall.spi.SQLServerWallVisitor.visit(SQLServerWallVisitor.java:167) at com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerSelectQueryBlock.accept0(SQLServerSelectQueryBlock.java:43) at com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerSelectQueryBlock.accept0(SQLServerSelectQueryBlock.java:39) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62) at com.alibaba.druid.sql.ast.statement.SQLSelect.accept0(SQLSelect.java:65) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62) at com.alibaba.druid.sql.ast.statement.SQLSelectStatement.accept0(SQLSelectStatement.java:50) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40) at com.alibaba.druid.wall.WallProvider.checkInternal(WallProvider.java:642) at com.alibaba.druid.wall.WallProvider.check(WallProvider.java:572) at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:605) at com.alibaba.druid.wall.WallFilter.connection_prepareStatement(WallFilter.java:229) at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446) at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928) at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122) at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446) at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342) at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:311) at com.jfinal.plugin.activerecord.Db.query(Db.java:39) at com.jfinal.plugin.activerecord.CPI.query(CPI.java:40) at com.jfinal.plugin.activerecord.dialect.AnsiSqlDialect.takeOverDbPaginate(AnsiSqlDialect.java:186) at com.jfinal.plugin.activerecord.Db.paginate(Db.java:520) at com.jfinal.plugin.activerecord.Db.paginate(Db.java:552) ... 25 more
改用 c3p0的数据源就可以了,什么问题啊。
<version>0.2.25</version>
启动了。 newWallFilter需要设置吗?
测试了去掉 Wall就可以运行。
请问wall里是否需要设置什么?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。