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

QQ登录

只需一步,快速开始

查看: 24782|回复: 22

[结贴] JUSTEP150018,执行Action错误. For input string: "null" ,保存数据失败

[复制链接]

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
发表于 2015-7-23 10:37:48 | 显示全部楼层 |阅读模式
版本: X5.2.7 小版本号: 2008
数据库: MS SQLServer 服务器操作系统: Windows 应用服务器: Tomcat
客户端操作系统: 浏览器:
java.lang.NumberFormatException: For input string: "null"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at com.justep.system.transform.SimpleTransform.j(Unknown Source)
at com.justep.system.transform.SimpleTransform.transToObj(Unknown Source)
at com.justep.system.transform.Json2Table.getValue(Unknown Source)
at com.justep.system.transform.Json2Table.createRow(Unknown Source)
at com.justep.system.transform.Json2Table.transform(Unknown Source)
at com.justep.system.transform.ParameterTransform.transTableParamByJson(Unknown Source)
at com.justep.system.transform.ParameterTransform.transParamByJson(Unknown Source)
at com.justep.system.transform.ParameterTransform.helpTransform(Unknown Source)
at com.justep.system.transform.ParameterTransform.transform(Unknown Source)
at com.justep.system.transform.RequestTransform.transParamValue(Unknown Source)
at com.justep.system.transform.RequestTransform.transActionParams(Unknown Source)
at com.justep.system.transform.RequestTransform.transform(Unknown Source)
at com.justep.system.action.Engine.translateParameters(Unknown Source)
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.BusinessServerServlet.execService(Unknown Source)
at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at com.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 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)

url:/UI/system/service/common/bizAction.j
param:{"process":"/RH/RH/process/kwn_makevoh/kwn_makevohProcess","activity":"mainActivity","actionFlag":"__action_1__","executor":"PSN01","executeContext":"","action":"saveKWN_MAKEVOH_DAction","parameters":{"table":{"@type":"table","userdata":{"relationAlias":"BIL_ID,BIL_NO,CUS_NO,CUS_NAME,VOH_NO,fMID,space-column,version,CTEXT,VOH_DD","relationTypes":"String,String,String,String,Integer,String,Object,Integer,String,Date","idColumnType":"String","sys.rowid":"KWN_MAKEVOH_D","idColumnDefine":"KWN_MAKEVOH_D","idColumnName":"KWN_MAKEVOH_D","relations":"KWN_MAKEVOH_D.BIL_ID,KWN_MAKEVOH_D.BIL_NO,KWN_MAKEVOH_D.CUS_NO,KWN_MAKEVOH_D.CUS_NAME,KWN_MAKEVOH_D.VOH_NO,KWN_MAKEVOH_D.fMID,EXPRESS,KWN_MAKEVOH_D.version,KWN_MAKEVOH_D.CTEXT,KWN_MAKEVOH_D.VOH_DD","model":"/RH/RH/data","updateMode":"whereVersion","concept":"KWN_MAKEVOH_D","conceptAlias":"KWN_MAKEVOH_D"},"rows":[{"userdata":{"id":{"value":"43D58F00A4FC4BE587A7C5CE7E1F8B6C","originalValue":null,"changed":null},"recordState":"new"},"BIL_ID":{"value":"3011","originalValue":"3011","changed":"1"},"BIL_NO":{"value":"00000005","originalValue":"00000005","changed":"1"},"CUS_NO":{"value":"000483","originalValue":"000483","changed":"1"},"CUS_NAME":{"value":"\u5e7f\u5dde\u5e02\u8fb0\u9a90\u4eea\u5668\u6709\u9650\u516c\u53f8 ","originalValue":"\u5e7f\u5dde\u5e02\u8fb0\u9a90\u4eea\u5668\u6709\u9650\u516c\u53f8 ","changed":"1"},"VOH_NO":{"value":"null","originalValue":"null","changed":"1"},"fMID":{"value":"E0E3A53FB3B64E2B9511A6A9D2F88341","originalValue":"E0E3A53FB3B64E2B9511A6A9D2F88341","changed":"1"},"space-column":{"value":"null","originalValue":"null","changed":"1"},"version":{"value":0,"originalValue":0,"changed":"0"},"CTEXT":{"value":"","originalValue":"","changed":"1"},"VOH_DD":{"value":"2015-07-31","originalValue":"","changed":"1"}}]}},"translateParameter":null}
at (http://localhost:5888/x5/$v573338d95fbd443c9297360ea4d40fd7/base/base.js?language=zh_CN:1)

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

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



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

使用道具 举报

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
 楼主| 发表于 2015-7-23 21:01:47 | 显示全部楼层
可是我在服务器上操作也会这样呀,服务器不是Xp系统。
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2015-7-24 10:40:04 | 显示全部楼层
把data的data-type设置为xml看一下是可以,如果可以就是json解析的问题
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
 楼主| 发表于 2015-7-28 09:17:13 | 显示全部楼层
jishuang 发表于 2015-7-24 10:40
把data的data-type设置为xml看一下是可以,如果可以就是json解析的问题

JUSTEP150018, 执行Action出错, argument type mismatch,保存数据失败!

改了以后报这个错误
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2015-7-28 11:54:26 | 显示全部楼层
wenjinshi 发表于 2015-7-28 09:17
JUSTEP150018, 执行Action出错, argument type mismatch,保存数据失败!

改了以后报这个错误 ...

这个错误是给action传的参数跟action中定义的不匹配
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
 楼主| 发表于 2015-7-28 15:06:49 | 显示全部楼层
jishuang 发表于 2015-7-28 11:54
这个错误是给action传的参数跟action中定义的不匹配

这是后台的跟踪记录。我看了参数定义,都没问题。好奇怪
<actions><action content-type="application/json" accept="application/json, text/javascript, */*"><![CDATA[{"process":"/RH/RH/process/kwn_makevoh/kwn_makevohProcess","activity":"mainActivity","actionFlag":"__action_0__","executor":"PSN01","executeContext":"","action":"saveKWN_MAKEVOH_MAction","parameters":{"table":{"@type":"table","userdata":{"relationAlias":"version,CREATE_DD,VOH_DD,CREATER,BIL_DD_B,BIL_DD_E,BIL_ID,VOH_NO,BIL_NAME","relationTypes":"Integer,DateTime,Date,String,Date,Date,String,Integer,String","idColumnType":"String","sys.rowid":"KWN_MAKEVOH_M","idColumnDefine":"KWN_MAKEVOH_M","idColumnName":"KWN_MAKEVOH_M","relations":"KWN_MAKEVOH_M.version,KWN_MAKEVOH_M.CREATE_DD,KWN_MAKEVOH_M.VOH_DD,KWN_MAKEVOH_M.CREATER,KWN_MAKEVOH_M.BIL_DD_B,KWN_MAKEVOH_M.BIL_DD_E,KWN_MAKEVOH_M.BIL_ID,KWN_MAKEVOH_D.VOH_NO,KWN_VOHMOD_M.BIL_NAME","model":"/RH/RH/data","updateMode":"whereVersion","concept":"KWN_MAKEVOH_M","conceptAlias":"KWN_MAKEVOH_M"},"rows":[{"userdata":{"id":{"value":"751FC3C22CF249D88D0ABA0C9DC7CB7F","originalValue":"751FC3C22CF249D88D0ABA0C9DC7CB7F","changed":"0"},"recordState":"new"},"version":{"value":0,"originalValue":0,"changed":"0"},"CREATE_DD":{"value":"2015-07-28T14:51:55.725Z","originalValue":"2015-07-28T14:51:55.725Z","changed":"1"},"VOH_DD":{"value":"2015-07-28","originalValue":"","changed":"1"},"CREATER":{"value":"system","originalValue":"system","changed":"1"},"BIL_DD_B":{"value":"2015-07-01","originalValue":"","changed":"1"},"BIL_DD_E":{"value":"2015-07-28","originalValue":"","changed":"1"},"BIL_ID":{"value":"3011","originalValue":"","changed":"1"},"VOH_NO":{"value":"","originalValue":"","changed":"1"},"BIL_NAME":{"value":"","originalValue":"","changed":"1"}}]}},"translateParameter":null}]]></action><action content-type="application/json" accept="application/json, text/javascript, */*"><![CDATA[{"process":"/RH/RH/process/kwn_makevoh/kwn_makevohProcess","activity":"mainActivity","actionFlag":"__action_1__","executor":"PSN01","executeContext":"","action":"saveKWN_MAKEVOH_DAction","parameters":{"table":{"@type":"table","userdata":{"relationAlias":"BIL_ID,BIL_NO,CUS_NO,CUS_NAME,VOH_NO,fMID,space-column,version,CTEXT,VOH_DD","relationTypes":"String,String,String,String,Integer,String,Object,Integer,String,Date","idColumnType":"String","sys.rowid":"KWN_MAKEVOH_D","idColumnDefine":"KWN_MAKEVOH_D","idColumnName":"KWN_MAKEVOH_D","relations":"KWN_MAKEVOH_D.BIL_ID,KWN_MAKEVOH_D.BIL_NO,KWN_MAKEVOH_D.CUS_NO,KWN_MAKEVOH_D.CUS_NAME,KWN_MAKEVOH_D.VOH_NO,KWN_MAKEVOH_D.fMID,EXPRESS,KWN_MAKEVOH_D.version,KWN_MAKEVOH_D.CTEXT,KWN_MAKEVOH_D.VOH_DD","model":"/RH/RH/data","updateMode":"whereVersion","concept":"KWN_MAKEVOH_D","conceptAlias":"KWN_MAKEVOH_D"},"rows":[{"userdata":{"id":{"value":"3D999A49BBED40BFA8D36CF3B4D076B1","originalValue":null,"changed":null},"recordState":"new"},"BIL_ID":{"value":"3011","originalValue":"3011","changed":"1"},"BIL_NO":{"value":"00000006","originalValue":"00000006","changed":"1"},"CUS_NO":{"value":"000483","originalValue":"000483","changed":"1"},"CUS_NAME":{"value":"广州市辰骐仪器有限公司                                                          ","originalValue":"广州市辰骐仪器有限公司                                                          ","changed":"1"},"VOH_NO":{"value":"","originalValue":"","changed":"1"},"fMID":{"value":"751FC3C22CF249D88D0ABA0C9DC7CB7F","originalValue":"751FC3C22CF249D88D0ABA0C9DC7CB7F","changed":"1"},"space-column":{"value":"","originalValue":"","changed":"1"},"version":{"value":0,"originalValue":0,"changed":"0"},"CTEXT":{"value":"","originalValue":"","changed":"1"},"VOH_DD":{"value":"2015-07-28","originalValue":"","changed":"1"}}]}},"translateParameter":null}]]></action></actions>
java.lang.IllegalArgumentException: argument type mismatch
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2015-7-28 16:53:30 | 显示全部楼层
这个还是jsond的格式,不是xml的格式,所以跟json和xml无关

应该就是action参数的问题
把action的定义发一下看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
 楼主| 发表于 2015-7-28 17:11:23 | 显示全部楼层
jishuang 发表于 2015-7-28 16:53
这个还是jsond的格式,不是xml的格式,所以跟json和xml无关

应该就是action参数的问题


        public static int save(Table table, String concept, List<DataPermission> insertRange, List<DataPermission> deleteRange,
                        List<DataPermission> updateRange, String readOnly, String notNull, String dataModel, String fnModel) {
                return BizData.save(table, concept, insertRange, deleteRange, updateRange, readOnly, notNull, dataModel, fnModel);
        }

QQ图片20150728170902.png
回复 支持 反对

使用道具 举报

6

主题

24

帖子

81

积分

初级会员

Rank: 2

积分
81
QQ
 楼主| 发表于 2015-7-28 17:20:56 | 显示全部楼层
jishuang 发表于 2015-7-28 16:53
这个还是jsond的格式,不是xml的格式,所以跟json和xml无关

应该就是action参数的问题

QQ图片20150728172023.png

        //public static int saveKWN_MAKEVOH_D(List<DataPermission> insertRange,List<DataPermission> deleteRange,List<DataPermission> updateRange,String concept,String dataModel,String fnModel,String readOnly,String notNull,Table table)  throws NamingException, SQLException {
                public static int saveKWN_MAKEVOH_D(Table table,String concept,List<DataPermission> insertRange,List<DataPermission> deleteRange,List<DataPermission> updateRange,String readOnly,String notNull,String dataModel,String fnModel)  throws NamingException, SQLException {
                java.sql.Connection conn = com.justep.model.ModelUtils.getConnectionInTransaction("/RH/RH/data");
                java.sql.PreparedStatement createtemptable = conn.prepareStatement(" IF EXISTS (select * from tempdb..sysobjects where id=object_id('tempdb..##makevoh_d_kwn'))        DROP TABLE ##makevoh_d_kwn select * into ##makevoh_d_kwn from  KWN_MAKEVOH_D where 1=2");
                createtemptable.execute();
                Iterator<Row> rows = table.iterator();
                while (rows.hasNext()) {
                        Row row = rows.next();
                        String fid = row.getString("KWN_MAKEVOH_D");
                        String fmid = row.getString("fMID");
                        int version = row.getInt("version");
                        String bil_id = row.getString("BIL_ID");
                        String bil_no = row.getString("BIL_NO");
                        String cus_no = row.getString("CUS_NO");
                        String cus_name = row.getString("CUS_NAME");
                        String ctext = row.getString("CTEXT");
                        Date voh_dd = row.getDate("VOH_DD");
                       
                        java.sql.PreparedStatement inserttemptable = conn.prepareStatement("insert into ##makevoh_d_kwn (fID, fMID, version, BIL_ID, BIL_NO,CUS_NO,CUS_NAME,CTEXT,VOH_DD) values (?,?,?,?,?,?,?,?,?) ");
                        inserttemptable.setString(1,fid);
                        inserttemptable.setString(2, fmid);
                        inserttemptable.setInt(3,version);
                        inserttemptable.setString(4, bil_id);
                        inserttemptable.setString(5, bil_no);
                        inserttemptable.setString(6, cus_no);
                        inserttemptable.setString(7, cus_name);
                        inserttemptable.setString(8, ctext);
                        inserttemptable.setDate(9, voh_dd);
                        inserttemptable.execute();
                }

                java.sql.CallableStatement proc = conn.prepareCall("{ call proc_makvoh_kwn() }");
                proc.execute();

        Iterator<Row> rows1 = table.iterator();
                while (rows1.hasNext()) {
                        Row row1 = rows1.next();
                        String fid = row1.getString("KWN_MAKEVOH_D");
                        PreparedStatement updateMAKEVOH_D = conn.prepareStatement("select fid,VOH_NO,CTEXT from ##makevoh_d_kwn where fid=?");
                        updateMAKEVOH_D.setString(1,fid);
                        ResultSet rs = updateMAKEVOH_D.executeQuery();
                        while (rs.next()) {
                        int voh_no =rs.getInt("VOH_NO");
                        String ctext =rs.getString("CTEXT");
                        row1.setValue("VOH_NO",voh_no);
                        row1.setValue("CTEXT",ctext);
                    }
                }
               
                return BizData.save(table, concept, insertRange, deleteRange, updateRange, readOnly, notNull, dataModel, fnModel);
               
        }

回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 12:38 , Processed in 0.061132 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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