mat icon indicating copy to clipboard operation
mat copied to clipboard

NoClassDefFoundError

Open fedejeanne opened this issue 8 months ago • 5 comments

I opened a heap dump (HPROF file) and got java.lang.NoClassDefFoundError: com/ibm/icu/util/UResourceBundle. Diagrams are not visible, e.g. in the Top Consumers view:

Image

Stack trace

java.lang.NoClassDefFoundError: com/ibm/icu/util/UResourceBundle
	at org.eclipse.birt.chart.model.impl.ChartImpl.initialize(ChartImpl.java:1385)
	at org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl.initialize(ChartWithoutAxesImpl.java:571)
	at org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl.create(ChartWithoutAxesImpl.java:560)
	at org.eclipse.mat.impl.chart.ChartBuilder.create(ChartBuilder.java:79)
	at org.eclipse.mat.impl.chart.HtmlPieChartRenderer.embedd(HtmlPieChartRenderer.java:78)
	at org.eclipse.mat.report.internal.ResultRenderer.doProcess(ResultRenderer.java:343)
	at org.eclipse.mat.report.internal.ResultRenderer.process(ResultRenderer.java:265)
	at org.eclipse.mat.report.internal.QueryPart.execute(QueryPart.java:174)
	at org.eclipse.mat.report.internal.SectionPart.execute(SectionPart.java:70)
	at org.eclipse.mat.report.TestSuite.execute(TestSuite.java:134)
	at org.eclipse.mat.ui.QueryExecution.convertToHtml(QueryExecution.java:470)
	at org.eclipse.mat.ui.QueryExecution.displayResult(QueryExecution.java:159)
	at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:218)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.UResourceBundle cannot be found by org.eclipse.birt.chart.engine_4.12.0.v202211281949
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 14 more

Version

  • Eclipse Memory Analyzer Version 1.15.0

fedejeanne avatar May 21 '25 07:05 fedejeanne

I don't know if this is relevant but I recently updated from 1.11 by using: Help > Check for Updates.

I also noticed that the newer releases are smaller

Image

... and that starting with version 1.12 there is no com.ibm.icu_*.jar file under the plugins folder anymore

Image

It looks like a problem in the product configuration.

fedejeanne avatar May 21 '25 07:05 fedejeanne

Hi @fedejeanne, we still use and depend on com.ibm.icu: https://github.com/eclipse-mat/mat/blob/R_1.16.1/features/org.eclipse.mat.feature/feature.xml#L41

So I'm not sure what's happening. I'm guessing this is an issue in Eclipse rather than MAT itself. What version of Eclipse are you using? You can also try a standalone download from https://eclipse.dev/mat/download/

kgibm avatar May 23 '25 13:05 kgibm

It's a standalone version. I had the version 1.11 and I updated via Help > Check for Updates to version 1.15. That's when I noticed the missing class so I started looking into it and I noticed that the standalone versions (the ZIPs) got smaller and smaller through versions.

The screenshots in my previous comment (https://github.com/eclipse-mat/mat/issues/128#issuecomment-2896862172) are all from standalone versions (ZIPs) downloaded from https://eclipse.dev/mat/download/previous/

fedejeanne avatar May 23 '25 19:05 fedejeanne

I tried to reproduce by downloading MAT 1.11 and then checking for updates and the latest update available is 1.15. @krumts Shouldn't this be 1.16.1?

After that, I can reproduce the problem in this issue but it might make sense to figure out why you're upgrading to MAT 1.15 instead of 1.16.1.

kgibm avatar May 27 '25 18:05 kgibm

I assumed that upgrading to 1.15 could be some sort of fallback mechanism because 1.16.1 was offline at the time, but I have to admit that even that seemed off. When I try to update my Eclipse IDE to a version that is currently offline, I get 404 errors (annoying but expected).

fedejeanne avatar May 28 '25 08:05 fedejeanne

Thanks @fedejeanne for reporting this!

About the updates picking the 1.15.0 version - this was something I've overlooked when doing the 1.16 release - I haven't updated the "latest" update site (which is configured within the tool) to point to 1.16.1. This is now fixed.

I am not sure though, if updating from 1.11 to 1.16.1 would solve the NoClassDefFoundError issue. The MAT update sites contain only the MAT plugins and icu is coming with the Eclipse framework.

Is it an option for you to install the latest 1.16.1 instead of upgrading to it?

@kgibm I haven't tested all upgrade paths (also not the one from 1.11 to latest). I don't think we have a well defined policy for this. Any thoughts on what would be appropriate - upgrade from any older version, or update from the previous to latest, or anything in the middle?

krumts avatar Jun 13 '25 07:06 krumts

So I updated (Help > Check for Updates) and now I have 1.16 👍. As you suspected (@krumts) the problem persists 👎.

I'm still not able to download 1.16 from the download page:

Image

I get this 404:

Image

But to answer your question: Yes, downloading directly 1.16 is an option for me so once the download link is up, I can download 1.16 :-)

fedejeanne avatar Jun 13 '25 09:06 fedejeanne

Oh, I see now. This is on one side confusing, on the other side we have a broken link. The orange "download" button is present on all pages and should serve as a quick way to get you to the downloads page - the one which you already opened. From here, you should use the "text" links depending on your operating system:

Image

This will take you to a mirror selection page, and there there is again an orange download button which this time really triggers the download from the selected mirror.

So, the confusing part is, that the orange button on MAT's download page won't trigger the download itself, but should take you to the same page. I haven't thought of it this way so far, but see now why it is confusing. Furthermore, the link of the button on this page is broken after the changes to the tooling we use to build the website. I'll look into this one. Apologies for the inconvenience!

krumts avatar Jun 13 '25 12:06 krumts

Downloading 1.16 fixed my issue, thank you! 👏

Image

Feel free to close the issue once the orange button works as expected :-)

Have a nice day!

fedejeanne avatar Jun 23 '25 06:06 fedejeanne

Great news @fedejeanne. I'm going to close this as successful, thanks @krumts.

jasonk000 avatar Sep 01 '25 00:09 jasonk000