You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I "glued" together (temporary?) automated bundle filtering for wildcard bundles loading while dealing with same issue. If anyone finds it useful feel free to use it.
-- Your bundles collectionlocalbundles=vim.split(vim.fn.glob(mason_path.."packages/java-*/extension/server/*.jar", 1),
'\n')
-- Paste it after bundles but before assigning bundles to jdtls-- Following filters out unwanted bundleslocalignored_bundles= { "com.microsoft.java.test.runner-jar-with-dependencies.jar", "jacocoagent.jar" }
localfind=string.findlocalfunctionshould_ignore_bundle(bundle)
for_, ignoredinipairs(ignored_bundles) doiffind(bundle, ignored, 1, true) thenreturntrueendendendbundles=vim.tbl_filter(function(bundle) returnbundle~="" andnotshould_ignore_bundle(bundle) end, bundles)
I'm sure there is better way but this seems to work good enough for now.
Discussed in #745
Originally posted by apechinsky January 23, 2025
The installation instructions for vscode-java-test lead to an error during jdtls-nvim initialization.
Configuration
JdtShowLogs
The problem is that the configuration adds all vscode-java-test JARs as bundles, but some of them are not OSGi bundles:
These files don't contain bundle information in the META-INF/MANIFEST.MF file.
eclipse.jdt.ls tries to access the missing Bundle-Version property:
https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BundleUtils.java#L335
and throws an exception:
https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BundleUtils.java#L175
Solution
Exclude the listed JARs from the bundle list.
The text was updated successfully, but these errors were encountered: