起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8024|回复: 14

[结贴] KSQL问题

[复制链接]

29

主题

110

帖子

196

积分

初级会员

Rank: 2

积分
196
QQ
发表于 2017-10-27 09:49:52 | 显示全部楼层 |阅读模式
编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: SELECT id,sxr.innerid,file:///C:/Users/XGS-LQN/AppData/Local/Temp/%W@GJ$ACOF(TYDYECOKVDYB.pngsxr.name

,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr
--> sql:
--> binds: []
Action 在做分页
QQ图片20171027094630.png

这是什么原因 概念没有问题

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36180
发表于 2017-10-27 10:09:28 | 显示全部楼层
发tomcat控制台完整的错误信息
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

110

帖子

196

积分

初级会员

Rank: 2

积分
196
QQ
 楼主| 发表于 2017-10-27 10:17:23 | 显示全部楼层
jishuang 发表于 2017-10-27 10:09
发tomcat控制台完整的错误信息



10:16:34
Lee 2017/10/27 10:16:34

2017-10-27 10:16:00 excute stream action, params:{"accept":"application/json","action":"QueryByPage","actionFlag":"__action_0__","activity":"roadInfoActivity","contentType":"json","executeContext":"","executor":"","parameters":{"limit":20,"offset":20},"process":"/sx/roadinfo/process/roadinfo/roadinfoProcess"}
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.justep.system.action.Engine.invokeActions(Native Method)
        at com.justep.system.action.Engine.invokeActions(Unknown Source)
        at com.justep.business.server.BusinessServer.doAction(Unknown Source)
        at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
        at com.justep.business.server.BusinessServer.excute(Unknown Source)
        at com.justep.business.server.BusinessServer.excute(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at file:///C:\Users\XGS-LQN\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngcom.justep.x.bs

.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        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.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at file:///C:\Users\XGS-LQN\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngorg.apache.tomcat.util.net

.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: SELECT id,sxr.innerid,file:///C:\Users\XGS-LQN\AppData\Local\Temp\%W@GJ$ACOF(TYDYECOKVDYB.pngsxr.name

,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr
--> sql:
--> binds: []
        at com.justep.exception.BusinessException.create(Unknown Source)
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.KSQL.select(Unknown Source)
        at Roadinfo.QueryByPage(Roadinfo.java:50)
        ... 27 more
Caused by: java.lang.NullPointerException
        at com.justep.system.ksql.visitor.QueryVisitor.createInfo(Unknown Source)
        at com.justep.system.ksql.visitor.QueryVisitor.visit(Unknown Source)
        at com.justep.system.ksql.node.SelectListNode.accept(Unknown Source)
        at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
        at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
        at com.justep.system.ksql.node.SelectSentenceNode.accept(Unknown Source)
        at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
        at com.justep.system.ksql.visitor.QueryVisitor.visit(Unknown Source)
        at com.justep.system.ksql.node.QuerySentence.accept(Unknown Source)
        ... 32 more


回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36180
发表于 2017-10-27 10:56:19 | 显示全部楼层
把java文件发一下
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

110

帖子

196

积分

初级会员

Rank: 2

积分
196
QQ
 楼主| 发表于 2017-10-27 11:02:47 | 显示全部楼层

重命名下扩展名

Roadinfo.java.rar

2.72 KB, 下载次数: 53

回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36180
发表于 2017-10-27 13:26:54 | 显示全部楼层
加一个system.out输出看看输出的是什么
        public static Table QueryByPage(Integer limit,Integer offset){
                String KSqlWord="SELECT id,sxr.innerid,sxr.name,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr";
                System.out.println("KSqlWord:"+KSqlWord);
                                Table table = KSQL.select(KSqlWord, null, "/sx/roadinfo/data", null);
                                     table.getProperties().put(Table.PROP_NAME_ROWID, "sxr");
                                     
                                     Table countTable = KSQL.select("Select Count(a) as cnt From sx_roadinfo a ", null, "/sx/roadinfo/data", null);
                                     BigDecimal num = countTable.iterator().next().getDecimal("cnt");
                                     table.getProperties().put(Table.PROP_DB_COUNT, num);
                return table;
        }
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

110

帖子

196

积分

初级会员

Rank: 2

积分
196
QQ
 楼主| 发表于 2017-10-27 14:42:30 | 显示全部楼层
jishuang 发表于 2017-10-27 13:26
加一个system.out输出看看输出的是什么
        public static Table QueryByPage(Integer limit,Integer offset){ ...


输出:SELECT id,sxr.innerid,sxr.name

,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr
在Sql server中执行没有问题
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36180
发表于 2017-10-27 15:12:37 | 显示全部楼层
String KSqlWord="SELECT id,sxr.innerid,sxr.name,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr";
改为

String KSqlWord="SELECT sxr.id,sxr.innerid,sxr.name,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.startStakeNum,sxr.endStakeNum,sxr.endLat,sxr.endLng,sxr.tax,sxr.taxRate,sxr.sectionOwnerId,sxr.chargeType,sxr.tollRoads,sxr.builtTime,sxr.startTime,sxr.endTime FROM sx_roadinfo sxr";
这样看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

110

帖子

196

积分

初级会员

Rank: 2

积分
196
QQ
 楼主| 发表于 2017-10-27 15:34:32 | 显示全部楼层
jishuang 发表于 2017-10-27 15:12
String KSqlWord="SELECT id,sxr.innerid,sxr.name,sxr.type,sxr.length,sxr.startLat,sxr.startLng,sxr.st ...

sxr.id找不到对应的关系映射
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36180
发表于 2017-10-27 16:23:43 | 显示全部楼层
你的概念中有id这个关系吗?没有就去掉
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2025-6-27 19:10 , Processed in 0.061364 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表