Community
Participate
Working Groups
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IJavaModel javaModel = AspectJCore.create(root); throws the following Exception: Error May 27, 2005 11:59:43.381 An internal error occurred during: "Launching". java.lang.ExceptionInInitializerError at org.aspectj.org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1188) at org.eclipse.chianti.launch.aj.AjChiantiLaunchUtil.getJavaModel(AjChiantiLaunchUtil.java:67) at org.eclipse.chianti.launch.aj.AjChiantiParRunner.<init>(AjChiantiParRunner.java:63) at org.eclipse.chianti.launch.ChiantiLaunchConfiguration.launch(ChiantiLaunchConfiguration.java:65) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788) at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) Caused by: java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IndexManager.getJavaPluginWorkingLocation(IndexManager.java:279) at org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IndexManager.<init>(IndexManager.java:49) at org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager.<init>(JavaModelManager.java:521) at org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager.<clinit>(JavaModelManager.java:499) ... 8 more
Matt, I'm assuming that AspectJCore related stuff should go to AJDT.
I'm not sure it goes in AJDT - given that AspectJCore is a part of the JDT compiler code that we provide from the AJ project. I think Adrian also did a little bit of work on this a while ago...
I think the confusion is that there are two AspectJCores: org.eclipse.ajdt.core.AspectJCore (AJDT) and org.aspectj.ajdt.core.AspectJCore (AspectJ) Both implement create() but the AJDT one only implements create(String) to convert a handle identifier into an IJavaElement. So we must be talking about the AspectJ one, which inherits create(IWorkspaceRoot) from JavaCore (org.aspectj.org.eclipse.jdt.core.JavaCore that is, not org.eclipse.jdt.core.JavaCore - confused yet, I know I am!).
Calling org.aspectj.org.eclipse.jdt.internal.core.JavaModelManager.getJavaModelManager(); results in the same exception.