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

No Tests available ClassNotFoundException JavaElementLabels #1605

Closed
llgcode opened this issue Sep 18, 2023 · 6 comments
Closed

No Tests available ClassNotFoundException JavaElementLabels #1605

llgcode opened this issue Sep 18, 2023 · 6 comments

Comments

@llgcode
Copy link

llgcode commented Sep 18, 2023

Hi,
since today I can't see any tests to run, I see a strange stacktrace in ouput when opening a junit.

regards.

[Error - 4:03:10 PM] Sep 18, 2023, 4:03:10 PM Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
org/eclipse/jdt/ls/core/internal/hover/JavaElementLabels
java.lang.NoClassDefFoundError: org/eclipse/jdt/ls/core/internal/hover/JavaElementLabels
	at com.microsoft.java.test.plugin.model.builder.JavaTestItemBuilder.build(JavaTestItemBuilder.java:75)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.findTestItemsInTypeBinding(TestSearchUtils.java:405)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.findTestTypesAndMethods(TestSearchUtils.java:375)
	at com.microsoft.java.test.plugin.handler.TestDelegateCommandHandler.executeCommand(TestDelegateCommandHandler.java:60)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:612)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels cannot be found by com.microsoft.java.test.plugin_0.39.1
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 16 more

[Error - 4:03:10 PM] Sep 18, 2023, 4:03:10 PM Error in calling delegate command handler
org/eclipse/jdt/ls/core/internal/hover/JavaElementLabels
java.lang.NoClassDefFoundError: org/eclipse/jdt/ls/core/internal/hover/JavaElementLabels
	at com.microsoft.java.test.plugin.model.builder.JavaTestItemBuilder.build(JavaTestItemBuilder.java:75)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.findTestItemsInTypeBinding(TestSearchUtils.java:405)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.findTestTypesAndMethods(TestSearchUtils.java:375)
	at com.microsoft.java.test.plugin.handler.TestDelegateCommandHandler.executeCommand(TestDelegateCommandHandler.java:60)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:612)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels cannot be found by com.microsoft.java.test.plugin_0.39.1
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 16 more

Extension version: 0.39.1
VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z)
OS version: Windows_NT x64 10.0.19044
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.78GB (13.42GB free)
Process Argv --folder-uri file:///e%3A/ws/repo-esp --crash-reporter-id b0a9d965-3665-427b-a548-a0ebe225abb1
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
3biah626:30602489
89544117:30613380
a9j8j154:30646983
showlangstatbar:30737416
0bi6i642:30835152
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
dsvsc015cf:30829746

@llgcode
Copy link
Author

llgcode commented Sep 18, 2023

Seems to correspond to this commit:
eclipse-jdtls/eclipse.jdt.ls@bae72c2

It feels like your build dependencies are not sync with runtime deps

@llgcode
Copy link
Author

llgcode commented Sep 18, 2023

I've uninstall/install the java bundle extensions and it works now.
I don't know what happen ?!!

@llgcode llgcode closed this as completed Sep 18, 2023
@jdneo
Copy link
Member

jdneo commented Sep 19, 2023

Maybe some OSGi cache issues? Anyway, it's good to know problem is gone.

@zergeborg
Copy link

@jdneo Can this may be reopened? I see the exact same error on my Mac using v0.39.1 of this plugin. But even downgrading the extension did not help.

@jdneo
Copy link
Member

jdneo commented Oct 12, 2023

@zergeborg
Copy link

@jdneo Thanks for the prompt response! I can confirm the error is gone with 0.40.0

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