您的位置:首页 > 编程语言 > Java开发

平台2.3升级到2.4的问题

2011-04-21 13:59 411 查看
将src和webroot拷贝到myeclipse工程下面。。

 

运行cn.myapps.version.transfer.AllTransfer

出现如下错误:

12:07:58,171  INFO ProcessFactory:145 - ##CLEAN-CACHE-->>cn.myapps.core.deploy.application.ejb.ApplicationProcessBean.doUpdate(cn.myapps.base.dao.ValueObject)
---->transfer data successfuly!
java.lang.ClassCastException: net.sourceforge.jtds.jdbc.ClobImpl cannot be cast to java.lang.String
at cn.myapps.version.transfer.ResourceTransfer.to2_4(ResourceTransfer.java:48)
at cn.myapps.version.transfer.process.TransferProcessImpl.processTransfer(TransferProcessImpl.java:25)
at cn.myapps.version.transfer.process.TransferProcessImpl.processAllTransfer(TransferProcessImpl.java:16)
at cn.myapps.version.transfer.AllTransfer.to2_4(AllTransfer.java:8)
at cn.myapps.version.transfer.AllTransfer.main(AllTransfer.java:15)
Start to transfer tree mapping: {current_Node=vsdcode, name_Node=vsdname, superior_Node=vsdfathercode}
---->get column by column name<----


 

经过分析,是:数据库列类型转换错误, 在t_resource表中,otherurl的类型为ntext,而平台代码把它当作string了,因为ntext对应jdbc的类型为clob大字段的

 

在数据库中修改 t_resource表中,otherurl的类型为varchar 长度为2000

 

问题得到解决

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息