Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of ICU classes #3

Open
jensli opened this issue Feb 9, 2024 · 4 comments
Open

Usage of ICU classes #3

jensli opened this issue Feb 9, 2024 · 4 comments

Comments

@jensli
Copy link

jensli commented Feb 9, 2024

I get an exception like this when I try to open an XML file with the XML editor from WST:

NoClassDefFoundError: com/ibm/icu/util/StringTokenizer
at org.eclipse.wst.sse.core.utils.StringUtils.unpack(StringUtils.java:777)

It turned out I had version 1.2.800 of org.eclipse.wst.sse.core which was to old and the following fix hadn't landed:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=580788

Anyway, the reason the ICU dependency had to changed to be required in 96cd1af is that it is no longer shipped with the platform. See this issue for details: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562582

The reason for that is that there are standard library classes that work just as well.

For example, com.ibm.icu.util.StringTokenizer can be replaced by java.util.StringTokenizer. The java.text package can be used in many other cases.

I'd like to suggest to the maintainers of this project to also migrate away from ICU! It will probably simplify things in the future.

@jensli jensli changed the title Missing ICU classes Usage of ICU classes Feb 9, 2024
@ax-lothas
Copy link

I get this error:

Plug-in: org.eclipse.core.jobs
Severity: Error
Message: An internal error occurred during: "SSE core task scheduler startup".

Exception Stack Trace:

java.lang.NoClassDefFoundError: com/ibm/icu/util/StringTokenizer
	at org.eclipse.wst.sse.core.utils.StringUtils.unpack(StringUtils.java:777)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.getScannedProjects(TaskScanningJob.java:295)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.projectHasNotBeenFullyScanned(TaskScanningJob.java:152)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.addProject(TaskScanningJob.java:118)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler.enqueue(TaskScanningScheduler.java:137)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler.startup(TaskScanningScheduler.java:117)
	at org.eclipse.wst.sse.core.internal.SSECorePlugin.lambda$0(SSECorePlugin.java:96)
	at org.eclipse.core.runtime.jobs.Job$1.run(Job.java:166)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.StringTokenizer cannot be found by org.eclipse.wst.sse.core_1.2.700.v202107272335
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:562)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:507)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 9 more

Session Data:

eclipse.buildId=4.33.0.I20240903-0240
java.version=21.0.3
java.vendor=Microsoft
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -eclipse.keyring C:\Users\***
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -eclipse.keyring C:\Users\***

and this one:

Plugin-in: org.eclipse.core.resource
Severity: Error
Message: Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".

Exception Stack Trace:

java.lang.NoClassDefFoundError: com/ibm/icu/util/StringTokenizer
	at org.eclipse.wst.sse.core.utils.StringUtils.unpack(StringUtils.java:777)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.getScannedProjects(TaskScanningJob.java:295)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.addProjectDelta(TaskScanningJob.java:79)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler$ListenerVisitor.visit(TaskScanningScheduler.java:56)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
	at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:61)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningScheduler$ListenerVisitor.resourceChanged(TaskScanningScheduler.java:38)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:321)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:311)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:174)
	at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:459)
	at org.eclipse.core.internal.resources.Workspace.checkpoint(Workspace.java:655)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.lambda$0(PerformChangeOperation.java:252)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2451)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2476)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:284)
	at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:94)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:210)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2451)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2476)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.StringTokenizer cannot be found by org.eclipse.wst.sse.core_1.2.700.v202107272335
	... 24 more

Same Session Data.

(I first reported it to eclipse-platform/eclipse.platform#1613 but was redirected to this repository.)

@nitind
Copy link
Contributor

nitind commented Nov 12, 2024

Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.StringTokenizer cannot be found by org.eclipse.wst.sse.core_1.2.700.v202107272335

You somehow have a org.eclipse.wst.sse.core bundle version from 2021 in your 2024 Eclipse release, instead of one also from 2024. Please check for updates from https://download.eclipse.org/releases/latest.

@nitind
Copy link
Contributor

nitind commented Nov 12, 2024

Anyway, the reason the ICU dependency had to changed to be required in 96cd1af is that it is no longer shipped with the platform. See this issue for details: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562582

It is, however, still used by JDT and EMF. As you found, your error is more from having an old bundle version at the time, and while this is still a good change to make, it's very low priority.

@ax-lothas
Copy link

Caused by: java.lang.ClassNotFoundException: com.ibm.icu.util.StringTokenizer cannot be found by org.eclipse.wst.sse.core_1.2.700.v202107272335

You somehow have a org.eclipse.wst.sse.core bundle version from 2021 in your 2024 Eclipse release, instead of one also from 2024. Please check for updates from https://download.eclipse.org/releases/latest.

Thanks for your quick answer. The update site was already set up and checking for updates found nothing. I also added https://download.eclipse.org/eclipse/updates/latest and somehow that did the trick - although no updates were installed as far as I can tell.

Anyhow, I decided to go with a freshly unzipped Eclipse and that works. Thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants