Bug 117412 - Run application fails with .aj extensions
Summary: Run application fails with .aj extensions
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.3.0   Edit
Assignee: Sian January CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-21 21:22 EST by Ron Bodkin CLA
Modified: 2005-12-01 10:12 EST (History)
0 users

See Also:


Attachments
I get the error in running main.Main in this project (5.84 KB, application/x-zip-compressed)
2005-11-30 12:12 EST, Ron Bodkin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2005-11-21 21:22:51 EST
I can't run a Java class even as a Java/AspectJ application because of this exception. Instead I get a popup dialog with an empty message. This is apparently caused by having an aspect in a .aj extension:

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:327)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:447)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:261)
at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:861)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:895)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:871)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1070)
at org.eclipse.ajdt.internal.launching.AJMainMethodSearchEngine.searchMainMethodsIncludingAspects(AJMainMethodSearchEngine.java:128)
at org.eclipse.ajdt.internal.launching.AspectJApplicationLaunchShortcut.searchAndLaunch(AspectJApplicationLaunchShortcut.java:84)
at org.eclipse.ajdt.internal.launching.AspectJApplicationLaunchShortcut.launch(AspectJApplicationLaunchShortcut.java:297)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:362)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
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 jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
Caused by: org.eclipse.jdt.internal.core.Assert$AssertionFailedException: Assertion failed; The source type has an invalid name: SimpleConfig.aj
at org.eclipse.jdt.internal.core.SourceType.<init>(SourceType.java:43)
at org.eclipse.jdt.internal.core.CompilationUnit.getType(CompilationUnit.java:807)
at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName(PossibleMatch.java:103)
at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init>(PossibleMatch.java:41)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1110)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:208)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:424)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532)
at org.eclipse.jdt.internal.debug.ui.launcher.MainMethodSearchEngine.searchMainMethods(MainMethodSearchEngine.java:92)
at org.eclipse.ajdt.internal.launching.AJMainMethodSearchEngine.searchMainMethodsIncludingAspects(AJMainMethodSearchEngine.java:60)
at org.eclipse.ajdt.internal.launching.AJMainMethodSearchEngine$1.run(AJMainMethodSearchEngine.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Root exception:
org.eclipse.jdt.internal.core.Assert$AssertionFailedException: Assertion failed; The source type has an invalid name: SimpleConfig.aj
at org.eclipse.jdt.internal.core.SourceType.<init>(SourceType.java:43)
at org.eclipse.jdt.internal.core.CompilationUnit.getType(CompilationUnit.java:807)
at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName(PossibleMatch.java:103)
at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init>(PossibleMatch.java:41)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1110)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:208)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:424)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532)
at org.eclipse.jdt.internal.debug.ui.launcher.MainMethodSearchEngine.searchMainMethods(MainMethodSearchEngine.java:92)
at org.eclipse.ajdt.internal.launching.AJMainMethodSearchEngine.searchMainMethodsIncludingAspects(AJMainMethodSearchEngine.java:60)
at org.eclipse.ajdt.internal.launching.AJMainMethodSearchEngine$1.run(AJMainMethodSearchEngine.java:122)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Comment 1 Sian January CLA 2005-11-22 05:13:15 EST
Hi Ron - just wondered if you had a test-case and if you could let us know what versions of Eclipse and AJDT you are using.

Thanks
Comment 2 Sian January CLA 2005-11-30 05:59:38 EST
Hi Ron,
We would really like to fix this bug for 1.2.1 but I'm hitting a dead end trying to reproduce it.  Any chance of that test case?  

Thanks
Comment 3 Ron Bodkin CLA 2005-11-30 12:12:14 EST
Created attachment 30878 [details]
I get the error in running main.Main in this project
Comment 4 Sian January CLA 2005-11-30 12:33:20 EST
Thanks Ron.  I have finally managed to reproduce the error by switching off build automatically, opening Main.aj in the editor, making some changes, saving and then running via Run As...  It seems to happen consistently when I do that.  So a workaround would seem to be to close the editor, but I will try and fix this for 1.2.1.
Comment 5 Sian January CLA 2005-12-01 06:22:18 EST
Changing target milestone to 1.3.0 as this is only a problem on Eclipse 3.1
Comment 6 Sian January CLA 2005-12-01 10:12:59 EST
Added an AJWorkingCopyOwner, to be used as the working copy owner for .aj files so that working copies are not found by Java searches.

Fixed in the following build:

AJDT 1.3.0 for Eclipse 3.1:
BUILD COMPLETE -  build.41
Date of build:	12/01/2005 09:08:54
Time to build:	15 minutes 31 seconds
Last changed:	12/01/2005 08:53:54
Last log entry:	117412: Run application fails with .aj extensions