QC Connection from Java using Com4

岁酱吖の 提交于 2019-12-08 06:51:01

问题


I am trying to connect to QC using code below :

ITDConnection2 QCconn= ClassFactory.createTDConnection();
QCconn.initConnectionEx(Parameters.QC_URL);
QCconn.login(Parameters.QC_USERNAME, Parameters.QC_PASSWORD);
QCconn.connect(Parameters.QC_DOMAIN, Parameters.QC_PROJECT);

But i am getting exception at line

ITDConnection2 QCconn= ClassFactory.createTDConnection();

Exception: com4j.ComException: 80004002 QueryInterface failed : No such interface supported : .\com4j.cpp:163

I have QC install on my PC. I am gettign same error on other PCs as well.


回答1:


Which Version of Quality Center your are trying to connect ?

The otaclient.jar file should be compatible with OTACLIENT.dll.

You should also include com4j.jar in the build path.




回答2:


We got the same problem, we got com4j.jar in the build path

We try to connect to QC 11 but our windows also has QC 10 installed. So there was a problem in the version of the QC. We installed TDConnect from QC 11 to get the code running.

If you run QC 10 it rolls back OTAClient.dll 11 to 10 again.

You have also add otaclient.dll to java.library.path in the VM arguments.




回答3:


We resolved this issue by reinstalling Quality center 11.52 and run the IE in admin mode and it added the TDConnect plugin to QC , then java program connected to the QC.



来源:https://stackoverflow.com/questions/15403725/qc-connection-from-java-using-com4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!