Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Create a new Aspect wizard giving error in AJDT.(Create a new Aspect wizard giving a null pointer exception)
Create a new Aspect wizard giving error in AJDT. [message #657499] Wed, 02 March 2011 21:13 Go to next message
Girish  is currently offline Girish
Messages: 3
Registered: March 2011
Junior Member
Hi,
I have installed AJDT plugin(2.1.1) on eclipse 3.6. I'm trying to apply the AspectJ functionality on my existing code. ADJT is installed correctly and working perfectly. It is able to understand all the existing Aspects etc. Excellient !!
But, when I try to create a new aspect , it is giving an error message asking to view the log. In the log, following is the error.... . Did anyone get this error, is this a bug ? Please suggest. Cannot find any help on the web.

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:421)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 1008)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.perform Finish(NewElementWizard.java:133)
at org.eclipse.ajdt.internal.ui.wizards.NewAspectCreationWizard .performFinish(NewAspectCreationWizard.java:60)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHa ndler(WizardHandler.java:254)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(Wizar dHandler.java:274)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(C ommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NullPointerException
at org.eclipse.ajdt.internal.ui.wizards.AJNewTypeWizardPage.ajc $interMethod$org_eclipse_ajdt_internal_ui_wizards_AJNewTypeW izardPage$org_eclipse_ajdt_internal_ui_wizards_NewTypeWizard Page$createAJType(AJNewTypeWizardPage.aj:268)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.ajc$i nterMethodDispatch2$org_eclipse_ajdt_internal_ui_wizards_AJN ewTypeWizardPage$createAJType(NewTypeWizardPage.java:1)
at org.eclipse.ajdt.internal.ui.wizards.AJNewTypeWizardPage.ajc $interMethodDispatch1$org_eclipse_ajdt_internal_ui_wizards_A JNewTypeWizardPage$org_eclipse_ajdt_internal_ui_wizards_NewT ypeWizardPage$createAJType(AJNewTypeWizardPage.aj)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.creat eType_aroundBody7$advice(NewTypeWizardPage.java:450)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.creat eType(NewTypeWizardPage.java:1)
at org.eclipse.ajdt.internal.ui.wizards.NewAspectCreationWizard .finishPage(NewAspectCreationWizard.java:75)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.java:117)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRunnableAdapter.java:106)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Root exception:
java.lang.NullPointerException
at org.eclipse.ajdt.internal.ui.wizards.AJNewTypeWizardPage.ajc $interMethod$org_eclipse_ajdt_internal_ui_wizards_AJNewTypeW izardPage$org_eclipse_ajdt_internal_ui_wizards_NewTypeWizard Page$createAJType(AJNewTypeWizardPage.aj:268)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.ajc$i nterMethodDispatch2$org_eclipse_ajdt_internal_ui_wizards_AJN ewTypeWizardPage$createAJType(NewTypeWizardPage.java:1)
at org.eclipse.ajdt.internal.ui.wizards.AJNewTypeWizardPage.ajc $interMethodDispatch1$org_eclipse_ajdt_internal_ui_wizards_A JNewTypeWizardPage$org_eclipse_ajdt_internal_ui_wizards_NewT ypeWizardPage$createAJType(AJNewTypeWizardPage.aj)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.creat eType_aroundBody7$advice(NewTypeWizardPage.java:450)
at org.eclipse.ajdt.internal.ui.wizards.NewTypeWizardPage.creat eType(NewTypeWizardPage.java:1)
at org.eclipse.ajdt.internal.ui.wizards.NewAspectCreationWizard .finishPage(NewAspectCreationWizard.java:75)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(N ewElementWizard.java:117)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperatio n(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1975)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter .run(WorkbenchRunnableAdapter.java:106)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Re: Create a new Aspect wizard giving error in AJDT. [message #657508 is a reply to message #657499] Wed, 02 March 2011 23:33 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 307
Registered: July 2009
Senior Member
Are you running with jDT weaving enabled? Check Preferences -> JDT Weaving.
Re: Create a new Aspect wizard giving error in AJDT. [message #657732 is a reply to message #657508] Thu, 03 March 2011 13:14 Go to previous messageGo to next message
Girish  is currently offline Girish
Messages: 3
Registered: March 2011
Junior Member
Thanks Andrew , but the JDT weaving is already enabled.
Just to give more details, after the error message (asking to see the logs) , an *.aj file is created but doesn't have any template code in it and even if I manually try to write it , outline view and other views are not getting updated.
Please help !
Re: Create a new Aspect wizard giving error in AJDT. [message #657770 is a reply to message #657732] Thu, 03 March 2011 18:19 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew Eisenberg
Messages: 307
Registered: July 2009
Senior Member
There may be a bug in there somewhere.

Can you attach a simple project where this is failing for you?

As a workaround, you can create a Java class, right click -> AspectJ Tools -> Convert File extension to .aj.

Then change 'class' to 'aspect'.
Re: Create a new Aspect wizard giving error in AJDT. [message #754643 is a reply to message #657770] Thu, 03 November 2011 13:44 Go to previous messageGo to next message
Phani  is currently offline Phani
Messages: 1
Registered: November 2011
Junior Member
Hello Girish,

I just started working on AspectJ. I too face the same problem

Did you get any work around other than creating a class and making it aspect ?


My IDE:

Version: Indigo Release
Build id: 20110615-0604

AspectJ: download.eclipse.org/tools/ajdt/37/update

Any pointer in this regard would be highly helpful


Thanks,
Phani
Re: Create a new Aspect wizard giving error in AJDT. [message #754659 is a reply to message #754643] Thu, 03 November 2011 15:09 Go to previous message
Girish  is currently offline Girish
Messages: 3
Registered: March 2011
Junior Member
ya .. I didn't get a chance to get back to Andrew on this, but I remember the workaround he mentioned works . Here is what he mentioned.

As a workaround, you can create a Java class, right click -> AspectJ Tools -> Convert File extension to .aj.

Then change 'class' to 'aspect'.
Previous Topic:implementing into java
Next Topic:how to get osgi.framework.extensions property
Goto Forum:
  


Current Time: Sat May 25 10:11:06 EDT 2013

Powered by FUDForum. Page generated in 0.01617 seconds