|
|
|
|
Re: NoClassDefFoundError: com/ibm/icu/text/MessageFormat [message #304469 is a reply to message #304455] |
Wed, 07 June 2006 18:53 |
John O'Shea Messages: 43 Registered: July 2009 |
Member |
|
|
This is a multi-part message in MIME format.
--------------080403000108050803080406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I've tracked down the cause of this but I'm not sure if the behavior is
a bug in the OSGi classloader implementation. If someone more familiar
with the equinox implementation could give their opinion it might mean
one less bogus entry in bugzilla.
When debugging this issue I discovered that one of our plugins
internally contains (and exports the packages of) an icu4j v2.8 jar
file. This version of ICU does contain a com.ibm.icu.text package but
not a com.ibm.icu.text.MessageFormat class.
During startup, when the workbench was initializing the JDT Package
Explorer the OSGi classloaders got a bit lost while trying to load the
MessageFormat class. It ended up trying to load the class from our
bundle, rather than from the com.ibm.icu bundle.
See attached stack trace and variable dump (stack_vars.txt) illustrating
that the bundle classloaders
a) have determined that the package (com.ibm.icu.text) is an Imported
Source package.
b) use an 'invalid' PackageSource (SingleSourcePackage) instance to try
subsequently load the class (MessageFormat).
The problem seems to be that the 'BundleLoader#importedSources'
KeyedHashSet for "org.eclipse.jdt.ui_3.2.0.v20060526-0010" plugin has
only an entry, pointing to our bundle.
(For reference, our plugin does declare that it exports the
com.ibm.icu... packages from the jar it contains, but again, I can't
figure out how that bundle ended up in importedsources!)
So the question is , are we wrong to export the com.ibm.icu packages
from our plugin or might this be a bug?
cheers,
John.
John O'Shea wrote:
> I found an explanation as to why "Import-Package:" is being used at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=132749
>
> However, it still isn't clear to me a) how the plugin supplying this
> package is found at runtime by the OSGi runtime and b) why this
> mechanism stops working when I add my feature/plugins (that do not use
> ICU or integrate with JDT UI in any way)...
>
> John.
>
> John O'Shea wrote:
>> Daniel Megert wrote:
>>>> I'm having a bit of a problem starting up Eclipse 3.2RC6 (see the
>>>> stack trace below from the Error Log).
>>>
>>> Make sure you install it into an empty directory.
>>
>> Yes, I am installing into a new directory. I've distilled my test
>> case a little and I've determined that the 'clean' Eclipse 3.2RC6
>> installation boots up fine until I unzip my feature/plugins in on top
>> of it. Then it fails at startup with the NoClassDefFound message.
>> (I clean the configuration and workspace in between each restart to
>> make sure it isn't carrying over any cached OSGi bundle data)
>>
>> The odd thing is the zip containing my feature/plugins does not
>> overwrite or replace any platform plugins. So I'm still thinking
>> something is going wrong in OSGi classloading layer but it's pretty
>> difficult to debug.
>>
>> I'll try a debug launch from another (working) workbench and see if
>> that shows any more. Does anyone know if there are useful OSGi trace
>> entries (to put into .options files) that I could enable on the
>> command line that might help me track down why JDT suddenly looses the
>> ability to load this ICU class?
--------------080403000108050803080406
Content-Type: text/plain;
name="stack_vars.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stack_vars.txt"
this BundleLoader (id=5529)
bundle BundleHost (id=5564)
classloader DefaultClassLoader (id=5530)
dynamicImportPackages null
dynamicImportPackageStems null
exportedPackages ArrayList (id=5568)
importedSources KeyedHashSet (id=5576)
capacity 1
elementCount 1
elements KeyedElement[7] (id=5586)
[0] null
[1] null
[2] SingleSourcePackage (id=5534)
expid -1
id "com.ibm.icu.text"
supplier BundleLoaderProxy (id=5545)
bundle BundleHost (id=5634)
bundledata BaseData (id=5655)
activator null
adaptor BaseAdaptor (id=5719)
bundle BundleHost (id=5634)
bundleFile DirBundleFile (id=5722)
classpath "textschema.jar,icu4j-2_8.jar,xpp3-1_1_3_2.jar,resource"
dirty false
dynamicImports null
executionEnvironment null
fileName " F:/joshea/ziptest/ant/eclipse/plugins/com.capeclear.textsche ma.runtime_6.6.150.0/ "
id 33
lastModified 1149703866743
location "update@plugins/com.capeclear.textschema.runtime_6.6.150.0/"
manifest CachedManifest (id=5729)
startLevel 4
status 1
storageHooks StorageHook[2] (id=5734)
symbolicName "com.capeclear.textschema.runtime"
type 8
version Version (id=5738)
context BundleContextImpl (id=5658)
domain null
fragments null
framework Framework (id=5662)
manifestLocalization null
proxy BundleLoaderProxy (id=5545)
state 32
statechangeLock Object (id=5665)
stateChanging null
description BundleDescriptionImpl (id=5632)
bundleId 33
containingState SystemState (id=5698)
dependencies ArrayList (id=5702)
dependents ArrayList (id=5703)
equinox_ee -1
host null
lazyData BundleDescriptionImpl$LazyData (id=5704)
lazyDataOffset 150267
lazyDataSize 2068
name "com.capeclear.textschema.runtime"
stateBits 219
userObject BundleLoaderProxy (id=5545)
version Version (id=5708)
loader BundleLoader (id=5639)
bundle BundleHost (id=5634)
classloader DefaultClassLoader (id=5692)
dynamicImportPackages null
dynamicImportPackageStems null
exportedPackages ArrayList (id=5693)
importedSources null
loaderFlags 1
parent BaseAdaptor$ParentClassLoader (id=5578)
policy null
proxy BundleLoaderProxy (id=5545)
reexportTable null
requiredBundles BundleLoaderProxy[1] (id=5713)
requiredSources KeyedHashSet (id=5714)
pkgSources KeyedHashSet (id=5640)
capacity 7
elementCount 2
elements KeyedElement[14] (id=5667)
[0] null
[1] null
[2] null
[3] null
[4] null
[5] null
[6] null
[7] null
[8] null
[9] SingleSourcePackage (id=5534)
expid -1
id "com.ibm.icu.text"
supplier BundleLoaderProxy (id=5545)
[10] null
[11] null
[12] SingleSourcePackage (id=5673)
[13] null
replace false
stale false
[3] null
[4] null
[5] null
[6] null
replace false
loaderFlags 1
parent BaseAdaptor$ParentClassLoader (id=5578)
policy null
proxy BundleLoaderProxy (id=5563)
reexportTable null
requiredBundles BundleLoaderProxy[25] (id=5581)
requiredSources KeyedHashSet (id=5583)
Thread [main] (Suspended)
org.eclipse.osgi.framework.internal.core.BundleLoader.findIm portedSource(java.lang.String) line: 874
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(java.lang.String, boolean) line: 376
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(java.lang.String) line: 352
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(java.lang.String, boolean) line: 83
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader(jav a.lang.ClassLoader).loadClass(java.lang.String) line: 235
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader(jav a.lang.ClassLoader).loadClassInternal(java.lang.String) line: 302
org.eclipse.jdt.internal.corext.util.Messages.format(java.la ng.String, java.lang.Object) line: 23
org.eclipse.jdt.internal.ui.filters.FilterDescriptor.createV iewerFilter() line: 121
org.eclipse.jdt.ui.actions.CustomFiltersActionGroup.updateBu iltInFilters() line: 510
org.eclipse.jdt.ui.actions.CustomFiltersActionGroup.installF ilters() line: 474
org.eclipse.jdt.ui.actions.CustomFiltersActionGroup.<init>(java.lang.String, org.eclipse.jface.viewers.StructuredViewer) line: 232
org.eclipse.jdt.ui.actions.CustomFiltersActionGroup.<init>(org.eclipse.ui.IViewPart, org.eclipse.jface.viewers.StructuredViewer) line: 212
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActio nGroup. <init> (org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart ) line: 128
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart. makeActions() line: 917
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart. createPartControl(org.eclipse.swt.widgets.Composite) line: 632
org.eclipse.ui.internal.ViewReference.createPartHelper() line: 332
org.eclipse.ui.internal.ViewReference.createPart() line: 197
org.eclipse.ui.internal.ViewReference(org.eclipse.ui.interna l.WorkbenchPartReference).getPart(boolean) line: 566
org.eclipse.ui.internal.ViewPane(org.eclipse.ui.internal.Par tPane).setVisible(boolean) line: 290
org.eclipse.ui.internal.ViewPane.setVisible(boolean) line: 525
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(boolean) line: 140
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(org.eclipse.ui.presentations.IPresentablePart) line: 268
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(org.eclipse.ui.presentations.IPresentablePart) line: 65
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(org.eclipse.ui.presentations.IPresentableP art) line: 394
org.eclipse.ui.internal.ViewStack(org.eclipse.ui.internal.Pa rtStack).refreshPresentationSelection() line: 1144
org.eclipse.ui.internal.ViewStack(org.eclipse.ui.internal.Pa rtStack).setSelection(org.eclipse.ui.internal.LayoutPart) line: 1097
org.eclipse.ui.internal.ViewStack(org.eclipse.ui.internal.Pa rtStack).showPart(org.eclipse.ui.internal.LayoutPart, java.lang.Object) line: 1311
org.eclipse.ui.internal.ViewStack(org.eclipse.ui.internal.Pa rtStack).createControl(org.eclipse.swt.widgets.Composite, org.eclipse.ui.presentations.StackPresentation) line: 601
org.eclipse.ui.internal.ViewStack(org.eclipse.ui.internal.Pa rtStack).createControl(org.eclipse.swt.widgets.Composite) line: 532
org.eclipse.ui.internal.ViewSashContainer(org.eclipse.ui.int ernal.PartSashContainer).createControl(org.eclipse.swt.widge ts.Composite) line: 562
org.eclipse.ui.internal.PerspectiveHelper.activate(org.eclip se.swt.widgets.Composite) line: 244
org.eclipse.ui.internal.Perspective.onActivate() line: 815
org.eclipse.ui.internal.WorkbenchPage.onActivate() line: 2429
org.eclipse.ui.internal.WorkbenchWindow$6.run() line: 2616
org.eclipse.swt.custom.BusyIndicator.showWhile(org.eclipse.s wt.widgets.Display, java.lang.Runnable) line: 67
org.eclipse.ui.internal.WorkbenchWindow.setActivePage(org.ec lipse.ui.IWorkbenchPage) line: 2597
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(java.la ng.String, org.eclipse.core.runtime.IAdaptable) line: 658
org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(ja va.lang.String, org.eclipse.core.runtime.IAdaptable) line: 795
org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow() line: 1437
org.eclipse.ui.internal.Workbench.access$10(org.eclipse.ui.i nternal.Workbench) line: 1435
org.eclipse.ui.internal.Workbench$16.run() line: 1399
org.eclipse.ui.internal.Workbench.runStartupWithProgress(int , java.lang.Runnable) line: 1414
org.eclipse.ui.internal.Workbench.openFirstTimeWindow() line: 1397
org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWin dow() line: 190
org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor(org.eclipse. ui.application.WorkbenchAdvisor).openWindows() line: 708
org.eclipse.ui.internal.Workbench.init() line: 1085
org.eclipse.ui.internal.Workbench.runUI() line: 1847
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org. eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 419
org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse. swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 149
org.eclipse.ui.internal.ide.IDEApplication.run(java.lang.Obj ect) line: 95
org.eclipse.core.internal.runtime.PlatformActivator$1.run(ja va.lang.Object) line: 78
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(java.lang.Object) line: 92
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(java.lang.Object) line: 68
org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lan g.Object) line: 400
org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lan g.String[], java.lang.Runnable) line: 177
sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.refle ct.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]
sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object , java.lang.Object[]) line: 39
sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Ob ject, java.lang.Object[]) line: 25
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) line: 324
org.eclipse.core.launcher.Main.invokeFramework(java.lang.Str ing[], java.net.URL[]) line: 336
org.eclipse.core.launcher.Main.basicRun(java.lang.String[]) line: 280
org.eclipse.core.launcher.Main.run(java.lang.String[]) line: 977
org.eclipse.core.launcher.Main.main(java.lang.String[]) line: 952
--------------080403000108050803080406--
|
|
|
Re: NoClassDefFoundError: com/ibm/icu/text/MessageFormat [message #304488 is a reply to message #304469] |
Thu, 08 June 2006 11:19 |
|
John O'Shea wrote:
> I've tracked down the cause of this but I'm not sure if the behavior is
> a bug in the OSGi classloader implementation. If someone more familiar
> with the equinox implementation could give their opinion it might mean
> one less bogus entry in bugzilla.
>
> When debugging this issue I discovered that one of our plugins
> internally contains (and exports the packages of) an icu4j v2.8 jar
> file. This version of ICU does contain a com.ibm.icu.text package but
> not a com.ibm.icu.text.MessageFormat class.
> During startup, when the workbench was initializing the JDT Package
> Explorer the OSGi classloaders got a bit lost while trying to load the
> MessageFormat class. It ended up trying to load the class from our
> bundle, rather than from the com.ibm.icu bundle.
>
> See attached stack trace and variable dump (stack_vars.txt) illustrating
> that the bundle classloaders
> a) have determined that the package (com.ibm.icu.text) is an Imported
> Source package.
> b) use an 'invalid' PackageSource (SingleSourcePackage) instance to try
> subsequently load the class (MessageFormat).
>
> The problem seems to be that the 'BundleLoader#importedSources'
> KeyedHashSet for "org.eclipse.jdt.ui_3.2.0.v20060526-0010" plugin has
> only an entry, pointing to our bundle.
>
> (For reference, our plugin does declare that it exports the
> com.ibm.icu... packages from the jar it contains, but again, I can't
> figure out how that bundle ended up in importedsources!)
>
> So the question is , are we wrong to export the com.ibm.icu packages
> from our plugin or might this be a bug?
>
That's some mighty fine debugging. If I were you, I'd open the bug with
your information. It might be that the system can only handle a package
being exported from one bundle ... although that sounds a little
restrictive. But at least the equinox team will have a look at your
situation.
If you don't need to export the icu stuff from your plugins, I'd remove
the export and move forward.
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03709 seconds