It's all about the answers!

Ask a question

Adding artifacts on ClearCase via Java API


Priscilla Avegliano (11) | asked Nov 23 '11, 12:53 p.m.
Hi,

I am developing a Java Class to automate the asset creation on RAM, using the Java API. The assets are composed by artifacts that are versioned by ClearCase, so I must pass a reference to the artifacts.

I am having problems running the code, specificially at setReference method. The error generated is the follow: "Method is not executable at the client"

The code I am using is this:
RAMAsset asset = session.createAsset("1.0");
asset.setName("Test 5");
asset.setCommunity(session.getCommunity("MyCommunity"));
asset.setAssetType(session.getAssetType("Design"));
asset.setShortDescription("Test");

ArtifactReference artifactRef= new ArtifactReference();
artifactRef.setKind("CC");
artifactRef.setValue("D:/RAM_view/RAM_VOB/Test/src/Test.java");

File file = new File("D:/RAM_view/RAM_VOB/Test/src/Test.java");
LocalFileArtifact artifact = new LocalFileArtifact(file);
artifact.setReference(artifactRef);

RAMFolderArtifact root = (RAMFolderArtifact)asset.getArtifactsRoot();
root.addArtifact(artifact);

Is that a permission problem at ClearCase? Does anybody know?

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.