Eclipse/Zend Studio error discovering available features

Some time ago I started getting the following error in Zend Studio 9.0.3 whenever I tried to update it or use the “Welcome” screen to activate installed features:

‘Discovering available features’ has encountered a problem.

An internal error occurred during: “Discovering available features”.

Here’s a pretty version of the error:

Discovering available features has encountered a problem

During my search for an answer I found that many Eclipse users had hit the same issue.

Today I finally bit the bullet and decided to solve the problem once and for all. I started by examining the log file, which is located in:

/path/to/your/workspace/.metadata/.log

The error starts off with this:

java.lang.ExceptionInInitializerError
at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientBrowseFileTransferFactory$1.
sendBrowseRequest(HttpClientBrowseFileTransferFactory.java:53)

After spending a few minutes investigating potential networking issues (firewall, proxy settings, etc), I realised that I was looking at the wrong end of the exception stack - d’oh!

Reading a little further down the exception stack I came across the following:

Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@1c6fed0 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category)

Now that I had the true source of the problem it was pretty easy to Google up the answer, which is that Commons Logging didn’t know which logging class to use.

So the solution, then, was to tell it which logging class to use, which is done by adding the following line to your ZendStudio.ini or eclipse.ini file:

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

I have no idea what I might have changed on my system (OS X Snow Leopard) that could have caused this problem. I don’t have any obscure Java stuff installed, either inside or outside of Eclipse, nor do I carry out any development work in Java that may have screwed up the classpath or some such thing. So if anybody has any ideas on the true cause of this problem, I’d be very grateful if you could drop a comment below.

Yet Another Programming Blog

Where James Gordon rambles about PHP and web development in general.

Find me on Twitter Find me on Stack Exchange Find me on Github Subscribe