-
Notifications
You must be signed in to change notification settings - Fork 19
Plugin fails to load on DBeaver (Arch Linux): upstream 5.x JAR requires org.apache.httpcomponents.httpclient not bundled in DBeaver's RCP #62
Description
Summary
On DBeaver (Arch Linux), the WakaTime plugin installed via Help → Install New Software fails to load silently. The File → WakaTime menu item never appears, and the log shows:
org.osgi.framework.BundleException: Could not resolve module: com.wakatime.eclipse.plugin [333]
Unresolved requirement: Require-Bundle: org.apache.httpcomponents.httpclient
Root Cause
DBeaver is an Eclipse RCP application — it ships a stripped-down subset of the Eclipse platform. It does not include org.apache.httpcomponents.httpclient (HttpClient 4.x as an OSGi bundle).
The upstream com.wakatime.eclipse.plugin_5.1.0.jar (and earlier 5.x versions) declares in its MANIFEST.MF:
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui.ide,
org.eclipse.jface.text,
org.apache.httpcomponents.httpclient, ← not in DBeaver
org.apache.httpcomponents.httpcore, ← not in DBeaver
org.eclipse.ui.workbench.texteditor
OSGi (which DBeaver uses for its plugin system) cannot resolve the bundle because those two Require-Bundle entries have no match in DBeaver's runtime. The plugin silently fails to load — no error dialog, no log message visible to the user, just an absent menu item.
Why it's hard to diagnose
- The failure happens in the user configuration area (
~/.eclipse/org.jkiss.dbeaver.product_<hash>/plugins/), not the system installation. - When DBeaver is installed from the Arch Linux
extrarepository, the package ships its own patched5.1.0JAR at/usr/lib/dbeaver/plugins/with the httpclient dependency removed. But if the user has ever used Help → Install New Software to install the plugin, a separate copy of the upstream JAR is placed in~/.eclipse/.../plugins/— which takes priority over the system one. - The user ends up with two JARs named identically (
com.wakatime.eclipse.plugin_5.1.0.jar) but with different contents and differentMANIFEST.MFfiles.
How to Fix (for affected users)
1. Identify the broken JAR
# Find all copies of the plugin JAR
find ~/.eclipse /usr/lib/dbeaver -name "com.wakatime.eclipse.plugin_*.jar" 2>/dev/null
# Check each manifest for the httpclient dependency
for jar in $(find ~/.eclipse -name "com.wakatime.eclipse.plugin_*.jar" 2>/dev/null); do
echo "=== $jar ==="
unzip -p "$jar" META-INF/MANIFEST.MF | grep -E "Require-Bundle|Bundle-Version"
doneIf you see org.apache.httpcomponents.httpclient in the Require-Bundle of any JAR under ~/.eclipse/, that is the broken copy.
2. Fix: replace with a dependency-free JAR
The plugin does not actually need httpclient at runtime for basic time-tracking (the wakatime CLI handles all HTTP). The OSGi dependency can be removed:
Option A — Arch Linux users: copy the patched system JAR:
cp /usr/lib/dbeaver/plugins/com.wakatime.eclipse.plugin_5.1.0.jar \
~/.eclipse/org.jkiss.dbeaver.product_*/plugins/com.wakatime.eclipse.plugin_5.1.0.jarOption B — Other distros / manual install: rebuild the JAR with org.apache.httpcomponents.httpclient and org.apache.httpcomponents.httpcore removed from Require-Bundle in the manifest.
3. Clear the OSGi resolution cache
After replacing the JAR, OSGi's cached resolution state must be invalidated:
rm -f ~/.eclipse/org.jkiss.dbeaver.product_*/configuration/org.eclipse.osgi/framework.info.*
rm -f ~/.eclipse/org.jkiss.dbeaver.product_*/configuration/org.eclipse.osgi/.manager/.fileTable.*4. Restart DBeaver
File → WakaTime → API Key should now appear.
Suggested Fix for the Plugin Developers
The org.apache.httpcomponents.httpclient and org.apache.httpcomponents.httpcore bundle dependencies appear to be unnecessary for the plugin's core functionality (time-tracking is delegated to the wakatime-cli binary). If the plugin uses these bundles at all, it should use optional dependencies:
Require-Bundle: ...,
org.apache.httpcomponents.httpclient;resolution:=optional,
org.apache.httpcomponents.httpcore;resolution:=optional
This would allow the plugin to load in DBeaver and other non-full Eclipse installations while still using httpclient when available (e.g., in Eclipse IDE proper).
Alternatively, if httpclient is no longer used at all in the plugin source, removing it from Require-Bundle entirely would be the cleanest fix and would make the plugin work out of the box on DBeaver without any manual workarounds.
Environment
- DBeaver 26.0.0 (Arch Linux
extrarepo) - eclipse-wakatime 5.1.0 (installed via Help → Install New Software from local update-site)
- OS: Arch Linux (CachyOS), Java 25.0.2 (Arch Linux build)
- OSGi via Eclipse Equinox (DBeaver's embedded runtime)