It's all about the answers!

Ask a question

Issue with lock file (.jazzlock) after load using Java API


Davide Dellepiane (1623) | asked Jul 08 '14, 9:04 a.m.
edited Oct 10 '17, 1:39 p.m. by David Lafreniere (4.6k7)

Hi,

I've developed a java program using RTC API that load all files from all components on a given workspace using the ILoadOperation interface.

I can download all files but when I try to zip the result I've a problem with the .jazz5.jazzlock file that is locked.

I'm sure to close RTC connection (call logout and shutdown methods ) before running the ZIP process but seems that is not enough.

If we try to zip the files after the execution of my java script I can do it, the lock seems to be in Java application.

Do you have any suggestion ?

Thanks in advance,

Davide Dellepiane


Accepted answer


permanent link
Ralph Schoon (58.0k23642) | answered Jul 08 '14, 9:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you seen this? http://thescmlounge.blogspot.de/2013/08/getting-your-stuff-using-rtc-sdk-to-zip.html
David Lafreniere selected this answer as the correct answer

Comments
Davide Dellepiane commented Jul 08 '14, 10:22 a.m. | edited Oct 10 '17, 1:39 p.m.

Hi Ralph,

I've seen it but I haven't followed this "route" because the true purpose of the script is to download all files of the components on a certain Stream taking into account only a specific Snapshot.

The code in the article wasn't used because I've encountered some issues dealing with the Changes...

I'll try now and tell you if all works as expected.

Thanks for your quick answer.


Ralph Schoon commented Jul 08 '14, 10:25 a.m. | edited Oct 10 '17, 1:40 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It should work for multiple component and you should also be able to make it work for a snapshot. Some more pointers here: https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/

It is based on the blog above.


Davide Dellepiane commented Jul 08 '14, 11:13 a.m. | edited Oct 10 '17, 1:40 p.m.

Thank you Ralph, I was finally able to finish the script.

You're a life saver... ;)

Regards,

Davide Dellepiane

2 other answers



permanent link
Tim Mok (6.6k38) | answered Jul 08 '14, 9:09 a.m.
JAZZ DEVELOPER
It's not necessary to zip up the .jazz5 folder if you're only interested in the content. You shouldn't be moving that folder around because it is the metadata for the resources that you have loaded. It will have linked those resources to the workspace and sharing that data in multiple locations will give you synchronization problems.

Comments
Davide Dellepiane commented Jul 08 '14, 10:22 a.m.

Hi,

the only way to zip the files is to exclude the .jazz5 directory the problem with this solution is that I'm not able to delete the folder.

There is a way to instruct the load operation to exclude all metadata  and .project files ?



permanent link
stefano antoniazzi (170711) | answered May 10 '16, 10:26 a.m.
As I may understand from
I've developed a java program using RTC API that load all files from all components on a given workspace using the ILoadOperation interface. I can download all files but when I try to zip the result I've a problem with the .jazz5\.jazzlock file that is locked. I'm sure to close RTC connection (call logout and shutdown methods ) before running the ZIP process but seems that is not enough. 
maybe you couldn't close properly because you should add a 
sharingManager.deregister(sandbox, progressMonitor);
	
after the load operation. Maybe in the meantime you used a "no-workspace" solution like those pointed by Ralph...






Comments
Ralph Schoon commented May 10 '16, 10:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 The .jazz5 folder is metadata used by the RTC SCM system for coordination. I don't think it should go into a zip file. It is not part of the data in the projects. You can  likely not zip it, because it is actively used by the SCM managing the workspace 


stefano antoniazzi commented May 11 '16, 3:21 a.m.

 I perfectly agree, I just got stuck on a situation where I could not understand why after closing connection there was still a .jazzlock on the CFA so I wrote how I could solve my issue.

Your answer


Register or to post your answer.