|
发表于 2015-2-15 02:31:43
|
显示全部楼层
按照上面写的例子,会出现excel版本不兼容问题,有人建议另存为新文件,但是最后导入还是一样错误。
ModelUtils.getRequestContext().getActionContext().getParameter("excel") 这个方法估计有问题。
name="cus_jsyqqk" type="Text"/><relation name="cus_khcgfs" type="Text"/><relation name="cus_jgsp" type="Text"/><relation name="cus_cjsj" type="DateTime"/><relation name="cus_lxr" type="String"/><relation name="cus_remark" type="Text"/><relation name="cus_khly" 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[/crm/customer/process/customer/customerProcess]]></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[createCR_KHAction]]></xbiz:simple></item><item key="parameters"><xbiz:map><item key="table"><xbiz:table><rows><userdata name="concept">CR_KH</userdata><userdata name="relations">EXPRESS,CR_KH.cus_djrq,CR_KH.cus_djz,CR_KH.cus_syb,CR_KH.cus_wlfwgw,CR_KH.cus_xsqy,CR_KH.cus_xfhy,CR_KH.cus_khgsqc,CR_KH.cus_khxh,CR_KH.cus_xlkh,CR_KH.cus_bzxq,CR_KH.cus_khzbszd,EXPRESS,CR_KH.version,CR_KH.cus_sybid,CR_KH.cus_khxsgm,CR_KH.cus_khjlre,CR_KH.cus_khwlgm,CR_KH.cus_khzycp,CR_KH.cus_pp,CR_KH.cus_zgqgc,CR_KH.cus_ywjh,CR_KH.cus_bgmbywbde,CR_KH.cus_zyjzds,CR_KH.cus_khgjxq,CR_KH.cus_qywz,CR_KH.cus_ywpf,CR_KH.cus_ywpfyj,CR_KH.cus_pppf,CR_KH.cus_pppfyj,CR_KH.cus_zbpf,CR_KH.cus_zbpfyj,CR_KH.cus_bjpf,CR_KH.cus_bjpfyj,CR_KH.cus_cdpf,CR_KH.cus_cdpfyj,CR_KH.cus_zdf,CR_KH.cus_khfl,CR_KH.cus_zytrqk,CR_KH.cus_jsyqqk,CR_KH.cus_khcgfs,CR_KH.cus_jgsp,CR_KH.cus_cjsj,CR_KH.cus_lxr,CR_KH.cus_remark,CR_KH.cus_khly</userdata><userdata name="model">/crm/customer/data</userdata><userdata name="concept-alias">CR_KH</userdata><userdata name="id-column-name">CR_KH</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">CR_KH</userdata><userdata name="relation-alias">calculate3,cus_djrq,cus_djz,cus_syb,cus_wlfwgw,cus_xsqy,cus_xfhy,cus_khgsqc,cus_khxh,cus_xlkh,cus_bzxq,cus_khzbszd,space-column,version,cus_sybid,cus_khxsgm,cus_khjlre,cus_khwlgm,cus_khzycp,cus_pp,cus_zgqgc,cus_ywjh,cus_bgmbywbde,cus_zyjzds,cus_khgjxq,cus_qywz,cus_ywpf,cus_ywpfyj,cus_pppf,cus_pppfyj,cus_zbpf,cus_zbpfyj,cus_bjpf,cus_bjpfyj,cus_cdpf,cus_cdpfyj,cus_zdf,cus_khfl,cus_zytrqk,cus_jsyqqk,cus_khcgfs,cus_jgsp,cus_cjsj,cus_lxr,cus_remark,cus_khly</userdata><userdata name="relation-types">Object,Date,String,String,String,String,String,String,String,String,String,String,Object,Integer,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,Text,Text,Text,Text,DateTime,String,Text,String</userdata><userdata name="update-mode">whereVersion</userdata></rows></xbiz:table></item><item key="defaultValues"><xbiz:map/></item></xbiz:map></item></xbiz:map></parameter><parameter name="saveActionParam"><xbiz:map><item key="process"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[/crm/customer/process/customer/customerProcess]]></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[saveCR_KHAction]]></xbiz:simple></item><item key="parameters"><xbiz:map><item key="table"><xbiz:table><rows><userdata name="model">/crm/customer/data</userdata><userdata name="id-column-name">CR_KH</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">CR_KH</userdata><userdata name="userdata">whereVersion</userdata><userdata name="relations">EXPRESS,CR_KH.cus_djrq,CR_KH.cus_djz,CR_KH.cus_syb,CR_KH.cus_wlfwgw,CR_KH.cus_xsqy,CR_KH.cus_xfhy,CR_KH.cus_khgsqc,CR_KH.cus_khxh,CR_KH.cus_xlkh,CR_KH.cus_bzxq,CR_KH.cus_khzbszd,EXPRESS,CR_KH.version,CR_KH.cus_sybid,CR_KH.cus_khxsgm,CR_KH.cus_khjlre,CR_KH.cus_khwlgm,CR_KH.cus_khzycp,CR_KH.cus_pp,CR_KH.cus_zgqgc,CR_KH.cus_ywjh,CR_KH.cus_bgmbywbde,CR_KH.cus_zyjzds,CR_KH.cus_khgjxq,CR_KH.cus_qywz,CR_KH.cus_ywpf,CR_KH.cus_ywpfyj,CR_KH.cus_pppf,CR_KH.cus_pppfyj,CR_KH.cus_zbpf,CR_KH.cus_zbpfyj,CR_KH.cus_bjpf,CR_KH.cus_bjpfyj,CR_KH.cus_cdpf,CR_KH.cus_cdpfyj,CR_KH.cus_zdf,CR_KH.cus_khfl,CR_KH.cus_zytrqk,CR_KH.cus_jsyqqk,CR_KH.cus_khcgfs,CR_KH.cus_jgsp,CR_KH.cus_cjsj,CR_KH.cus_lxr,CR_KH.cus_remark,CR_KH.cus_khly</userdata><userdata name="relation-types">Object,Date,String,String,String,String,String,String,String,String,String,String,Object,Integer,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,Text,Text,Text,Text,DateTime,String,Text,String</userdata><userdata name="relation-alias">calculate3,cus_djrq,cus_djz,cus_syb,cus_wlfwgw,cus_xsqy,cus_xfhy,cus_khgsqc,cus_khxh,cus_xlkh,cus_bzxq,cus_khzbszd,space-column,version,cus_sybid,cus_khxsgm,cus_khjlre,cus_khwlgm,cus_khzycp,cus_pp,cus_zgqgc,cus_ywjh,cus_bgmbywbde,cus_zyjzds,cus_khgjxq,cus_qywz,cus_ywpf,cus_ywpfyj,cus_pppf,cus_pppfyj,cus_zbpf,cus_zbpfyj,cus_bjpf,cus_bjpfyj,cus_cdpf,cus_cdpfyj,cus_zdf,cus_khfl,cus_zytrqk,cus_jsyqqk,cus_khcgfs,cus_jgsp,cus_cjsj,cus_lxr,cus_remark,cus_khly</userdata><userdata name="sys.rowid">CR_KH</userdata><userdata name="sys.count">0</userdata><userdata name="concept">CR_KH</userdata><userdata name="concept-alias">CR_KH</userdata><userdata name="update-mode">whereVersion</userdata></rows></xbiz:table></item></xbiz:map></item></xbiz:map></parameter></parameters></action>
java.lang.reflect.InvocationTargetException
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:592)
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)
Caused by: java.lang.reflect.InvocationTargetException
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:592)
at com.justep.system.action.Engine.invokeAction(Native Method)
at com.justep.system.action.Engine.invokeAction(Unknown Source)
at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
at com.justep.system.action.ActionUtils.invokeAction(Unknown Source)
at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:121)
at Excel.importExcel(Excel.java:88)
... 26 more
Caused by: java.lang.ClassCastException: org.apache.poi.xssf.usermodel.XSSFWorkbook
at CustomerProcess.customerProcessAfterImportExcelBeforeAction(CustomerProcess.java:19)
... 36 more |
|