Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313387 - Unable to access org.apache.commons.httpclient.HttpClient after an update from M7 to RC1
Summary: Unable to access org.apache.commons.httpclient.HttpClient after an update fro...
Status: CLOSED DUPLICATE of bug 313502
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: RC2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 12:20 EDT by Daniel Le Berre CLA
Modified: 2017-09-19 16:42 EDT (History)
3 users (show)

See Also:
sven.efftinge: helios+


Attachments
apache httpclient jar file (313.80 KB, application/x-java-archive)
2010-05-18 13:39 EDT, Daniel Le Berre CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Le Berre CLA 2010-05-18 12:20:50 EDT
I updated yesterday my 3.6 M7 eclipse environment by 3.6 RC1.

I noticed this afternoon that I was unable to use access any update site.
(thus I can no longer update or add anything to my environment :()

The problem is coming from a classpath problem with org.apache.commons.httpclient.HttpClient. The jar file has been correctly installed in the plugins folder.

Here is the error.

java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpClient
at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientBrowseFileTransferFactory$1.sendBrowseRequest(HttpClientBrowseFileTransferFactory.java:53)
at org.eclipse.ecf.provider.filetransfer.browse.MultiProtocolFileSystemBrowserAdapter.sendBrowseRequest(MultiProtocolFileSystemBrowserAdapter.java:95)
at org.eclipse.equinox.internal.p2.repository.FileInfoReader.sendBrowseRequest(FileInfoReader.java:181)
at org.eclipse.equinox.internal.p2.repository.FileInfoReader.getRemoteFiles(FileInfoReader.java:107)
at org.eclipse.equinox.internal.p2.repository.FileInfoReader.getRemoteFile(FileInfoReader.java:123)
at org.eclipse.equinox.internal.p2.repository.FileInfoReader.getLastModified(FileInfoReader.java:128)
at org.eclipse.equinox.internal.p2.repository.RepositoryTransport.getLastModified(RepositoryTransport.java:219)
at org.eclipse.equinox.internal.p2.repository.CacheManager.createCache(CacheManager.java:132)
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory.getLocalFile(CompositeMetadataRepositoryFactory.java:74)
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory.load(CompositeMetadataRepositoryFactory.java:99)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:713)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:661)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.doLoad(LoadMetadataRepositoryJob.java:115)
at org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob.runModal(LoadMetadataRepositoryJob.java:100)
at org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler$2.runModal(PreloadingRepositoryHandler.java:82)
at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Pascal Rapicault CLA 2010-05-18 12:52:25 EDT
Could you please attach the jar file in question. 
If you try restarting with -clean, does it help?
Comment 2 Daniel Le Berre CLA 2010-05-18 13:39:29 EDT
Created attachment 168976 [details]
apache httpclient jar file
Comment 3 Daniel Le Berre CLA 2010-05-18 13:40:20 EDT
starting eclipse with -clean does not solve the problem.

I also have that warning in the console:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Comment 4 Thomas Watson CLA 2010-05-19 10:41:50 EDT

    /** Log object for this class. */
    private static final Log LOG = LogFactory.getLog(HttpClient.class);
java.lang.NoClassDefFoundError: Could not initialize class

I think this indicates that there is a exception in the static initialization of the HttpClient class.  I can not reproduce.  I updated from a fresh M7 to RC1 and then was able to update to the latest I-Build.  Could you debug the static initialization of the HttpClient class to see what is failing?

The following is the static initialization code that could have a failure.



    static {
        
        if (LOG.isDebugEnabled()) {
            try {
                LOG.debug("Java version: " + System.getProperty("java.version"));
                LOG.debug("Java vendor: " + System.getProperty("java.vendor"));
                LOG.debug("Java class path: " + System.getProperty("java.class.path"));
                LOG.debug("Operating system name: " + System.getProperty("os.name"));
                LOG.debug("Operating system architecture: " + System.getProperty("os.arch"));
                LOG.debug("Operating system version: " + System.getProperty("os.version"));

                Provider[] providers = Security.getProviders();
                for (int i = 0; i < providers.length; i++) {
                    Provider provider = providers[i];
                    LOG.debug(provider.getName() + " " + provider.getVersion()
                       + ": " + provider.getInfo());   
                }
            } catch (SecurityException ignore) {
            }
        }
    }
Comment 5 Daniel Le Berre CLA 2010-05-19 12:14:06 EDT
Using the debugger, I could find that the problem is coming from

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

The problem is actually due to Xtext 1.0.0 v20100504 (www.eclipse.org/Xtext) that I installed in that environment.

Removing it fixes the issue.

However, since Xtext is part of the release train, I think that this issue needs some attention.
Comment 6 Sven Efftinge CLA 2010-05-19 14:42:00 EDT
any idea how we can reproduce it? it seems that noone else faces such problems
Comment 7 Thomas Watson CLA 2010-05-19 14:52:26 EDT
(In reply to comment #6)
> any idea how we can reproduce it? it seems that noone else faces such problems

Not sure that is true.  See bug313502.
Comment 8 Daniel Le Berre CLA 2010-05-19 15:17:04 EDT
You are right Thomas. This is exactly the problem I face.  Thanks for pointing us that bug.

*** This bug has been marked as a duplicate of bug 313502 ***
Comment 9 Karsten Thoms CLA 2017-09-19 16:42:34 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.