• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

COM+包含事务的类调用时的-2147164157错误原因和解决

发布: 2007-7-01 21:48 | 作者: admin | 来源: | 查看: 14次 | 进入软件测试论坛讨论

领测软件测试网

COM+包含事务的类调用时的-2147164157错误原因和解决

 

一个需要事务的类每次当创建另一个COM+对象时就出现如下错误:

Method ´~´ of object ´~´ failed

错误号:-2147164157

 

调试良久,终不得其解,google新闻组搜索,得到下面信息

 

Error Number:    0x8004E003   ( -2147164157 )Error Description:    You made a method call on a COM+ component    that has a transaction that has already aborted or    in the process of aborting. This can be caused by two things that are known at this time:   1)  SetComplete has been called after SetAbort was already called in thetransaction, and then a method of the object in the transaction is called   2)  The method on the object is called when the transactions has been cleanedup due to a transaction timeout. *** TRY THIS *** 1)  After Calling SetAbort() raise an error (Err.Raise) to the caller so they can handlethe abort correctly  2)  Increase the transaction timeout for long queries, or updates. According to your description, you are pretty sure Child calls SetAborts and Parent calls SetAborts. However its important to manually raise the error from the child using Err.Raise after calling SetAbort. Also, if you are using W2K, install SP1

 

 

以上信息似乎对我还是没有用,突然间我想到COM+的事务管理不支持嵌套,那么会不会在不同的包(package)之间其事务边界(bound)已经失效呢?因为我为了安装代理包方便,把组件按照功能和类型放在了不同的COM+应用程序中,这样的话就有了跨包(package)的调用和创建对象,当不使用事务时,没有什么问题;一旦在事务中调用和创建,便出现如上错误。我原来也碰到过这个情况,当时以为是COM+的事务不支持跨计算机的调用,现在终于明白了。

 

解决方法:把组件全部放在一个包内,调试通过。


延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网