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

QQ登录

只需一步,快速开始

查看: 9988|回复: 13

[结贴] JUSTEP170004, ,导入excel失败!

  [复制链接]

107

主题

339

帖子

2090

积分

金牌会员

Rank: 6Rank: 6

积分
2090
QQ
发表于 2014-2-23 14:15:09 | 显示全部楼层 |阅读模式
版本: X5.2.6 小版本号:
数据库: MySQL 服务器操作系统: Windows 应用服务器: Tomcat
客户端操作系统: Windows XP 浏览器: Firefox
本帖最后由 lsqtly@163.com 于 2014-2-24 15:35 编辑

用excel导入组件,出现错误提示
未命名.JPG

“组件案例”有个EXCEL ,同样也是这样的错误提示,请管理员看一下,是什么问题?

未命名2.JPG


控制台提示
  1. 2014-02-23 14:10:21 action:<?xml version="1.0" encoding="UTF-8"?>
  2. <action direct-execute="false" process="/SA/excel/system/systemProcess" activity="mainActivity" action-flag="__action_0__" executor="PSN01" execute-context="" name="importExcel"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="config"><xbiz:xml><config use-default="false" to="UI" excel-file="G:\x5\apache-tomcat\temp\5627944b-8d05-475c-a50e-899033a8305f.tmp" mapping-file="G:\x5\apache-tomcat\temp\0f3cc4e5-cdf4-4811-a498-a51c3827b405.tmp"><sheet all="false" start="1" end="1"/><row all="false" start="1" end="1"/><data><concept name="DEMO_TABLE1"><relation name="fString" type="String"/><relation name="fInteger" type="Integer"/><relation name="fFloat" type="Float"/><relation name="fDecimal" type="Decimal"/><relation name="fDate" type="Date"/><relation name="fDateTime" type="DateTime"/><relation name="fTime" type="Time"/><relation name="fBlob" type="Blob"/><relation name="fText" type="Text"/><relation name="fParent" type="String"/><relation name="fLevel" type="String"/><relation name="space-column" type="Object"/><relation name="version" type="Integer"/><relation name="fPath" type="String"/><relation name="fString0" type="String"/><relation name="fString1" type="String"/><relation name="fKind" type="String"/></concept></data></config></xbiz:xml></parameter><parameter name="createActionParam"><xbiz:map><item key="process"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[/demo/components/process/windowDialog/windowDialogProcess]]></xbiz:simple></item><item key="activity"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[mainActivity]]></xbiz:simple></item><item key="action"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[createDEMO_TABLE1Action]]></xbiz:simple></item><item key="parameters"><xbiz:map><item key="table"><xbiz:table><rows><userdata name="concept">DEMO_TABLE1</userdata><userdata name="relations">DEMO_TABLE1.fString,DEMO_TABLE1.fInteger,DEMO_TABLE1.fFloat,DEMO_TABLE1.fDecimal,DEMO_TABLE1.fDate,DEMO_TABLE1.fDateTime,DEMO_TABLE1.fTime,DEMO_TABLE1.fBlob,DEMO_TABLE1.fText,DEMO_TABLE1.fParent,DEMO_TABLE1.fLevel,EXPRESS,DEMO_TABLE1.version,DEMO_TABLE1.fPath,DEMO_TABLE1.fString0,DEMO_TABLE1.fString1,DEMO_TABLE1.fKind</userdata><userdata name="model">/demo/components/data</userdata><userdata name="concept-alias">DEMO_TABLE1</userdata><userdata name="id-column-name">DEMO_TABLE1</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">DEMO_TABLE1</userdata><userdata name="relation-alias">fString,fInteger,fFloat,fDecimal,fDate,fDateTime,fTime,fBlob,fText,fParent,fLevel,space-column,version,fPath,fString0,fString1,fKind</userdata><userdata name="relation-types">String,Integer,Float,Decimal,Date,DateTime,Time,Blob,Text,String,String,Object,Integer,String,String,String,String</userdata><userdata name="update-mode">whereVersion</userdata></rows></xbiz:table></item><item key="defaultValues"><xbiz:map/></item></xbiz:map></item></xbiz:map></parameter></parameters></action>
  3. java.lang.reflect.InvocationTargetException
  4.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  5.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  6.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  7.         at java.lang.reflect.Method.invoke(Method.java:592)
  8.         at com.justep.system.action.Engine.invokeActions(Native Method)
  9.         at com.justep.system.action.Engine.invokeActions(Unknown Source)
  10.         at com.justep.business.server.BusinessServer.doAction(Unknown Source)
  11.         at com.justep.business.server.BusinessServer.doExcute(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:717)
  16.         at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
  17.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  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:102)
  24.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  25.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
  26.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
  27.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
  28.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  29.         at java.lang.Thread.run(Thread.java:595)
  30. Caused by: com.justep.excel.ExcelException: 编码: JUSTEP170010; 提示:
  31.         at com.justep.excel.ExcelException.create(ExcelException.java:32)
  32.         at com.justep.excel.ImportGenerator.getValue(ImportGenerator.java:305)
  33.         at com.justep.excel.ImportGenerator.setCellsValue(ImportGenerator.java:238)
  34.         at com.justep.excel.ImportGenerator.generateRecord(ImportGenerator.java:203)
  35.         at com.justep.excel.ImportGenerator.generateSheet(ImportGenerator.java:198)
  36.         at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:131)
  37.         at Excel.importExcel(Excel.java:88)
  38.         ... 26 more
  39. Caused by: java.lang.NumberFormatException: For input string: "Integer"
  40.         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
  41.         at java.lang.Integer.parseInt(Integer.java:447)
  42.         at java.lang.Integer.parseInt(Integer.java:497)
  43.         at com.justep.system.transform.SimpleTransform.j(Unknown Source)
  44.         at com.justep.system.transform.SimpleTransform.transToObj(Unknown Source)
  45.         at com.justep.excel.ImportGenerator.getValue(ImportGenerator.java:303)
  46.         ... 31 more
  47. 2014-02-23 14:13:38 开始-WINDOW生成中间文件: /UI/OA/schedule/process/schedulePortlet/schedulePortlet.w
  48. 2014-02-23 14:13:38 结束-WINDOW生成中间文件: /UI/OA/schedule/process/schedulePortlet/schedulePortlet.w
  49. 2014-02-23 14:13:38 开始-中间文件生成缓存文件: /UI/OA/schedule/process/schedulePortlet/schedulePortlet.w
  50. 2014-02-23 14:13:38 结束-中间文件生成缓存文件: /UI/OA/schedule/process/schedulePortlet/schedulePortlet.w
  51. 2014-2-23 14:13:38 org.apache.tomcat.util.http.Parameters processParameters
  52. 警告: Parameters: Invalid chunk '' ignored.

  53. <img src="http://bbs.justep.com/forum.php?mod=image&aid=42026&size=300x300&key=fc14f15be9220c4cb2d0e4f5e514b9e4&nocache=yes&type=fixnone" aid="attachimg_42026" alt="" border="0"><img src="http://bbs.justep.com/forum.php?mod=image&aid=42026&size=300x300&key=fc14f15be9220c4cb2d0e4f5e514b9e4&nocache=yes&type=fixnone" aid="attachimg_42026" alt="" border="0">

  54. <img src="http://bbs.justep.com/forum.php?mod=image&aid=42038&size=300x300&key=010234fc898659bd2d6f819221974dc5&nocache=yes&type=fixnone" aid="attachimg_42038" alt="" border="0"><img src="http://bbs.justep.com/forum.php?mod=image&aid=42038&size=300x300&key=010234fc898659bd2d6f819221974dc5&nocache=yes&type=fixnone" aid="attachimg_42038" alt="" border="0">
复制代码
excel.JPG
未命名.JPG

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35962
发表于 2014-2-25 14:36:10 | 显示全部楼层
已远程,mapping文件中的概念名写的不对
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



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

使用道具 举报

发表于 2014-2-23 21:34:48 | 显示全部楼层
应该是类型不匹配,你检查下这个字段在数据库中和在配置文件中的对应类型是否相同

评分

参与人数 1 +4 收起 理由
jishuang + 4 赞一个!

查看全部评分

回复 支持 反对

使用道具 举报

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-2-24 08:31:31 | 显示全部楼层
是数据类型转换报错:应该输入数字的地方,有字符串存在,检查你的excel,看看是不是这个情况

评分

参与人数 1 +4 收起 理由
jishuang + 4 赞一个!

查看全部评分

QQ:179785966
回复 支持 反对

使用道具 举报

107

主题

339

帖子

2090

积分

金牌会员

Rank: 6Rank: 6

积分
2090
QQ
 楼主| 发表于 2014-2-24 13:17:06 | 显示全部楼层
还是不行?把可疑列都删除了,只剩名称一列也不行?
以下是mapping文件
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <mapping>
  3.         <default-config>
  4.                 <sheet all="false" start="1" end="1"/>
  5.                 <row all="false" start="2" end="2"/>
  6.         </default-config>
  7.         <concept name="ProductTypeData">
  8.                 <relation name="sName" value-type="string" cell-number="1"></relation>
  9.         </concept>
  10. </mapping>
复制代码
excel文件
回复 支持 反对

使用道具 举报

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-2-24 13:19:35 | 显示全部楼层
lsqtly@163.com 发表于 2014-2-24 13:17
还是不行?把可疑列都删除了,只剩名称一列也不行?
以下是mapping文件excel文件
...

错误提示还是一样吗?》
QQ:179785966
回复 支持 反对

使用道具 举报

107

主题

339

帖子

2090

积分

金牌会员

Rank: 6Rank: 6

积分
2090
QQ
 楼主| 发表于 2014-2-24 15:32:26 | 显示全部楼层
错误提示还是一样!!
回复 支持 反对

使用道具 举报

107

主题

339

帖子

2090

积分

金牌会员

Rank: 6Rank: 6

积分
2090
QQ
 楼主| 发表于 2014-2-24 15:35:59 | 显示全部楼层
错误提示有点不同了:
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

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



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

使用道具 举报

1

主题

1222

帖子

1378

积分

金牌会员

Rank: 6Rank: 6

积分
1378
QQ
发表于 2014-2-24 16:26:31 | 显示全部楼层
第一行的列 名和你的grid一样吗?
组件案例 从文件目录copy出import.xls进行导入测试
回复 支持 反对

使用道具 举报

107

主题

339

帖子

2090

积分

金牌会员

Rank: 6Rank: 6

积分
2090
QQ
 楼主| 发表于 2014-2-24 20:00:27 | 显示全部楼层
控制台代码
  1. 2014-02-24 19:57:27 加载模块:/UI/system/components/excel/import
  2. 2014-02-24 19:57:28 action:<?xml version="1.0" encoding="UTF-8"?>
  3. <action direct-execute="false" process="/SA/excel/system/systemProcess" activity="mainActivity" action-flag="__action_0__" executor="PSN01" execute-context="" name="importExcel"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="config"><xbiz:xml><config use-default="false" to="UI" excel-file="G:\x5\apache-tomcat\temp\ff0ae2df-bf45-4c63-9edd-352237902e06.tmp" mapping-file="G:\x5\apache-tomcat\temp\63cb7c04-b627-4283-ada0-4c45d97fb7a8.tmp"><sheet all="false" start="1" end="1"/><row all="false" start="2" end="3"/><data><concept name="OA_ProductType"><relation name="sName" type="String"/><relation name="space-column" type="Object"/><relation name="version" type="Integer"/><relation name="sOrderNum" type="String"/><relation name="sDescription" type="Text"/><relation name="fProductsPrefix" type="String"/><relation name="fPYJM" type="String"/><relation name="fNodeKind" type="String"/><relation name="fNodeLevle" type="Integer"/><relation name="fFullName" type="String"/><relation name="fParent" type="String"/><relation name="sCreatorFName" type="String"/><relation name="sCreatorFID" type="String"/><relation name="sCreatorID" type="String"/><relation name="sCreateTime" type="DateTime"/></concept></data></config></xbiz:xml></parameter><parameter name="createActionParam"><xbiz:map><item key="process"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[/OA/Product/process/ProductManger/productMangerProcess]]></xbiz:simple></item><item key="activity"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[staticActivity1]]></xbiz:simple></item><item key="action"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[createOA_ProductTypeAction]]></xbiz:simple></item><item key="parameters"><xbiz:map><item key="table"><xbiz:table><rows><userdata name="concept">OA_ProductType</userdata><userdata name="relations">OA_ProductType.sName,EXPRESS,OA_ProductType.version,OA_ProductType.sOrderNum,OA_ProductType.sDescription,OA_ProductType.fProductsPrefix,OA_ProductType.fPYJM,OA_ProductType.fNodeKind,OA_ProductType.fNodeLevle,OA_ProductType.fFullName,OA_ProductType.fParent,OA_ProductType.sCreatorFName,OA_ProductType.sCreatorFID,OA_ProductType.sCreatorID,OA_ProductType.sCreateTime</userdata><userdata name="model">/OA/Product/data</userdata><userdata name="concept-alias">OA_ProductType</userdata><userdata name="id-column-name">OA_ProductType</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">OA_ProductType</userdata><userdata name="relation-alias">sName,space-column,version,sOrderNum,sDescription,fProductsPrefix,fPYJM,fNodeKind,fNodeLevle,fFullName,fParent,sCreatorFName,sCreatorFID,sCreatorID,sCreateTime</userdata><userdata name="relation-types">String,Object,Integer,String,Text,String,String,String,Integer,String,String,String,String,String,DateTime</userdata><userdata name="update-mode">whereVersion</userdata></rows></xbiz:table></item><item key="defaultValues"><xbiz:map/></item></xbiz:map></item></xbiz:map></parameter></parameters></action>
  4. java.lang.reflect.InvocationTargetException
  5.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  6.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  7.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  8.         at java.lang.reflect.Method.invoke(Method.java:592)
  9.         at com.justep.system.action.Engine.invokeActions(Native Method)
  10.         at com.justep.system.action.Engine.invokeActions(Unknown Source)
  11.         at com.justep.business.server.BusinessServer.doAction(Unknown Source)
  12.         at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
  13.         at com.justep.business.server.BusinessServer.excute(Unknown Source)
  14.         at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
  15.         at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
  16.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  17.         at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
  18.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  19.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  20.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  21.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  22.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  23.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  24.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  25.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  26.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
  27.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
  28.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
  29.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  30.         at java.lang.Thread.run(Thread.java:595)
  31. Caused by: com.justep.excel.ExcelException: 编码: JUSTEP170007; 提示:
  32.         at com.justep.excel.ExcelException.create(ExcelException.java:32)
  33.         at com.justep.excel.ImportGenerator.loadMapping(ImportGenerator.java:83)
  34.         at com.justep.excel.ImportGenerator.init(ImportGenerator.java:59)
  35.         at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:109)
  36.         at Excel.importExcel(Excel.java:88)
  37.         ... 26 more
  38. Caused by: org.dom4j.DocumentException: Error on line 13 of document file:///G:/x5/apache-tomcat/temp/63cb7c04-b627-4283-ada0-4c45d97fb7a8.tmp : The markup in the document following the root element must be well-formed. Nested exception: The markup in the document following the root element must be well-formed.
  39.         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
  40.         at org.dom4j.io.SAXReader.read(SAXReader.java:321)
  41.         at com.justep.excel.ImportGenerator.loadMapping(ImportGenerator.java:81)
  42.         ... 29 more
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-16 18:33 , Processed in 0.090016 second(s), 30 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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