This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 32963 - CLEARCASE: Not able to check in EJB module : NoSuchElementException
Summary: CLEARCASE: Not able to check in EJB module : NoSuchElementException
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2003-04-16 22:20 UTC by pcmreddy
Modified: 2003-07-15 10:53 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attaching the same exception in a more readable form. (2.78 KB, text/plain)
2003-04-17 10:06 UTC, Martin Entlicher
Details
zipped test case from BugTraq (145.95 KB, application/octet-stream)
2003-04-18 08:16 UTC, David Konecny
Details
The contextual diff of the fix. (2.57 KB, patch)
2003-04-18 13:49 UTC, Martin Entlicher
Details | Diff
The binary patch that fix this issue, put into <NB-install>/modules/autoload/patches/org-netbeans-modules-vcscore/ folder. (7.44 KB, application/octet-stream)
2003-04-18 13:51 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pcmreddy 2003-04-16 22:20:30 UTC
Description: 
Build : 030413 Win 2K with Clearcase.

How to reproduce :

Mount clearcase file system on "alkor" vob is at "testlinuxvob5"

If you are not able to connect to this system I attached this test case in
attachments.
unzip this archive 
Add contents to your local clearcase repository.
and mount up to "cmproster3" directory.
Select EJB module "TeamModule" in "team" package  and try to check in to
ClearCase repository.

Observe the following exception and there is no work around in IDE for this problem.

java.util.NoSuchElementException
at java.util.TreeMap$EntryIterator.nextEntry(TreeMap.java:1020)	at java.util.TreeMap$KeyIterator.next(TreeMap.java:1047)        at org.openide.loaders.FilesSet$FilesIterator.next(FilesSet.java:158)	
at java.util.ArrayList.addAll(ArrayList.java:438)	at org.netbeans.modules.vcscore.VcsFSCommandsAction.getSelectedFileObjectsFromActiveNodes(VcsFSCommandsAction.java:125)	at org.netbeans.modules.vcscore.VcsFSCommandsAction.getPresenter(VcsFSCommandsAction.java:186)	at org.netbeans.modules.vcscore.VcsFSCommandsAction.getPopupPresenter(VcsFSCommandsAction.java:182)	at org.openide.util.actions.NodeAction$DelegateAction.getPopupPresenter(NodeAction.java:473)	at org.openide.actions.FileSystemAction.createMenu(FileSystemAction.java:169)	at org.openide.actions.FileSystemAction.createMenu(FileSystemAction.java:134)	at org.openide.actions.FileSystemAction$Menu.<init>(FileSystemAction.java:243)	at org.openide.actions.FileSystemAction$DelegateAction.getPopupPresenter(FileSystemAction.java:403)	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2162)	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2222)	
at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1023)	at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:972)	at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:138)	at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:133)	
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:228)	
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)	
at java.awt.Component.processMouseEvent(Component.java:5021)	at java.awt.Component.processEvent(Component.java:4818)	at java.awt.Container.processEvent(Container.java:1525)	at java.awt.Component.dispatchEventImpl(Component.java:3526)	
at java.awt.Container.dispatchEventImpl(Container.java:1582)	at java.awt.Component.dispatchEvent(Component.java:3367)	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359)	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3074)	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)	at java.awt.Container.dispatchEventImpl(Container.java:1568)	at java.awt.Window.dispatchEventImpl(Window.java:1581)	
at java.awt.Component.dispatchEvent(Component.java:3367)[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)	at
java.awt.EventDispatchThread.run(EventDispatchThread.java:98)


Evaluation: 
Please send over bugbridge to vcs-generic. See:
http://supptools.eng/bugbridge/start.jsp
xxx@xxxx 2003-04-16

A comment.
Comment 1 Martin Entlicher 2003-04-17 10:06:27 UTC
Created attachment 9984 [details]
Attaching the same exception in a more readable form.
Comment 2 Martin Entlicher 2003-04-17 10:19:14 UTC
It seems like the fix of issue #29271 was not sufficient. Not sure if
that bug should be reopened, this may be a different condition.
Comment 3 Martin Entlicher 2003-04-17 10:20:39 UTC
Moving to DataSystems for evaluation, see issue #29271 for a hint
where can be the problem.
Comment 4 Marian Mirilovic 2003-04-17 12:39:02 UTC
> If you are not able to connect to this system I attached this test
case in
attachments.

Where is an attachemnt ?!?!?!

It seems like this issue was transfered from BugTraq, it will be nice
to know bugtraq bug number .
Comment 5 pcmreddy 2003-04-17 19:01:17 UTC
See BugId: 4849586 for attachments.
Comment 6 David Konecny 2003-04-18 08:16:07 UTC
Created attachment 10013 [details]
zipped test case from BugTraq
Comment 7 David Konecny 2003-04-18 10:06:06 UTC
I'm not able to reproduce it. And there can be several reasons for 
that because we are not able to connect to your clearcase repository 
and I'm not familiar with clearcase VCS and your EJB staff at all.

So my first question is: are you able to always reproduce it? Or did 
it happen only once?

Second, I need _very_ detail guide how and what to do in IDE to "Add 
contents to your local clearcase repository". What I did is following: 
mounted some empty folder as clearcase FS; used ClearCase->Add 
Directory command to add all the directory structure from the zip; 
copied sources from the zip file to the local mirror of Clearcase 
repository; used ClearCase->Add To SourceControl on all the sources 
from the zip file; tried ClearCase->Check In on team/TeamModule node. 
The reported exception did not appear, but I'm experiencing several 
other ones like:

INFORMATIONAL *********** Exception occurred ************ at Fri Apr 
18 10:42:35 CEST 2003
java.io.IOException: Could not locate the primary file for the target 
application, "team/RosterApp.appasm".
atcom.sun.forte4j.j2ee.appclient.ACDataObject.getTargetAppDO(ACDataObj
ect.java:683)

and there is also several times logged message:

"Warning: assemblee couldn't restore link to file 
testlinuxvob5/cmproster3/web"

which looks that your sources has some hardcoded path which can affect 
reproducibility of the issue as well.

So please tell me what are exact steps to create ClearCase repository 
and TeamModule check in. Also try it on clear installation with empty 
userdir so that we both operate in the same environment. Btw. do I 
need a J2EE server or some special configuration of IDE?

In the meantime I will analyze the source code, but at first glance I 
did get a clue what the problem might be.
Comment 8 David Konecny 2003-04-18 10:32:04 UTC
oops, I wanted to say "In the meantime I will analyze the source code,
but at first glance I did _NOT_ get a clue what the problem might be."
Comment 9 David Konecny 2003-04-18 13:08:37 UTC
This is JDK bug. See
<http://developer.java.sun.com/developer/bugParade/bugs/4721752.html>
which was closed as duplicate of
<http://developer.java.sun.com/developer/bugParade/bugs/4715206.html>
which was fixed for JDK 1.4.2.

The first issue contains also suggested workaround. The problem is
that implementation of java.util.ArrayList.addAll() in JDK older than
1.4.2 is buggy - it does not expect that size of the passed collection
could change. 

I suggest to workaround this in
VcsFSCommandsAction.getSelectedFileObjectsFromActiveNodes().
Comment 10 Martin Entlicher 2003-04-18 13:29:50 UTC
Thanks David for your investigations, I will implement the workaround.

Ironically, the workaround was already there for some time, but I've
removed it after issue #29271 was fixed ;-)
Comment 11 Martin Entlicher 2003-04-18 13:47:01 UTC
Fixed in the main trunk:

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFSCommandsAction.java,v 
<--  VcsFSCommandsAction.java
new revision: 1.9; previous revision: 1.8

The fix is trivial and should be safe.
Comment 12 Martin Entlicher 2003-04-18 13:49:21 UTC
Created attachment 10020 [details]
The contextual diff of the fix.
Comment 13 Martin Entlicher 2003-04-18 13:51:50 UTC
Created attachment 10021 [details]
The binary patch that fix this issue, put into <NB-install>/modules/autoload/patches/org-netbeans-modules-vcscore/ folder.
Comment 14 David Konecny 2003-04-18 14:02:39 UTC
Reviewed. OK.
Comment 15 Martin Entlicher 2003-04-18 14:02:54 UTC
pcmreddy, would you please verify the problem with the attached patch
so that we can integrate it into the NB 3.5 / S1S 5.0 codebase?
Thanks.
Comment 16 Jiri Kovalsky 2003-04-24 13:36:20 UTC
Well, I try to verify the patch however I would strongly like to ask
also PCM Reddy to verify it. So can you help us ?
Comment 17 Jiri Kovalsky 2003-04-24 15:39:16 UTC
Well, it works fine for me too. I could "ClearCase|Check In" the
TeamModule dataobject into the repository without any problems. All of
its fileobjects were checked in properly. Are you sure the "team"
directory had [CHECKEDOUT] status ?
Sun ONE Studio 5.0 build #030417 with JDK 1.4.1 build #21 on Solaris
5.8
Comment 18 _ ttran 2003-04-24 16:15:51 UTC
approved for 3.5
Comment 19 Martin Entlicher 2003-04-24 16:46:27 UTC
Thanks for the review, verification and approval.

The workaround is merged into release35 branch:

/shared/data/helm/cvs/repository/vcscore/src/org/netbeans/modules/vcscore/VcsFSCommandsAction.java,v 
<--  VcsFSCommandsAction.java
new revision: 1.6.2.3; previous revision: 1.6.2.2
Comment 20 Jiri Kovalsky 2003-07-15 10:53:19 UTC
Verified in Sun ONE Studio 5.0 Standard Edition build #030521.