Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Adding artifacts on ClearCase via Java API

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?

0 votes


Be the first one to answer this question!

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 23 '11, 12:53 p.m.

Question was seen: 8,421 times

Last updated: Nov 23 '11, 12:53 p.m.

Confirmation Cancel Confirm