jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bing-ok (Jira)" <j...@apache.org>
Subject [jira] [Updated] (JCLOUDS-1550) “NoSuchMethodErrors” due to multiple versions of com.google.guava:jar
Date Wed, 22 Jul 2020 11:33:00 GMT

     [ https://issues.apache.org/jira/browse/JCLOUDS-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bing-ok updated JCLOUDS-1550:
-----------------------------
    Description: 
Hi, there are multiple versions of _*com.google.guava:guava*_ in _*jclouds-master\providers\skalicloud-sdg-my*_.
As shown in the following dependency tree, according to Maven's “nearest wins” strategy,
only _*com.google.guava:guava:18.0*_ can be loaded, _*com.google.guava:guava:19.0*_ and _*com.google.guava:guava:22.0*_
will be shadowed.

As _*com.google.guava:guava:22.0*_ has not been loaded during the building process, several
methods are missing. However, the missing methods:
 1. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)>{noformat}
2. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.location.suppliers.all.ZoneToProvider: java.lang.Object get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.location.suppliers.all.ZoneToProvider: java.util.Set get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)>
{noformat}
3. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedServices(java.lang.Iterable)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Iterables: boolean addAll(java.util.Collection,java.lang.Iterable)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterable: java.util.Iterator
iterator()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: void <init>(com.google.common.io.ByteSource,org.jclouds.io.ContentMetadata)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: org.jclouds.io.Payload
getNextPayload()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.ContentMetadataBuilder: org.jclouds.io.ContentMetadataBuilder contentMD5(com.google.common.hash.HashCode)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)>
{noformat}
4. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.util.ConcurrentOpenSocketFinder$3: boolean apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.base.Predicates$CompositionPredicate: boolean apply(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.location.functions.RegionToEndpoint: java.lang.Object apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.location.functions.RegionToEndpoint: java.net.URI apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)>{noformat}
5. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
builder()> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.elasticstack.ElasticStackApiMetadata: void <init>()> Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
<org.jclouds.elasticstack.ElasticStackApiMetadata$Builder: void <init>()> Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
<org.jclouds.rest.internal.BaseHttpApiMetadata$Builder: void <init>()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.reflect.Types2: com.google.common.reflect.TypeToken checkBound(com.google.common.reflect.TypeToken)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)>{noformat}
6. _*com.google.common.net.HostAndPort: java.lang.String getHost()*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen: boolean
apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen: boolean
apply(com.google.common.net.HostAndPort)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.net.HostAndPort: java.lang.String getHost()>{noformat}
The above missing methods are actually referenced by _*com.google.guava:guava:22.0*_, which
will cause “NoSuchMethodErrors” at runtime.

Suggested fixing solutions:
 1. Upgrade dependency _*com.google.guava:guava*_ from _*18.0*_ to _*22.0*_.
 2. Use configuration attribute <dependencyManagement> to unify the version of library
_*com.google.guava:guava*_ to be _*22.0*_ in jclouds-master\providers\skalicloud-sdg-my's
pom file.

Please let me know which solution do you prefer? I can submit a PR to fix it.

Thank you very much for your attention.
 Best regards,

Dependency tree----

[INFO] org.apache.jclouds.provider:skalicloud-sdg-my:bundle:2.3.0-SNAPSHOT
 [INFO] +- org.apache.jclouds.api:elasticstack:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - org.apache.jclouds:jclouds-compute:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - org.apache.jclouds:jclouds-core:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - *(com.google.guava:guava:jar:18.0:compile - version managed from 22.0; omitted
for duplicate)*
 [INFO] +- org.apache.jclouds:jclouds-core:test-jar:tests:2.3.0-SNAPSHOT:test
 [INFO] | - *(com.google.guava:guava:jar:18.0:compile - version managed from 22.0; scope updated
from test; omitted for duplicate)*
 [INFO] +- com.google.auto.service:auto-service:jar:1.0-rc3:compile
 [INFO] | +- com.google.auto:auto-common:jar:0.3:compile
 [INFO] | | - *(com.google.guava:guava:jar:18.0:compile - version managed from 19.0; omitted
for duplicate)*
 [INFO] | - *com.google.guava:guava:jar:18.0:compile*
 [INFO] - org.assertj:assertj-guava:jar:1.3.0:test
 [INFO] - *(com.google.guava:guava:jar:18.0:test - omitted for duplicate)*

  was:
Hi, there are multiple versions of _*com.google.guava:guava*_ in _*jclouds-master\providers\skalicloud-sdg-my*_.
As shown in the following dependency tree, according to Maven's “nearest wins” strategy,
only _*com.google.guava:guava:18.0*_ can be loaded, _*com.google.guava:guava:19.0*_ and _*com.google.guava:guava:22.0*_
will be shadowed.

As _*com.google.guava:guava:22.0*_ has not been loaded during the building process, several
methods are missing. However, the missing methods:
 1. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)>{noformat}
2. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.location.suppliers.all.ZoneToProvider: java.lang.Object get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.location.suppliers.all.ZoneToProvider: java.util.Set get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)>
{noformat}
3. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedServices(java.lang.Iterable)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Iterables: boolean addAll(java.util.Collection,java.lang.Iterable)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterable: java.util.Iterator
iterator()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: void <init>(com.google.common.io.ByteSource,org.jclouds.io.ContentMetadata)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: org.jclouds.io.Payload
getNextPayload()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.io.ContentMetadataBuilder: org.jclouds.io.ContentMetadataBuilder contentMD5(com.google.common.hash.HashCode)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)>
{noformat}
4. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.util.ConcurrentOpenSocketFinder$3: boolean apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.base.Predicates$CompositionPredicate: boolean apply(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.location.functions.RegionToEndpoint: java.lang.Object apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.location.functions.RegionToEndpoint: java.net.URI apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)>{noformat}
5. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
builder()> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.elasticstack.ElasticStackApiMetadata: void <init>()> Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
<org.jclouds.elasticstack.ElasticStackApiMetadata$Builder: void <init>()> Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
<org.jclouds.rest.internal.BaseHttpApiMetadata$Builder: void <init>()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.reflect.Types2: com.google.common.reflect.TypeToken checkBound(com.google.common.reflect.TypeToken)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)>{noformat}
6. _*com.google.common.net.HostAndPort: java.lang.String getHost()*_
{noformat}
paths------
<org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
<com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
<org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen: boolean
apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen: boolean
apply(com.google.common.net.HostAndPort)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
<com.google.common.net.HostAndPort: java.lang.String getHost()>{noformat}
The above missing methods are actually referenced by _*com.google.guava:guava:22.0*_, which
will cause “NoSuchMethodErrors” at runtime.

Suggested fixing solutions:
 1. Upgrade dependency _*com.google.guava:guava*_ from _*18.0*_ to _*22.0*_.
 2. Use configuration attribute <dependencyManagement> to unify the version of library
_*com.google.guava:guava*_ to be _*22.0*_ in jclouds-master\providers\skalicloud-sdg-my's
pom file.

Please let me know which solution do you prefer? I can submit a PR to fix it.

Thank you very much for your attention.
 Best regards,

Dependency tree----

[INFO] org.apache.jclouds.provider:skalicloud-sdg-my:bundle:2.3.0-SNAPSHOT
 [INFO] +- org.apache.jclouds.api:elasticstack:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - org.apache.jclouds:jclouds-compute:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - org.apache.jclouds:jclouds-core:jar:2.3.0-SNAPSHOT:compile
 [INFO] | - (com.google.guava:guava:jar:18.0:compile - version managed from 22.0; omitted
for duplicate)
 [INFO] +- org.apache.jclouds:jclouds-core:test-jar:tests:2.3.0-SNAPSHOT:test
 [INFO] | - (com.google.guava:guava:jar:18.0:compile - version managed from 22.0; scope updated
from test; omitted for duplicate)
 [INFO] +- com.google.auto.service:auto-service:jar:1.0-rc3:compile
 [INFO] | +- com.google.auto:auto-common:jar:0.3:compile
 [INFO] | | - (com.google.guava:guava:jar:18.0:compile - version managed from 19.0; omitted
for duplicate)
 [INFO] | - com.google.guava:guava:jar:18.0:compile
 [INFO] - org.assertj:assertj-guava:jar:1.3.0:test
 [INFO] - (com.google.guava:guava:jar:18.0:test - omitted for duplicate)


> “NoSuchMethodErrors” due to multiple versions of com.google.guava:jar
> ---------------------------------------------------------------------
>
>                 Key: JCLOUDS-1550
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1550
>             Project: jclouds
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>            Reporter: Bing-ok
>            Priority: Major
>
> Hi, there are multiple versions of _*com.google.guava:guava*_ in _*jclouds-master\providers\skalicloud-sdg-my*_.
As shown in the following dependency tree, according to Maven's “nearest wins” strategy,
only _*com.google.guava:guava:18.0*_ can be loaded, _*com.google.guava:guava:19.0*_ and _*com.google.guava:guava:22.0*_
will be shadowed.
> As _*com.google.guava:guava:22.0*_ has not been loaded during the building process, several
methods are missing. However, the missing methods:
>  1. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object)>{noformat}
> 2. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <org.jclouds.compute.domain.internal.NullEqualToIsParentOrIsGrandparentOfCurrentLocation:
boolean apply(org.jclouds.compute.domain.ComputeMetadata)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <org.jclouds.location.suppliers.all.ZoneToProvider: java.lang.Object get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.location.suppliers.all.ZoneToProvider: java.util.Set get()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object,java.lang.Object)>
{noformat}
> 3. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedServices(java.lang.Iterable)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.collect.Iterables: boolean addAll(java.util.Collection,java.lang.Iterable)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterable: java.util.Iterator
iterator()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: void <init>(com.google.common.io.ByteSource,org.jclouds.io.ContentMetadata)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.io.internal.BasePayloadSlicer$ByteSourcePayloadIterator: org.jclouds.io.Payload
getNextPayload()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.io.ContentMetadataBuilder: org.jclouds.io.ContentMetadataBuilder contentMD5(com.google.common.hash.HashCode)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int)>
{noformat}
> 4. _*com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.compute.util.ConcurrentOpenSocketFinder$3: boolean apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Predicates$CompositionPredicate: boolean apply(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.location.functions.RegionToEndpoint: java.lang.Object apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.location.functions.RegionToEndpoint: java.net.URI apply(java.lang.Object)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,java.lang.Object,java.lang.Object)>{noformat}
> 5. _*com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
builder()> jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: void <init>()>
jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.elasticstack.ElasticStackApiMetadata: void <init>()> Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
> <org.jclouds.elasticstack.ElasticStackApiMetadata$Builder: void <init>()>
Repositories\org\apache\jclouds\api\elasticstack\2.3.0-SNAPSHOT\elasticstack-2.3.0-SNAPSHOT.jar
> <org.jclouds.rest.internal.BaseHttpApiMetadata$Builder: void <init>()> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.reflect.Types2: com.google.common.reflect.TypeToken checkBound(com.google.common.reflect.TypeToken)>
Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.base.Preconditions: void checkState(boolean,java.lang.String,java.lang.Object)>{noformat}
> 6. _*com.google.common.net.HostAndPort: java.lang.String getHost()*_
> {noformat}
> paths------
> <org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder: org.jclouds.skalicloud.SkaliCloudMalaysiaProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> jclouds-master\providers\skalicloud-sdg-my\target\classes
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
fromProviderMetadata(org.jclouds.providers.ProviderMetadata)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
id(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <org.jclouds.providers.internal.BaseProviderMetadata$Builder: org.jclouds.providers.internal.BaseProviderMetadata$Builder
linkedService(java.lang.String)> Repositories\org\apache\jclouds\jclouds-core\2.3.0-SNAPSHOT\jclouds-core-2.3.0-SNAPSHOT.jar
> <com.google.common.collect.Collections2$FilteredCollection: boolean add(java.lang.Object)>
Repositories\com\google\guava\guava\18.0\guava-18.0.jar
> <org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen:
boolean apply(java.lang.Object)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule$StubSocketOpen:
boolean apply(com.google.common.net.HostAndPort)> Repositories\org\apache\jclouds\jclouds-compute\2.3.0-SNAPSHOT\jclouds-compute-2.3.0-SNAPSHOT.jar
> <com.google.common.net.HostAndPort: java.lang.String getHost()>{noformat}
> The above missing methods are actually referenced by _*com.google.guava:guava:22.0*_,
which will cause “NoSuchMethodErrors” at runtime.
> Suggested fixing solutions:
>  1. Upgrade dependency _*com.google.guava:guava*_ from _*18.0*_ to _*22.0*_.
>  2. Use configuration attribute <dependencyManagement> to unify the version of
library _*com.google.guava:guava*_ to be _*22.0*_ in jclouds-master\providers\skalicloud-sdg-my's
pom file.
> Please let me know which solution do you prefer? I can submit a PR to fix it.
> Thank you very much for your attention.
>  Best regards,
> Dependency tree----
> [INFO] org.apache.jclouds.provider:skalicloud-sdg-my:bundle:2.3.0-SNAPSHOT
>  [INFO] +- org.apache.jclouds.api:elasticstack:jar:2.3.0-SNAPSHOT:compile
>  [INFO] | - org.apache.jclouds:jclouds-compute:jar:2.3.0-SNAPSHOT:compile
>  [INFO] | - org.apache.jclouds:jclouds-core:jar:2.3.0-SNAPSHOT:compile
>  [INFO] | - *(com.google.guava:guava:jar:18.0:compile - version managed from 22.0; omitted
for duplicate)*
>  [INFO] +- org.apache.jclouds:jclouds-core:test-jar:tests:2.3.0-SNAPSHOT:test
>  [INFO] | - *(com.google.guava:guava:jar:18.0:compile - version managed from 22.0; scope
updated from test; omitted for duplicate)*
>  [INFO] +- com.google.auto.service:auto-service:jar:1.0-rc3:compile
>  [INFO] | +- com.google.auto:auto-common:jar:0.3:compile
>  [INFO] | | - *(com.google.guava:guava:jar:18.0:compile - version managed from 19.0;
omitted for duplicate)*
>  [INFO] | - *com.google.guava:guava:jar:18.0:compile*
>  [INFO] - org.assertj:assertj-guava:jar:1.3.0:test
>  [INFO] - *(com.google.guava:guava:jar:18.0:test - omitted for duplicate)*



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message