It's all about the answers!

Ask a question

ILockSearchCriteria findlocks throws exception

kanjbala jawahar (601815) | asked Apr 04 '15, 5:14 a.m.
edited Apr 04 '15, 8:42 a.m.
I am unable to figure out the cause for findLocks throwing exception.
I am trying to find locks on files (same files) in both, my workspace and the stream my workspace flows with.
When I pass the stream to getStreams and I run this code:
ILockSearchCriteria criteria = ILockSearchCriteria.FACTORY.newInstance();
ILockSearchResult result = workspaceManager.findLocks(criteria, IWorkspaceManager.MAX_QUERY_SIZE, getProgressMonitor());
List<IStreamLockReport> report = (List<IStreamLockReport>) result.getReports();
log("The size should not be more than 1, since we are only looking at one stream: " + report.size());

The report.size() returns 0.

The second time I run the same exact code, except I change what I pass to getStreams(), which is this:
IWorkspaceHandle wsh = (IWorkspaceHandle) IWorkspace.ITEM_TYPE.createItemHandle(UUID.valueOf(workspaceUUID), null);

And for criteria2, which has same inputs except for the above, I get an exception.
Here is the excerpt from the long exception list: Internal error
[04-Apr-15 09:42:23:847 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:847 BST] 00000019 [revertChangesets]     at sun.reflect.GeneratedMethodAccessor510.invoke(null)
[04-Apr-15 09:42:23:847 BST] 00000019 [revertChangesets]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
[04-Apr-15 09:42:23:847 BST] 00000019 [revertChangesets]     at java.lang.reflect.Method.invoke(
[04-Apr-15 09:42:23:848 BST] 00000019 [revertChangesets]     at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(
[04-Apr-15 09:42:23:848 BST] 00000019 [revertChangesets]     at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(
[04-Apr-15 09:42:23:848 BST] 00000019 [revertChangesets]     at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(
[04-Apr-15 09:42:23:848 BST] 00000019 [revertChangesets]     at com.sun.proxy.$Proxy1521.findLocks(null)
[04-Apr-15 09:42:23:848 BST] 00000019 [revertChangesets]     at sun.reflect.GeneratedMethodAccessor510.invoke(null)

04-Apr-15 09:42:23:859 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:859 BST] 00000019 [revertChangesets]     at com.sun.proxy.$Proxy36.findLocks(Unknown Source)
[04-Apr-15 09:42:23:859 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:859 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:860 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:860 BST] 00000019 [revertChangesets]     at
[04-Apr-15 09:42:23:860 BST] 00000019 [revertChangesets]     at

I need help figuring this out. What is the cause of this exception?
Thanks much.

kanjbala jawahar commented Apr 04 '15, 8:41 a.m.

I want to note that by "run" I mean, the output from a JBE personal build (which uses a different user id than mine).
So this is not being run on my standalone box, just wanted to make that known.

Be the first one to answer this question!

Register or to post your answer.