Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

How to add Business Component in HP QC (OTA Client) using JAVA

$
0
0



Actually, need to create a new Business Component in HP QC (11.0) using JAVA I tried with below piece of code it throws me an error stating

Exception in thread "main" com4j.ComException: 80042074 (Unknown error) : Cannot create 'Component'. Invalid owner specified: 0. : .\invoke.cpp:517

        ITDConnection tdc = ClassFactory.createTDConnection();
        tdc.initConnectionEx(url);
        tdc.connectProjectEx(domain, project, username, password);

        IComponentFolderFactory treeM1 = (tdc.componentFolderFactory()).queryInterface(IComponentFolderFactory.class);
        Com4jObject ParentFolder1 = treeM1.folderByPath("Components\\T");   
        IComponentFactory iBComponents = tdc.componentFactory().queryInterface(IComponentFactory.class);
        Com4jObject oBusiness = iBComponents.addItem(new Variant(Variant.Type.VT_NULL));
        IComponent iBus = oBusiness.queryInterface(IComponent.class);
        iBus.name("TEST_COMPONETS");
        iBus.post();

Above mentioned error is been thrown -- > iBus.post(); am I missing anything if any please suggest the right way to proceed

Thanks


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>