本文介绍了HTTPS服务器上的Java ClearCase更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使ClearCase自动化,所以我可以进行自动构建.第一步是按脚本更新视图.我正在尝试使用以下Java代码:

I am trying to automate ClearCase, so I can do automatic building. The first step is to update a view by script. I am trying this with the following Java code:

        StpProvider provider = (StpProvider) ProviderFactory.createProvider(
                CcProvider.NETWORK_PROVIDER_CLASS, callback);
        provider.setServerUrl("https://...");
        CcProvider m_provider = provider.ccProvider();
        m_provider.registerTrustManagerCallback(callback);
        File viewRoot = new File("D:\\Views\\...");
        StpLocation viewLocation = provider.filePathLocation(StpProvider.Domain.CLEAR_CASE, viewRoot);

        //Get instance of CcView that represents the CCRC view.
        CcView view = m_provider.ccView(viewLocation);

        //Options while updating view
        CcFile.RefreshFlag[] refreshFlags = new CcFile.RefreshFlag[1];
        refreshFlags[0] = CcFile.RefreshFlag.KEEP_HIJACKS;

        PropertyRequestItem.PropertyRequest properties = new PropertyRequestItem.PropertyRequest(CcView.DISPLAY_NAME, CcView.CONFIG_SPEC);

        view.doRefresh(refreshFlags, properties);

MyCallback只是Callback和CcTrustManagerCallback的简单实现,没有多余的逻辑.我收到以下错误:

MyCallback is just a simple Implementation of Callback and CcTrustManagerCallback, with no extra logic to it. I get the following error:

Exception in thread "main" CcException: CRMAP7009: Der Befehl "Update" ist fehlgeschlagen:

CCRC WAN Server: Error: Unable to get view handle.
Fehler: "java.io.IOException: Status(1001:hasNonOkMsg):

CCRC WAN Server: Error: Unable to get view handle.
"
   reason:   conflict
   resource: view: cc.file:D:/Views/...
    at com.ibm.rational.stp.client.internal.cc.Util.ccrcCmdStatusToWvcmException(Util.java:296)
    at com.ibm.rational.stp.client.internal.cc.Util.runCommandAndCheckResults(Util.java:160)
    at com.ibm.rational.stp.client.internal.cc.WebViewRefresh.run(WebViewRefresh.java:233)
    at com.ibm.rational.stp.client.internal.cc.CcFileImpl.doCcRefresh(CcFileImpl.java:392)
    at com.ibm.rational.stp.client.internal.cc.CcFileImpl.doRefresh(CcFileImpl.java:381)
    at cc.UpdateView.main(UpdateView.java:45)

有人知道如何解决此冲突吗?ClearTeam Explorer正在运行,我正在通过Eclipse插件进行手动更新.ClearCase版本9.0.1.4和ClearTeam Explorer版本版本:9.0.1.08.使用Java 8.

Does anyone know how to resolve this conflict ? ClearTeam Explorer is working, I am manually updating via the Eclipse plugin. ClearCase Version 9.0.1.4 and ClearTeam Explorer Version Version: 9.0.1.08. Using Java 8.

推荐答案

最终解决了该问题,谢谢@Abra的答复.但是问题仅在于我必须将PRIMARY_GROUP设置为正确的组.

Finally solved the problem, thank you @Abra for your responses. But the problem was only that I had to set the PRIMARY_GROUP to the correct group.

如果遇到这样的错误,请首先检查使用ClearTeamExplorer或正常的ClearCase进行CC操作是否有效,然后检查其配置方式,并确保对CLI进行相同的设置.

If you have an error like this, first check out if CC operations with ClearTeamExplorer or normal ClearCase work and then check out how it is configured and make sure to have the same settings for the CLI.

这篇关于HTTPS服务器上的Java ClearCase更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 20:02