Community
Participate
Working Groups
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.
Can you attach a screen shot of the problem? From the problem description, I don't know what dialog you are referring to.
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.
Are there associated entries in the .log file for this error? (See 'Error Log' view or .log file in your installation).
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.
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.
Created attachment 26755 [details] Properties for ccwsef: Java Build Path
Created attachment 26756 [details] Properties for ccwsef: Tomcat
Are there any log entries that deal with source lookup errors or the Debug Display Source job?
(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
Created attachment 26759 [details] .log showing the entry generated when the popup occurs
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.
(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
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"?
Moving to JCORE for comment. It appears to be some issue with migration to 3.1 and the format of the Java element memento.
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 ?
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)
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.
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.
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?
Jerome, did the format for the identifier change between 3.0 and 3.1?
Created attachment 26994 [details] workbench.xml Not 100% sure this is the exact workbench.xml but it is date 8/29
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<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<com.cisco.ccw.sef.services.seap(SEAP.class"/> </file> Not sure if the ids for these are well-formed or not.
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
Changed JavaProject#getPackageFragmentRoot(IPath) to handle a binary folder being another project. Added regression test MementoTests#testPackageFragmentRootMemento8().
Verified for 3.2 M5 using build I20060214-0010.