It's all about the answers!

Ask a question

How to work around lock when creating a changeset when using scmtools in java application?

Ferdinand Llameg (812) | asked Aug 19 '14, 12:00 p.m.
 I am trying to create a change set by running command line tasks on a java application. Is there a way work around this? I am running the application from eclipse.
This is how I am creating the change set.
scm create changeset -r REPOSITORY_URL -w WORKSPACE_NAME --component Standard
This is the error that I'm getting.
Could not initialize data area. Could not lock C:\****- locked by other process.


Accepted answer

permanent link
Tim Mok (6.6k38) | answered Aug 19 '14, 1:15 p.m.
Are you performing these operations on the Eclipse workspace? Or even on the RTC sandbox that has been loaded with the RTC Eclipse client?

You might get some success in figuring out what's locking the data area by using a process explorer. Then you can see if Eclipse or RTC really needs that lock or if something in your application is unnecessarily obtaining the lock.
Ferdinand Llameg selected this answer as the correct answer

Tim Mok commented Aug 19 '14, 1:27 p.m.

I had a private conversation with Ferdinand and the automated calls to CLI used 'lscm'. This is likely a cause of the issue and the recommended approach of automating calls to CLI is to use 'scm' instead.

Geoffrey Clemm commented Aug 20 '14, 1:00 a.m.

Isn't "scm" very slow, since it needs to load all the Eclipse libraries every time you invoke it (as opposed to lscm that loads the libraries once into a daemon process, and then just keeps using that daemon process)?

Tim Mok commented Aug 20 '14, 8:29 a.m.

Using 'lscm' is faster on subsequent calls. However, automating calls with the CLI should use a clean environment so that there isn't anything left behind from previous executions or other automated uses of the CLI.

In this case, there were a mixture of calls using 'lscm' and 'scm'. I suggested that the calls be consistent and see if the issue persists.

Your answer

Register or to post your answer.