During plug-in development, Extentions: Org. eclipse. UI. views, added several views at the same time, and then right-click the project run --> JAVA application. The following error report is displayed when the added view is opened in the running project:
Org. Eclipse. Core. runtime. Internal. adaptor. selazystarter $ terminatingclassnotfoundexception: An error occurred while automatically activating bundle com. IBM. threadanalysis. uiplugin (3 ).
At org. Eclipse. Core. runtime. Internal. adaptor. eclipselazystarter. postfindlocalclass (eclipselazystarter. Java: 125)
At org. Eclipse. osgi. baseadaptor. loader. classpathmanager. findlocalclass (classpathmanager. Java: 449)
At org. Eclipse. osgi. Internal. baseadaptor. defaultclassloader. findlocalclass (defaultclassloader. Java: 211)
At org. Eclipse. osgi. Internal. loader. bundleloader. findlocalclass (bundleloader. Java: 381)
At org. Eclipse. osgi. Internal. loader. bundleloader. findclassinternal (bundleloader. Java: 457)
At org. Eclipse. osgi. Internal. loader. bunddleloader. findclass (bundleloader. Java: 410)
At org. Eclipse. osgi. Internal. loader. bunddleloader. findclass (bundleloader. Java: 398)
At org. Eclipse. osgi. Internal. baseadaptor. defaultclassloader. loadclass (defaultclassloader. Java: 105)
At java. Lang. classloader. loadclass (classloader. Java: 248)
At org. Eclipse. osgi. Internal. loader. bundleloader. loadclass (bundleloader. Java: 326)
At org. Eclipse. osgi. Framework. Internal. Core. bundlehost. loadclass (bundlehost. Java: 231)
At org. Eclipse. osgi. Framework. Internal. Core. abstractbundle. loadclass (abstractbundle. Java: 1193)
At org. Eclipse. Core. Internal. Registry. osgi. registrystrategyosgi. createexecutableextension (registrystrategyosgi. Java: 160)
At org. Eclipse. Core. Internal. Registry. extensionregistry. createexecutableextension (extensionregistry. Java: 874)
At org. Eclipse. Core. Internal. Registry. configurationelement. createexecutableextension (configurationelement. Java: 243)
At org. Eclipse. Core. Internal. Registry. configurationelementhandle. createexecutableextension (configurationelementhandle. Java: 51)
At org. Eclipse. UI. Internal. workbenchplugin $ 1.run( workbenchplugin. Java: 267)
At org. Eclipse. SWT. Custom. busyindicator. showwhile (busyindicator. Java: 70)
At org. Eclipse. UI. Internal. workbenchplugin. createextension (workbenchplugin. Java: 263)
At org. Eclipse. UI. Internal. Registry. viewdescriptor. createview (viewdescriptor. Java: 63)
At org. Eclipse. UI. Internal. viewreference. createparelper (viewreference. Java: 324)
At org. Eclipse. UI. Internal. viewreference. createpart (view reference. Java: 226)
At org. Eclipse. UI. Internal. workbenchpartreference. getpart (workbenchpartreference. Java: 595)
At org. Eclipse. UI. Internal. workbenchpage $ activationlist. setactive (workbenchpage. Java: 4212)
At org. Eclipse. UI. Internal. workbenchpage $18. runwithexception (workbenchpage. Java: 3271)
At org. Eclipse. UI. Internal. startupthreading $ startuprunnable. Run (startupthreading. Java: 31)
At org. Eclipse. SWT. Widgets. runnablelock. Run (runnablelock. Java: 35)
At org. Eclipse. SWT. Widgets. synchronizer. runasyncmessages (synchronizer. Java: 134)
At org. Eclipse. SWT. Widgets. display. runasyncmessages (display. Java: 3855)
At org. Eclipse. SWT. Widgets. display. readanddispatch (display. Java: 3476)
At org. Eclipse. UI. application. workbenchadvisor. openwindows (workbenchadvisor. Java: 803)
At org. Eclipse. UI. Internal. workbench $28. runwithexception (workbench. Java: 1384)
At org. Eclipse. UI. Internal. startupthreading $ startuprunnable. Run (startupthreading. Java: 31)
At org. Eclipse. SWT. Widgets. runnablelock. Run (runnablelock. Java: 35)
At org. Eclipse. SWT. Widgets. synchronizer. runasyncmessages (synchronizer. Java: 134)
At org. Eclipse. SWT. Widgets. display. runasyncmessages (display. Java: 3855)
At org. Eclipse. SWT. Widgets. display. readanddispatch (display. Java: 3476)
At org. Eclipse. UI. Internal. workbench. runui (workbench. Java: 2316)
At org. Eclipse. UI. Internal. workbench. Access $4 (workbench. Java: 2221)
At org. Eclipse. UI. Internal. workbench $ 5.run( workbench. Java: 500)
At org. Eclipse. Core. databinding. observable. realm. runwithdefault (realm. Java: 332)
At org. Eclipse. UI. Internal. workbench. createandrunworkbench (workbench. Java: 493)
At org. Eclipse. UI. platformui. createandrunworkbench (platformui. Java: 149)
At org. Eclipse. UI. Internal. Ide. application. ideapplication. Start (ideapplication. Java: 113)
At org. Eclipse. Equinox. Internal. App. eclipseapphandle. Run (eclipseapphandle. Java: 194)
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 (eclipsestarter. Java: 368)
At org. Eclipse. Core. runtime. adaptor. eclipsestarter. Run (eclipsestarter. Java: 179)
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: 597)
At org. Eclipse. Equinox. launcher. Main. invokeframework (main. Java: 559)
At org. Eclipse. Equinox. launcher. Main. basicrun (main. Java: 514)
At org. Eclipse. Equinox. launcher. Main. Run (main. Java: 1311)
At org. Eclipse. Equinox. launcher. Main. Main (main. Java: 1287)
Caused by: org. osgi. Framework. bundleexception: the activator com. IBM. msdk. UI. threadanalysisplugin for bundle com. IBM. threadanalysis. uiplugin is invalid
At org. Eclipse. osgi. Framework. Internal. Core. abstractbundle. loadbundleactivator (abstractbundle. Java: 157)
At org. Eclipse. osgi. Framework. Internal. Core. bundlecontextimpl. Start (bundlecontextimpl. Java: 751)
At org. Eclipse. osgi. Framework. Internal. Core. bundlehost. startworker (bundlehost. Java: 352)
At org. Eclipse. osgi. Framework. Internal. Core. abstractbundle. Start (abstractbundle. Java: 280)
At org. Eclipse. osgi. Framework. util. secureaction. Start (secureaction. Java: 408)
At org. Eclipse. Core. runtime. Internal. adaptor. eclipselazystarter. postfindlocalclass (eclipselazystarter. Java: 111)
... 56 more
Caused by: Java. lang. illegalaccessexception: Class Org. eclipse. osgi. framework. internal. core. abstractbundle can not access a member of class COM. IBM. msdk. UI. threadanalysisplugin with modifiers "private"
At sun. Reflect. reflection. ensurememberaccess (reflection. Java: 65)
At java. Lang. Class. newinstance0 (class. Java: 349)
At java. Lang. Class. newinstance (class. Java: 308)
At org. Eclipse. osgi. Framework. Internal. Core. abstractbundle. loadbundleactivator (abstractbundle. Java: 152)
... 61 more
For example
As shown in
Solve this problem:
This problem occurs in my project because I changed the activator class constructor method to private to replace
The getinstance method obtains the singleton. Because of the plug-in loading mechanism of eclipse, the osgi frameword bundle all plug-in instances while loading all plug-ins, therefore, the internal mechanism calls an instance without a parameter constructor, so activator cannot use the singleton mode like other classes, because activator is already a global Singleton, the activator instance always exists throughout the life cycle, so this problem may be caused by unauthorized modification of the original constructor method.