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

QQ登录

只需一步,快速开始

查看: 2476|回复: 1

[结贴] 自定义函数,tomcat报错

[复制链接]

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
发表于 2017-6-9 10:39:53 | 显示全部楼层 |阅读模式
本帖最后由 qweasdzxc 于 2017-6-9 11:24 编辑
  1. public static String getBZPosID(String DeptCode) {
  2.         System.out.println("DeptCode:"+DeptCode);
  3.                 String BZPosID="";
  4.                 String ksql = "select a from SA_OPOrg a where a.sCode='"+DeptCode+"'";
  5.                 Table table=KSQL.select(ksql, null, "/BIZ/system/data", null);
  6.                 Iterator<Row> iter = table.iterator();
  7.                 while(iter.hasNext()){
  8.                         Row row = iter.next();
  9.                         BZPosID= row.getString(0);
  10.                         }
  11. //                if(DeptCode.equals("dept01")){
  12. //                        BZPosID="jhvNxGLUS86YmmDvnOt";
  13. //                }else if(DeptCode.equals("dept02")){
  14. //                        BZPosID="bUi6S8XNk2mJAXtaHQC";
  15. //                }else if(DeptCode.equals("dept03")){
  16. //                        BZPosID="iCxrS9Ljt2EE0ZHLYKT";
  17. //                }else if(DeptCode.equals("dept04")){
  18. //                        BZPosID="0Ro3S99JnK58nEIrJui";
  19. //                }
  20.         return BZPosID;
  21.     }
复制代码
  1. 2017-06-09 11:23:20 excute stream action, params:{"accept":"application/json","action":"externalAdvanceProcessQueryAction","actionFlag":"__action_0__","activity":"businessActivity1","contentType":"application/json","executeContext":"","executor":"/ORG01.ogn/0wHT7FqxM6TNiev6BOJ.dpt/EQhkpJCRwLg8j7nzPxL.pos/RQhS1r8a3BbLTskPmdp@EQhkpJCRwLg8j7nzPxL.psm","parameters":{"task":"DD71E0ACFDD843FF85EEF21DFD554AED"},"process":"/SAM/assetManage/process/assetout/assetoutProcess"}
  2. java.lang.reflect.InvocationTargetException
  3.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  4.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  5.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  6.         at java.lang.reflect.Method.invoke(Method.java:497)
  7.         at com.justep.system.action.Engine.invokeActions(Native Method)
  8.         at com.justep.system.action.Engine.invokeActions(Unknown Source)
  9.         at com.justep.business.server.BusinessServer.doAction(Unknown Source)
  10.         at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
  11.         at com.justep.business.server.BusinessServer.excute(Unknown Source)
  12.         at com.justep.business.server.BusinessServer.excute(Unknown Source)
  13.         at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
  14.         at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
  15.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  16.         at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
  17.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  18.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  19.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  20.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  21.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  22.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  23.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  24.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  25.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  26.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  27.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  28.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  29.         at java.lang.Thread.run(Thread.java:745)
  30. Caused by: java.lang.reflect.InvocationTargetException
  31.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  32.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  33.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  34.         at java.lang.reflect.Method.invoke(Method.java:497)
  35.         at com.justep.system.action.Engine.invokeAction(Native Method)
  36.         at com.justep.system.action.Engine.invokeAction(Unknown Source)
  37.         at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
  38.         at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
  39.         at com.justep.system.action.ActionUtils.invokeAction(Unknown Source)
  40.         at com.justep.system.process.ProcessUtils.advanceProcessQuery(Unknown Source)
  41.         at ExternalProcessProcedure.advanceProcessQuery(ExternalProcessProcedure.java:26)
  42.         ... 27 more
  43. Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154064; 提示: 计算表达式findOrgUnitsHasCActivity(getBZPosID(currentDeptCode()), true)出错
  44.         at com.justep.model.exception.ModelException.create(Unknown Source)
  45.         at com.justep.system.ksql.parser.ExpressionImpl.evaluate(Unknown Source)
  46.         at com.justep.system.process.ExpressEngine.calculate(Unknown Source)
  47.         at com.justep.system.process.ProcessRuleEngine.exprToOrgUnit(Unknown Source)
  48.         at com.justep.system.process.ProcessRuleEngine.executorRangeToProcessControlItem(Unknown Source)
  49.         at com.justep.system.process.ProcessRuleEngine.executeRuleToProcessControlItem(Unknown Source)
  50.         at com.justep.system.process.ProcessRuleEngine.executeRuleToProcessControl(Unknown Source)
  51.         at com.justep.system.process.ProcessQueryEngine.makeFlowIn(Unknown Source)
  52.         at com.justep.system.process.ProcessQueryEngine.makeTo(Unknown Source)
  53.         at com.justep.system.process.ProcessQueryEngine.makeTo(Unknown Source)
  54.         at com.justep.system.process.ProcessQueryEngine.makeTo(Unknown Source)
  55.         at com.justep.system.process.ProcessQueryEngine.makeTo(Unknown Source)
  56.         at com.justep.system.process.AdvanceProcessQueryEngine.doFlowOutNormal(Unknown Source)
  57.         at com.justep.system.process.AdvanceProcessQueryEngine.doFlowOut(Unknown Source)
  58.         at com.justep.system.process.AdvanceProcessQueryEngine.doExecute(Unknown Source)
  59.         at com.justep.system.process.AdvanceProcessQueryEngine.execute(Unknown Source)
  60.         at com.justep.system.process.ProcessEngine.advanceQuery(Unknown Source)
  61.         at ProcessProcedure.advanceProcessQuery(ProcessProcedure.java:338)
  62.         ... 38 more
  63. Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154075; 提示: 调用函数findOrgUnitsHasCActivity出错
  64.         at com.justep.model.exception.ModelException.create(Unknown Source)
  65.         at com.justep.system.ksql.parser.ExpressionImpl.functionExpression(Unknown Source)
  66.         at com.justep.system.ksql.parser.ExpressionImpl.constExpression(Unknown Source)
  67.         at com.justep.system.ksql.parser.ExpressionImpl.unaryExpression(Unknown Source)
  68.         at com.justep.system.ksql.parser.ExpressionImpl.multiExpression(Unknown Source)
  69.         at com.justep.system.ksql.parser.ExpressionImpl.addExpression(Unknown Source)
  70.         at com.justep.system.ksql.parser.ExpressionImpl.compExpression(Unknown Source)
  71.         at com.justep.system.ksql.parser.ExpressionImpl.notExpression(Unknown Source)
  72.         at com.justep.system.ksql.parser.ExpressionImpl.andExpression(Unknown Source)
  73.         at com.justep.system.ksql.parser.ExpressionImpl.orExpression(Unknown Source)
  74.         ... 55 more
  75. Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154075; 提示: 调用函数getBZPosID出错
  76.         at com.justep.model.exception.ModelException.create(Unknown Source)
  77.         at com.justep.system.ksql.parser.ExpressionImpl.functionExpression(Unknown Source)
  78.         at com.justep.system.ksql.parser.ExpressionImpl.constExpression(Unknown Source)
  79.         at com.justep.system.ksql.parser.ExpressionImpl.unaryExpression(Unknown Source)
  80.         at com.justep.system.ksql.parser.ExpressionImpl.multiExpression(Unknown Source)
  81.         at com.justep.system.ksql.parser.ExpressionImpl.addExpression(Unknown Source)
  82.         at com.justep.system.ksql.parser.ExpressionImpl.compExpression(Unknown Source)
  83.         at com.justep.system.ksql.parser.ExpressionImpl.notExpression(Unknown Source)
  84.         at com.justep.system.ksql.parser.ExpressionImpl.andExpression(Unknown Source)
  85.         at com.justep.system.ksql.parser.ExpressionImpl.orExpression(Unknown Source)
  86.         ... 64 more
  87. Caused by: java.lang.reflect.InvocationTargetException
  88.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  89.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  90.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  91.         at java.lang.reflect.Method.invoke(Method.java:497)
  92.         ... 73 more
  93. Caused by: com.justep.exception.BusinessException: 编码: JUSTEP151058; 提示: 模块"/BIZ"不存在
  94.         at com.justep.exception.BusinessException.create(Unknown Source)
  95.         at com.justep.util.Utils.check(Unknown Source)
  96.         at com.justep.model.impl.ModelLoader.loadExtAttribute(Unknown Source)
  97.         at com.justep.model.impl.ModelLoader.loadModel(Unknown Source)
  98.         at com.justep.model.impl.ModelLoader.loadModel(Unknown Source)
  99.         at com.justep.model.impl.ModelLoader.loadModel(Unknown Source)
  100.         at com.justep.model.impl.ModelLoader.loadModel(Unknown Source)
  101.         at com.justep.model.impl.ModelLoader.loadModel(Unknown Source)
  102.         at com.justep.model.impl.ModelImpl.getModel(Unknown Source)
  103.         at com.justep.model.impl.UtilImplementInstance.getModel(Unknown Source)
  104.         at com.justep.model.ModelUtils.getModel(Unknown Source)
  105.         at com.justep.system.data.KSQL.select(Unknown Source)
  106.         at DefinedFn.getBZPosID(DefinedFn.java:40)
  107.         ... 77 more
复制代码


91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2017-6-9 14:03:12 | 显示全部楼层
"/BIZ/system/data"
改为

"/system/data"
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 10:51 , Processed in 0.061513 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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