← All articles
Apache

Apache Directory Studio - An Error Has Occurred

An Apache Directory Studio installation that had been working normally began failing to launch on macOS after the system Java runtime was upgraded.

Version context: This troubleshooting note applies to Apache Directory Studio 2.0.0.v20130628 and the Java 7/Java 9 environment used when the issue was encountered. It is preserved as a historical compatibility fix rather than a recommendation for current Java or Apache Directory Studio releases.

Problem

Apache Directory Studio displayed an error immediately at startup:

The application log contained the following diagnostic output:



!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.common_3.6.100.v20120522-1841 [1]" could not be resolved. Reason: Missing Constraint: Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
  
  
View original Gist ↗

The log did not make the underlying compatibility problem especially obvious.

Root Cause

The failure began after Java 9 was installed on the Mac. This older Apache Directory Studio release was not able to run correctly with that Java runtime, even though it had worked previously with an older Java version.

The practical fix was to keep multiple Java versions installed and explicitly configure Apache Directory Studio to launch with Java 7.

Solution

  1. Install Java 7 alongside the newer Java version.
  2. Determine the Java 7 home directory:
/usr/libexec/java_home -v 1.7
  1. Open Applications in Finder.
  2. Right-click Apache Directory Studio.app and select Show Package Contents.
  3. Navigate to Contents → MacOS.
  4. Create ApacheDirectoryStudio.ini if it does not already exist.
  5. Configure the application to use the Java 7 runtime identified above.

The original configuration used was:



-vm
<Java_7_Location>/bin
View original Gist ↗

After saving the configuration, Apache Directory Studio launched successfully again.

Takeaway

When an Eclipse-based desktop tool suddenly stops launching after a Java upgrade, check runtime compatibility before assuming the application installation is corrupted. Pinning the application to a compatible Java runtime can isolate the tool from system-wide Java changes.