Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » JDT Bug ?
JDT Bug ? [message #252064] Mon, 17 March 2008 15:43 Go to next message
Eclipse UserFriend
I'm using Eclipse Europa and I'm developing a plug-in. However, when i try
to run my plug-in, the following line of code throws an exception for no
apparent reason. IS this a bug?. I enclose the code and the stack trace
below.

JavaCore.getClasspathVariable("JRE_LIB");



ST:

org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
An error occurred while automatically activating bundle TakoPlugin (930).
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:125)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:289)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1269)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:788)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:252)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:248)
at
org.eclipse.ui.internal.registry.EditorDescriptor.createEdit or(EditorDescriptor.java:231)
at org.eclipse.ui.internal.EditorManager.createPart(EditorManag er.java:841)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:606)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at
org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(Ed itorAreaHelper.java:263)
at
org.eclipse.ui.internal.EditorManager.setVisibleEditor(Edito rManager.java:1405)
at
org.eclipse.ui.internal.EditorManager$5.runWithException(Edi torManager.java:939)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:801)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:1342)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: org.osgi.framework.BundleException: Exception in
takoplugin.Activator.start() of bundle TakoPlugin.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1018)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
... 58 more
Caused by: java.lang.ExceptionInInitializerError
at org.eclipse.jdt.core.JavaCore.getClasspathVariable(JavaCore. java:1561)
at
takoplugin.launch.TakoCompilerLauncher.checkTakoHome(TakoCom pilerLauncher.java:67)
at
takoplugin.launch.TakoCompilerLauncher.createAndSaveLaunchCo nfiguration(TakoCompilerLauncher.java:54)
at takoplugin.Activator.start(Activator.java:67)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
... 63 more
Caused by: java.lang.NullPointerException
at
org.eclipse.jdt.internal.core.search.indexing.IndexManager.g etJavaPluginWorkingLocation(IndexManager.java:316)
at
org.eclipse.jdt.internal.core.search.indexing.IndexManager.<init >(IndexManager.java:54)
at
org.eclipse.jdt.internal.core.JavaModelManager.<init>(JavaModelManager.java:1070)
at
org.eclipse.jdt.internal.core.JavaModelManager.<clinit>(JavaModelManager.java:846)
... 70 more
Re: JDT Bug ? [message #252067 is a reply to message #252064] Mon, 17 March 2008 17:19 Go to previous messageGo to next message
Eclipse UserFriend
Arun Sudhir a écrit :
> I'm using Eclipse Europa and I'm developing a plug-in. However, when i
> try to run my plug-in, the following line of code throws an exception
> for no apparent reason. IS this a bug?. I enclose the code and the stack
> trace below.
>
> JavaCore.getClasspathVariable("JRE_LIB")
> Caused by: java.lang.ExceptionInInitializerError
> at org.eclipse.jdt.core.JavaCore.getClasspathVariable(JavaCore. java:1561)
> at
> takoplugin.launch.TakoCompilerLauncher.checkTakoHome(TakoCom pilerLauncher.java:67)
>
> at
> takoplugin.launch.TakoCompilerLauncher.createAndSaveLaunchCo nfiguration(TakoCompilerLauncher.java:54)
>
> at takoplugin.Activator.start(Activator.java:67)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>
> ... 63 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.jdt.internal.core.search.indexing.IndexManager.g etJavaPluginWorkingLocation(IndexManager.java:316)
>
> at
> org.eclipse.jdt.internal.core.search.indexing.IndexManager.<init >(IndexManager.java:54)
What Eclipse build are you using?
Are you running in a headless Eclipse ?
--
Olivier
Re: JDT Bug ? [message #252070 is a reply to message #252067] Mon, 17 March 2008 18:02 Go to previous messageGo to next message
Eclipse UserFriend
The error went away when i did the following:

I created an extension for my plugin from
"org.eclipse.jdt.core.classpathVariableInitializer" and then, in that class,
I called JavaCore.getClasspathVariables() and that worked. My plugin just
extended AbstractUIPlugin. Is that what you mean by a headless Eclipse?

"Olivier Thomann" <olivier_thomann@ca.ibm.com> wrote in message
news:frmn87$4cp$1@build.eclipse.org...
> Arun Sudhir a écrit :
>> I'm using Eclipse Europa and I'm developing a plug-in. However, when i
>> try to run my plug-in, the following line of code throws an exception for
>> no apparent reason. IS this a bug?. I enclose the code and the stack
>> trace below.
>>
>> JavaCore.getClasspathVariable("JRE_LIB")
>> Caused by: java.lang.ExceptionInInitializerError
>> at org.eclipse.jdt.core.JavaCore.getClasspathVariable(JavaCore. java:1561)
>> at
>> takoplugin.launch.TakoCompilerLauncher.checkTakoHome(TakoCom pilerLauncher.java:67)
>> at
>> takoplugin.launch.TakoCompilerLauncher.createAndSaveLaunchCo nfiguration(TakoCompilerLauncher.java:54)
>> at takoplugin.Activator.start(Activator.java:67)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>> ... 63 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.eclipse.jdt.internal.core.search.indexing.IndexManager.g etJavaPluginWorkingLocation(IndexManager.java:316)
>> at
>> org.eclipse.jdt.internal.core.search.indexing.IndexManager.<init >(IndexManager.java:54)
> What Eclipse build are you using?
> Are you running in a headless Eclipse ?
> --
> Olivier
Re: JDT Bug ? [message #252076 is a reply to message #252070] Mon, 17 March 2008 18:51 Go to previous messageGo to next message
Eclipse UserFriend
Arun Sudhir a écrit :
> The error went away when i did the following:
>
> I created an extension for my plugin from
> "org.eclipse.jdt.core.classpathVariableInitializer" and then, in that
> class, I called JavaCore.getClasspathVariables() and that worked. My
> plugin just extended AbstractUIPlugin. Is that what you mean by a
> headless Eclipse?
By headless, I mean do you run it as a Java application or as an Eclipse
application?
Please open a bug report against JDT/Core with steps to reproduce and
the way you fixed it.
Thanks,
--
Olivier
Re: JDT Bug ? [message #252112 is a reply to message #252076] Wed, 19 March 2008 12:30 Go to previous messageGo to next message
Eclipse UserFriend
I ran it as an Eclipse Application.. just like the normal way we test every
plug-in. It openend up anpother instance of Eclipse and tried to load the
plug-in. So is it that the JavaCore class does not work unless we create an
extension from org.jdt.core ?? I dont think thats the case because that
would be absurd. So shall I go ahead and open a bug in Bugzilla ?

"Olivier Thomann" <olivier_thomann@ca.ibm.com> wrote in message
news:frmsmb$emr$1@build.eclipse.org...
> Arun Sudhir a écrit :
>> The error went away when i did the following:
>>
>> I created an extension for my plugin from
>> "org.eclipse.jdt.core.classpathVariableInitializer" and then, in that
>> class, I called JavaCore.getClasspathVariables() and that worked. My
>> plugin just extended AbstractUIPlugin. Is that what you mean by a
>> headless Eclipse?
> By headless, I mean do you run it as a Java application or as an Eclipse
> application?
> Please open a bug report against JDT/Core with steps to reproduce and the
> way you fixed it.
> Thanks,
> --
> Olivier
Re: JDT Bug ? [message #252141 is a reply to message #252112] Wed, 19 March 2008 14:40 Go to previous message
Eclipse UserFriend
Arun Sudhir a écrit :
> I ran it as an Eclipse Application.. just like the normal way we test
> every plug-in. It openend up anpother instance of Eclipse and tried to
> load the plug-in. So is it that the JavaCore class does not work unless
> we create an extension from org.jdt.core ?? I dont think thats the case
> because that would be absurd. So shall I go ahead and open a bug in
> Bugzilla ?
yes, please. Open a bug report and provide the dependancies of your plugin.
The JDT/Core plugin is initialized only if it is required.
If you provide more details in the bug report, I might be able to help
you better.
--
Olivier
Previous Topic:problem with jars in the lib directory
Next Topic:Multiple projects using the same resources...how do I make links to the resource folder?
Goto Forum:
  


Current Time: Wed Apr 30 04:27:22 EDT 2025

Powered by FUDForum. Page generated in 0.03397 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top