| Summary: | [EPP Photon RC3] java.lang.NoClassDefFoundError: org/eclipse/linuxtools/docker/core/IDockerConnection | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] EPP | Reporter: | Bernd Hufmann <bernd.hufmann> | ||||
| Component: | cpp-package | Assignee: | Project Inbox <epp.packager-inbox> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | cdtdoug, jjohnstn, jonah, malaperle, mirec.z, rgrunber | ||||
| Version: | unspecified | ||||||
| Target Milestone: | later | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/124371 https://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=b2366f4a815b1e48ec9f0927be6f922faf6dae73 https://git.eclipse.org/r/124372 https://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=4fd02d33ce82c80eb23bc45595159a40c2777a4a |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Bernd Hufmann
What I did is to import and existing project to a new workspace (C/C++ project). Then in the ProjectExplorer, I did a single selection (e.g. Project) and the I get a pop-up with and exception. I copied the stack back trace to the bug. I'm using 20180607-0625_eclipse-cpp-photon-RC3-linux.gtk.x86_64.tar.gz downloaded from here: https://ci.eclipse.org/packaging/job/photon.epp-tycho-build/307/artifact/org.eclipse.epp.packages/archive/ (In reply to Bernd Hufmann from comment #2) > I'm using 20180607-0625_eclipse-cpp-photon-RC3-linux.gtk.x86_64.tar.gz > downloaded from here: > > https://ci.eclipse.org/packaging/job/photon.epp-tycho-build/307/artifact/org. > eclipse.epp.packages/archive/ Could you provide details of the Error Log? The bug above appears to be the Docker Core plug-in is not loading for you (IDockerConnection is a basic class for many releases now). I have the Linux x86_64 version of the CPP EPP RC3 downloaded to my RHEL laptop and it works without such an issue. I have tried and so far have failed to reproduce this. Also running exactly same version.
This is the code causing the problem:
69: if (receiver instanceof IDockerConnection) {
70: return expectedValue.equals(((IDockerConnection) receiver)
71: .getState() == EnumDockerConnectionState.ESTABLISHED);
72: }
Clicking on virtually anything should cause line 69 to be hit, and clicking on an item in the Docker Explorer view will cause it to be true.
I have tried a few things, including attaching a debugger and I can step through that code without a problem.
Something strange is going on here.
Is there any other version of the docker plug-ins visible. I expect it to be these:
$ ll org.eclipse.linuxtools.docker.*
-rw-rw-r-- 1 jonah jonah 233883 Jun 7 07:37 org.eclipse.linuxtools.docker.core_4.0.0.201806061356.jar
-rw-rw-r-- 1 jonah jonah 51875 Jun 7 07:37 org.eclipse.linuxtools.docker.editor_1.0.0.201806061356.jar
-rw-rw-r-- 1 jonah jonah 925965 Jun 7 07:37 org.eclipse.linuxtools.docker.ui_4.0.0.201806061356.jar
(In reply to Jonah Graham from comment #4) > I have tried and so far have failed to reproduce this. Also running exactly > same version. > > This is the code causing the problem: > > 69: if (receiver instanceof IDockerConnection) { > 70: return expectedValue.equals(((IDockerConnection) receiver) > 71: .getState() == EnumDockerConnectionState.ESTABLISHED); > 72: } > > Clicking on virtually anything should cause line 69 to be hit, and clicking > on an item in the Docker Explorer view will cause it to be true. > > I have tried a few things, including attaching a debugger and I can step > through that code without a problem. > > Something strange is going on here. > > Is there any other version of the docker plug-ins visible. I expect it to be > these: > $ ll org.eclipse.linuxtools.docker.* > -rw-rw-r-- 1 jonah jonah 233883 Jun 7 07:37 > org.eclipse.linuxtools.docker.core_4.0.0.201806061356.jar > -rw-rw-r-- 1 jonah jonah 51875 Jun 7 07:37 > org.eclipse.linuxtools.docker.editor_1.0.0.201806061356.jar > -rw-rw-r-- 1 jonah jonah 925965 Jun 7 07:37 > org.eclipse.linuxtools.docker.ui_4.0.0.201806061356.jar As mentioned, the Docker plug-in is clearly failing to load on his system. The error log may provide a clue. If not, running with OSGI console may be required. Created attachment 274436 [details]
error log file
Attachment contains the Full error log file
Comment on attachment 274436 [details]
error log file
Jeff, I imagine you already saw this, and of course you were right, the bundle failed to load.
For my ease of reading the root cause exception -- trimmed down from the log:
!ENTRY org.eclipse.osgi 4 0 2018-06-11 16:11:06.986
!MESSAGE An error occurred while automatically activating bundle org.eclipse.linuxtools.docker.core (302).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.linuxtools.docker.core.Activator.start() of bundle org.eclipse.linuxtools.docker.core.
Caused by: java.lang.IllegalArgumentException: Host name may not be null
at org.apache.http.util.Args.containsNoBlanks(Args.java:81)
at org.apache.http.HttpHost.<init>(HttpHost.java:81)
at org.glassfish.jersey.apache.connector.ApacheConnector.<init>(ApacheConnector.java:255)
at org.glassfish.jersey.apache.connector.ApacheConnectorProvider.getConnector(ApacheConnectorProvider.java:115)
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:425)
at org.glassfish.jersey.client.ClientConfig$State.access$000(ClientConfig.java:90)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:122)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:119)
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:340)
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:733)
at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:135)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:105)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:101)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:620)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2628)
at com.spotify.docker.client.DefaultDockerClient.ping(DefaultDockerClient.java:502)
at org.eclipse.linuxtools.internal.docker.core.DockerConnection.ping(DockerConnection.java:375)
at org.eclipse.linuxtools.internal.docker.core.DockerConnection.open(DockerConnection.java:285)
at org.eclipse.linuxtools.internal.docker.core.DefaultTCPConnectionSettingsProvider.getConnectionSettings(DefaultTCPConnectionSettingsProvider.java:32)
at org.eclipse.linuxtools.internal.docker.core.DefaultDockerConnectionSettingsFinder.getKnownConnectionSettings(DefaultDockerConnectionSettingsFinder.java:210)
at org.eclipse.linuxtools.docker.core.DockerConnectionManager.reloadConnections(DockerConnectionManager.java:56)
at org.eclipse.linuxtools.docker.core.DockerConnectionManager.<init>(DockerConnectionManager.java:46)
at org.eclipse.linuxtools.docker.core.DockerConnectionManager.getInstance(DockerConnectionManager.java:40)
at org.eclipse.linuxtools.docker.core.Activator.start(Activator.java:41)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772)
(In reply to Bernd Hufmann from comment #6) > Created attachment 274436 [details] > error log file > > Attachment contains the Full error log file The code in question is trying to establish a connection to http://127.0.0.1:2375 and the underlying ping is seeing a host name which is null. The only thing I can think of off the top of my head is your /etc/hosts.conf file. Do you have 127.0.0.1 set up to be localhost, etc. or do you have nothing specified? The underlying calls could be trying to resolve the 127.0.0.1 into a host name which is unspecified. FWIW: my local /etc/hosts.conf file is as follows. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 New Gerrit change created: https://git.eclipse.org/r/124371 I am pushing a fix to handle the IllegalArgumentException gracefully. This will be in Linux Tools RC4. Gerrit change https://git.eclipse.org/r/124371 was merged to [stable-7.0]. Commit: http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=b2366f4a815b1e48ec9f0927be6f922faf6dae73 New Gerrit change created: https://git.eclipse.org/r/124372 Gerrit change https://git.eclipse.org/r/124372 was merged to [master]. Commit: http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=4fd02d33ce82c80eb23bc45595159a40c2777a4a (In reply to Jeff Johnston from comment #8) > (In reply to Bernd Hufmann from comment #6) > > Created attachment 274436 [details] > > error log file > > > > Attachment contains the Full error log file > > The code in question is trying to establish a connection to > http://127.0.0.1:2375 and the underlying ping is seeing a host name which > is null. > > The only thing I can think of off the top of my head is your /etc/hosts.conf > file. Do you have 127.0.0.1 set up to be localhost, etc. or do you have > nothing specified? The underlying calls could be trying to resolve the > 127.0.0.1 into a host name which is unspecified. > My /etc/hosts file has the settings below. Not clear to me if it is incorrectly setup. 127.0.0.1 localhost 127.0.0.1 localhost ip6-localhost ip6-loopback Fix in Gerrit patch makes sense. It handles such a case gracefully. Thanks for the quick response and fix. BR Bernd I've installed the nightly build today and the problem is not there anymore. Thanks Bernd In ApacheConnector prior to line 255, we have :
proxyUri = config.getProperty(ClientProperties.PROXY_URI);
if (proxyUri != null) {
final URI u = getProxyUri(proxyUri);
final HttpHost proxy = new HttpHost(u.getHost(), u.getPort(), u.getScheme());
...
u.getHost() is causing the illegal argument, so it would seem that for some reason proxyUri is set to something that might not be valid.
Looking further in DefaultDockerClient, I see as part of the constructor, updateProxy, which does :
final String proxyHost = System.getProperty("http.proxyHost");
if (proxyHost != null) {
config.property(ClientProperties.PROXY_URI, proxyHost + ":"
+ checkNotNull(System.getProperty("http.proxyPort"), "http.proxyPort"));
So I wonder if on the affected system, http.proxyHost might be set to something.
same here after clicking CTRL+A (Select All) in editor: java.lang.NoClassDefFoundError: org/eclipse/linuxtools/docker/core/IDockerConnection at org.eclipse.linuxtools.internal.docker.ui.propertytesters.ConnectionPropertyTester.isConnectionEstablished(ConnectionPropertyTester.java:67) at org.eclipse.linuxtools.internal.docker.ui.propertytesters.ConnectionPropertyTester.test(ConnectionPropertyTester.java:40) at org.eclipse.core.internal.expressions.Property.test(Property.java:58) at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:100) ..... final release 4.8 version I believe this bug either is no longer relevant, or is missing details. If this bug is still relevant, please make a comment and we'll move it to the correct project/component for further investigation. This change was made as part of a bulk change. |