Bug 108539 - Error popup at breakpoint in tomcat project
Summary: Error popup at breakpoint in tomcat project
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 18:16 EDT by Zac Morris CLA
Modified: 2006-02-14 12:05 EST (History)
3 users (show)

See Also:


Attachments
Screen show of error popup (41.16 KB, image/gif)
2005-09-01 09:59 EDT, Zac Morris CLA
no flags Details
Screen shot of project explorer tab (22.02 KB, image/gif)
2005-09-01 10:34 EDT, Zac Morris CLA
no flags Details
Properties for ccwsef: Java Build Path (14.59 KB, image/gif)
2005-09-01 10:36 EDT, Zac Morris CLA
no flags Details
Properties for ccwsef: Tomcat (14.08 KB, image/gif)
2005-09-01 10:36 EDT, Zac Morris CLA
no flags Details
.log showing the entry generated when the popup occurs (7.76 KB, text/plain)
2005-09-01 11:46 EDT, Zac Morris CLA
no flags Details
workbench.xml (31.18 KB, text/plain)
2005-09-09 16:26 EDT, Zac Morris CLA
no flags Details
workbench.xml (29.32 KB, text/xml)
2006-02-08 04:00 EST, jolliffe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Morris CLA 2005-08-31 18:16:04 EDT
When I set a breakpoint in a .java file that is called via browser "run" (a 
tomcat (sysdeo plugin) project context), I get a popup labeled "Debug Display 
Source", with a big red X and the word Error.

The "Debug" tab, shows the correct information: (Suspended, breakpoint at line 
___ in _________), and the "Variables" tab reflects the correct state of the 
variables at the breakpoint, but the breakpoint line isn't highlighted in the 
edit window.

I get this popup for every breakpoint that is met.  I click OK (the "Details" 
button is greyed out), and the popup goes away, but the line isn't correctly 
highlighting.  No other "functiontionality" seems to be imparied by this, I 
just have to click the OK each and every time.
Comment 1 Darin Wright CLA 2005-09-01 09:25:47 EDT
Can you attach a screen shot of the problem? From the problem description, I 
don't know what dialog you are referring to.
Comment 2 Zac Morris CLA 2005-09-01 09:59:26 EDT
Created attachment 26753 [details]
Screen show of error popup

Here is the requested screen shot showing the IDE with the error popup.

You'll see in the top left "Debug" tab that the breakpoint has been correctly
"caught", and that the "Variables" tab is showing the correct values of the
breakpoint, but there's no highlighting in the "editor" area.
Comment 3 Darin Wright CLA 2005-09-01 10:17:42 EDT
Are there associated entries in the .log file for this error? (See 'Error Log' 
view or .log file in your installation).
Comment 4 Zac Morris CLA 2005-09-01 10:27:59 EDT
This might be part of the problem...

I looked in my available "views" and I don't see an "Error View" listed.  
Window-->Show View-->Other (opened them all and see now "Error View").

I finally poked around and found .log at:
{workspace}\.metadata\.log

This is the entry that I think matches:

!ENTRY org.eclipse.ui 4 4 2005-09-01 10:16:51.268
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-09-01 10:16:51.284
!MESSAGE Failed to execute runnable (java.lang.IllegalArgumentException: Path 
must include project and resource name: /CCWSEFSERVICES)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable 
(java.lang.IllegalArgumentException: Path must include project and resource 
name: /CCWSEFSERVICES)
	at org.eclipse.swt.SWT.error(SWT.java:2942)
	at org.eclipse.swt.SWT.error(SWT.java:2865)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:126)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:103)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)
Caused by: java.lang.IllegalArgumentException: Path must include project and 
resource name: /CCWSEFSERVICES
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60)
	at org.eclipse.core.internal.resources.Workspace.newResource
(Workspace.java:1554)
	at org.eclipse.core.internal.resources.Container.getFolder
(Container.java:139)
	at org.eclipse.jdt.internal.core.JavaProject.getPackageFragmentRoot
(JavaProject.java:1653)
	at org.eclipse.jdt.internal.core.JavaProject.getHandleFromMemento
(JavaProject.java:1474)
	at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento
(JavaElement.java:253)
	at org.eclipse.jdt.internal.core.JavaModel.getHandleFromMemento
(JavaModel.java:182)
	at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento
(JavaElement.java:253)
	at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1157)
	at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1134)
	at 
org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditorInputFactory.createElement
(ClassFileEditorInputFactory.java:42)
	at org.eclipse.ui.internal.NavigationHistoryEditorInfo.restoreEditor
(NavigationHistoryEditorInfo.java:77)
	at org.eclipse.ui.internal.NavigationHistory.addEntry
(NavigationHistory.java:302)
	at org.eclipse.ui.internal.NavigationHistory.access$9
(NavigationHistory.java:291)
	at org.eclipse.ui.internal.NavigationHistory$2.run
(NavigationHistory.java:160)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:123)
	... 18 more



The workspace handles three projects that work together.  I'll include a screen 
shot of the Package Explorer tab.
Comment 5 Zac Morris CLA 2005-09-01 10:34:18 EDT
Created attachment 26754 [details]
Screen shot of project explorer tab

Here is the screen shot showing the three projects:

Basically I have the "Java Build Path" for the ccwsef project configured to
reference both the CCWSEFCORE and CCWSEFSERVICES packages.

I'm also using the sysdeo DevLoader to load these projects into the Tomcat
classpath.
Comment 6 Zac Morris CLA 2005-09-01 10:36:17 EDT
Created attachment 26755 [details]
Properties for ccwsef: Java Build Path
Comment 7 Zac Morris CLA 2005-09-01 10:36:53 EDT
Created attachment 26756 [details]
Properties for ccwsef: Tomcat
Comment 8 Darin Wright CLA 2005-09-01 10:43:58 EDT
Are there any log entries that deal with source lookup errors or the Debug 
Display Source job?
Comment 9 Zac Morris CLA 2005-09-01 11:45:55 EDT
(In reply to comment #8)
> Are there any log entries that deal with source lookup errors or the Debug 
> Display Source job?

Specifically no, but the above IS the actual error this is being generated when 
the popup occurs.

I just restarted the IDE and cleared the log.  When I started Tomcat then 
accessed the jsp via web browser which hits the breakpoint I set the bean I get 
the popup and the above entry in .log

I'm attaching the complete .log file

THANKS FOR THE HELP! :-D
-Zac Morris
Comment 10 Zac Morris CLA 2005-09-01 11:46:55 EDT
Created attachment 26759 [details]
.log showing the entry generated when the popup occurs
Comment 11 Zac Morris CLA 2005-09-01 11:56:49 EDT
Just tried something else:

The bug ONLY occurs if the source file with the breakpoint in it is already 
open in the editor window (which is most always the case since I mark the 
breakpoint in the editor window them run to trigger).

If I close the .java file in the editor window, then run to trigger the 
breakpoint, the correct source file is loaded, the breakpoint line is 
highlighted, and no pop-up occurs.
Comment 12 Zac Morris CLA 2005-09-01 12:05:14 EDT
(In reply to comment #11)
> The bug ONLY occurs if the source file with the breakpoint in it is already 
> open in the editor window

Actually this isn't factually true...  I just tried something else.  The error 
popup is only triggered if the source file with the breakpoint in it is the 
currently "active" tab in the editor.

I just tried opening another source file in the editor.  Then with that "other" 
source file set as the active tab, when the breakpoint is triggered the correct 
source file tab is activated then highlighted correctly with no popup being 
triggered.

The error popup only occurs if the source file with the breakpoint in it is 
already the "active" tab in the editor.

I am however still seeing the error in the .log file about not having project 
\CCWSEFSERVICES set in the path.  Do you know what "Path" this might be 
refering to?  And are these two seperate "issues" or are they related?

Thanks,
-Zac Morris


Comment 13 Zac Morris CLA 2005-09-01 14:02:11 EDT
Ok, continued to poke around and seemed to have resolved (both) issues:

1) Shutdown eclipse:

2) Removed:
   {workspace}\.metadata\org.eclipse.jdt.core
   {workspace}\.metadata\org.eclipse.ui.ide
   {workspace}\.metadata\org.eclipse.ui.workbench
   {workspace}\.metadata\.log

3) Started Eclipse, opening my workspace.

4) Had to re-Open my usual perspectives (Java and Debug) as it had defaulted 
to "Resources" perspective.

5) Opened source file, set breakpoint, left "active/selected" in editor.

6) Started Tomcat (sysdeo plugin)

7) Accessed the jsp that calls the above bean with the breakpoint

8) Everything worked perfect.  No popup error.  No error in .log (actually 
there is no longer a .log being generated, is that ok?)



The workspace folder was originally created in 3.0, and when I installed 3.1 I 
just opened the old workspace.   

Is there some incompatbility issues with settings stored in the above .metadata 
folders between 3.0 and 3.1 that I should have been aware of?

This issue seems to have been resolved with these actions.  Is this considered 
a "bug"?
Comment 14 Darin Wright CLA 2005-09-01 15:44:47 EDT
Moving to JCORE for comment. It appears to be some issue with migration to 3.1 
and the format of the Java element memento.
Comment 15 Jerome Lanneluc CLA 2005-09-08 07:43:05 EDT
Darin, how can I see the problem from JDT Core's point ? Do I have to create a
3.0 workspace, add a breakpoint, restart the workspace with 3.1, and debug so as
to hit the breakpoint ?
Comment 16 Darin Wright CLA 2005-09-08 09:39:39 EDT
Jerome, I did not recreate the problem - I was simply looking at the error 
logs/stack traces. Specfically this:

Caused by: java.lang.IllegalArgumentException: Path must include project and 
resource name: /CCWSEFSERVICES
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60)
	at org.eclipse.core.internal.resources.Workspace.newResource
(Workspace.java:1554)
	at org.eclipse.core.internal.resources.Container.getFolder
(Container.java:139)
	at org.eclipse.jdt.internal.core.JavaProject.getPackageFragmentRoot
(JavaProject.java:1653)
	at org.eclipse.jdt.internal.core.JavaProject.getHandleFromMemento
(JavaProject.java:1474)
	at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento
(JavaElement.java:253)
	at org.eclipse.jdt.internal.core.JavaModel.getHandleFromMemento
(JavaModel.java:182)
	at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento
(JavaElement.java:253)
	at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1157)
	at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1134)
	at 
org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditorInputFactory.createElemen
t(ClassFileEditorInputFactory.java:42)
	at org.eclipse.ui.internal.NavigationHistoryEditorInfo.restoreEditor
(NavigationHistoryEditorInfo.java:77)
	at org.eclipse.ui.internal.NavigationHistory.addEntry
(NavigationHistory.java:302)
	at org.eclipse.ui.internal.NavigationHistory.markLocation
(NavigationHistory.java:170)
	at org.eclipse.ui.texteditor.AbstractTextEditor.markInNavigationHistory
(AbstractTextEditor.java:4926)
	at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal
(AbstractTextEditor.java:4901)
	at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal
(AbstractTextEditor.java:4870)
	at 
org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.positionEditor
(SourceLookupFacility.java:316)
	at 
org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display
(SourceLookupFacility.java:232)
	at org.eclipse.debug.ui.DebugUITools.displaySource
(DebugUITools.java:673)
	at 
org.eclipse.debug.internal.ui.views.launch.LaunchView$SourceDisplayJob.runInUIT
hread(LaunchView.java:209)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:123)
Comment 17 Jerome Lanneluc CLA 2005-09-08 09:46:07 EDT
Thanks. Do you know where the string passed to JavaCore#create(String) is
comming from ? If the string is malformed, the IllegalArgumentException is
expected. We need to know why it is malformed. Without this information, there
is nothing I can  do.
Comment 18 Darin Wright CLA 2005-09-08 10:08:21 EDT
The Java element handle/memento is coming from a memento in a 
NavigationHistoryEditorInfo. I'm not familiar with this code. I'm not sure 
where/when the memento would have been created. CC'ing Nick Edgar for comment 
on when the memento would have been created.
Comment 19 Nick Edgar CLA 2005-09-09 13:13:00 EDT
The memento is for the editor navigation history.
The message:
 Path must include project and resource name: /CCWSEFSERVICES
means that the org.eclipse.core.runtime.Path being used to look up the folder
(via Container.getFolder()) is not well-formed, since the path to a folder must
have at least two segments.

It seems like the identifier read in ClassFileEditorInputFactory.createElement,
from which this Path is constructed, is not well-formed.

The navigation history is stored in the workbench.xml under
.metadata/.plugins/org.eclipse.ui.workbench.
Zac, if you still have the original around, could you please attach it?


Comment 20 Nick Edgar CLA 2005-09-09 13:13:31 EDT
Jerome, did the format for the identifier change between 3.0 and 3.1?
Comment 21 Zac Morris CLA 2005-09-09 16:26:28 EDT
Created attachment 26994 [details]
workbench.xml

Not 100% sure this is the exact workbench.xml but it is date 8/29
Comment 22 Nick Edgar CLA 2005-09-09 17:04:58 EDT
The relevant editor history entries are:

<file factoryID="org.eclipse.jdt.ui.ClassFileEditorInputFactory"
id="org.eclipse.jdt.ui.ClassFileEditor" name="Service.class"
tooltip="com.cisco.ccw.sef.controller.Service">
<persistable
org.eclipse.jdt.ui.ClassFileIdentifier="=ccwsef/WEB-INF\/lib\/com.cisco.ccw.sef.core.jar&lt;com.cisco.ccw.sef.controller(Service.class"/>
</file>
<file factoryID="org.eclipse.jdt.ui.ClassFileEditorInputFactory"
id="org.eclipse.jdt.ui.ClassFileEditor" name="SEAP.class"
tooltip="com.cisco.ccw.sef.services.seap.SEAP">
<persistable
org.eclipse.jdt.ui.ClassFileIdentifier="=ccwsef/\/CCWSEFSERVICES&lt;com.cisco.ccw.sef.services.seap(SEAP.class"/>
</file>

Not sure if the ids for these are well-formed or not.
Comment 23 jolliffe CLA 2006-02-08 04:00:44 EST
Created attachment 34328 [details]
workbench.xml

Very similar issue on 3.12 - seems also related to referenced project.
Attaching workbench.xml in case it helps
Comment 24 Jerome Lanneluc CLA 2006-02-09 12:13:55 EST
Changed JavaProject#getPackageFragmentRoot(IPath) to handle a binary folder being another project.

Added regression test MementoTests#testPackageFragmentRootMemento8().
Comment 25 Frederic Fusier CLA 2006-02-14 12:05:04 EST
Verified for 3.2 M5 using build I20060214-0010.