51Testing软件测试论坛

标题: QC项目备份后,不能被导入??(急) [打印本页]

作者: liaoruochenxing    时间: 2010-12-20 18:20
标题: QC项目备份后,不能被导入??(急)
下面是错误代码,请高手帮我分析分析,是哪里出了问题?更奇怪的事 导入小的项目时没有问题,大点的项目就会报错。

to Import Project;
Failed to create Quality Center project;
Failed to create project '物美杂百';
Failed to import new project '物美杂百';
Error in writing to table REPOSITORY;
[Mercury][SQLServer JDBC Driver]The DBMS returned an unspecified error.  The command code was 0.;

Stack Trace:
com.mercury.jdbc.base.BaseBatchUpdateException: [Mercury][SQLServer JDBC Driver]The DBMS returned an unspecified error.  The command code was 0.
at com.mercury.jdbc.sqlserver.SQLServerImplStatement.getBatchRowsAffectedCount(Unknown Source)
at com.mercury.jdbc.base.BasePreparedStatement.executeBatch(Unknown Source)
at com.mercury.optane.core.db.CTdPreparedStatement.executeBatch(CTdPreparedStatement.java:1860)
at com.mercury.optane.core.db.convertor.CDBWriter.executeBatch(CDBWriter.java:613)
at com.mercury.optane.core.db.convertor.CDBWriter.writeData(CDBWriter.java:503)
        wrapped in com.mercury.optane.core.CTdException: Error in writing to table REPOSITORY
at com.mercury.optane.core.db.convertor.CDBWriter.writeData(CDBWriter.java:540)
at com.mercury.optane.core.db.convertor.CDBForRawWriter.writeData(CDBForRawWriter.java:53)
at com.mercury.optane.core.db.convertor.CDBConvertor.copyTableData(CDBConvertor.java:776)
at com.mercury.optane.core.db.convertor.CDBConvertor.createTable(CDBConvertor.java:723)
at com.mercury.optane.core.db.convertor.CDBConvertor.convert(CDBConvertor.java:671)
at com.mercury.optane.core.db.convertor.CDBConvertor.convert(CDBConvertor.java:636)
at com.mercury.optane.core.db.convertor.CDBConvertor.convertRaw2DB(CDBConvertor.java:386)
at com.mercury.optane.core.db.convertor.CDBConvertor.convertRaw2DB(CDBConvertor.java:357)
at com.mercury.optane.core.db.convertor.CDBProject.importRawProject(CDBProject.java:231)
at com.mercury.td.saserver.api.logics.CProjectLogic.importNewTdProject(CProjectLogic.java:4291)
        wrapped in com.mercury.optane.core.CTdException: Failed to import new project '物美杂百'
at com.mercury.td.saserver.api.logics.CProjectLogic.importNewTdProject(CProjectLogic.java:4302)
at com.mercury.td.saserver.api.logics.CProjectLogic.createProject(CProjectLogic.java:1684)
        wrapped in com.mercury.optane.core.CTdException: Failed to create project '物美杂百'
at com.mercury.td.saserver.api.logics.CProjectLogic.createProject(CProjectLogic.java:1699)
        wrapped in com.mercury.optane.core.CTdException: Failed to create Quality Center project
at com.mercury.td.saserver.api.logics.CProjectLogic.createProject(CProjectLogic.java:1740)
at com.mercury.td.saserver.api.logics.CProjectLogic.importProject(CProjectLogic.java:1524)
at com.mercury.td.saserver.web.CTdSiteAdminServlet.redirectImportProject(CTdSiteAdminServlet.java:336)
at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.mercury.optane.core.web.CAbsServlet.executeFunction(CAbsServlet.java:554)
        wrapped in com.mercury.optane.core.CTdException: Failed to Import Project
at com.mercury.optane.core.web.CAbsServlet.executeFunction(CAbsServlet.java:560)
at com.mercury.optane.core.web.CAbsServlet.processRequest(CAbsServlet.java:535)
at com.mercury.optane.core.web.CAbsServlet.doPost(CAbsServlet.java:418)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
作者: thinkaact    时间: 2010-12-21 12:00
汉字改成英文,试试
作者: liaoruochenxing    时间: 2010-12-21 14:01
改成英文名称也不行,只要 .qcp 的备份文件超过8M就会报错,会不会是SQL数据库本身对文件容量有限制!?
作者: winsor_w    时间: 2013-9-13 13:50
遇到相同的问题,不知道如何解决了,不知道有没有办法解决。两年的数据毁于一旦了
作者: lk8217    时间: 2013-9-13 21:51
导入数据库?
作者: winsor_w    时间: 2013-9-16 08:55
回复 5# lk8217
备份通过QC站点管理导出到文件,还原通过站点管理文件导入到项目。
作者: winsor_w    时间: 2013-9-16 09:02
备份是通过站点管理从项目导出到文件,还原是从文件导入到项目。
问题与楼主的一模一样,导出的文件有70多M,缺陷有1000多个。
作者: winsor_w    时间: 2013-9-16 15:31
问题解决了,贴出来供以后的TX参考。
1、拿有问题那个导出的QC文件 ***.qcp文件做导入,当导入到REPOSITORY表时,发现卡在这个表一段时间但还没有结束的时候用任务管理器强行关闭正在做导入的IE或自己所用浏览器的进程
2、将***.qcp改成***.rar,用解压缩工具打开,删除文件夹中前缀是REPOSITORY的ptd文件,然后再将文件名改回***.qcp
3、才通过站点管理做项目的导入操作,此时不出意外应该可以导入成功
4、进入安装QC的机器,通过SQL的企业管理器,找到步骤1所生成的数据库,我们命名为db1,步骤3生成的数据库为db2
5、将db1中的表REPOSITORY的数据导出到db2中的表REPOSITORY中,具体操作就在db1中选择表REPOSITORY,右键后选择所有任务--导出数据,源数据选择db1,目的数据选择db2,并选择表REPOSITORY(注意后面步骤需要选择源数据表和目的数据表,一定要相同的表,db1.[td].[REPOSITORY])
6、数据导出成功后就顺利将QC还原了,可能会丢弃一些缺陷的附件,但不影响大局了,基本上可以交差。
ps:有高手能有更好的办法,请告之
作者: lk8217    时间: 2013-9-16 18:58
我的导的挺顺利的啊
作者: wenxin12    时间: 2015-11-24 13:22
我用qcp备份文件导入,也发现无法恢复QC,请问如何解决呀
作者: prodigyzh    时间: 2015-12-16 22:58
有真实生产数据的ALM/QC,请使用数据库,文件系统分开备份的方法,不要采用qcp文件导出形式, 理论上这个功能是用来演示和做实验性项目数据备份迁移的。比如像楼上这种两年的数据,不应该才有qcp方式,请参考文档。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2