Gradle 2.14-rc-4 still exhibits dependency resolution related class issues


(Danny Thomas) #1

Hi folks,

We’re still seeing failures in the tests where we were seeing these failures:

We’re seeing these failures in ProjectBuilder based tests (specifically https://github.com/nebula-plugins/nebula-test/blob/master/src/main/groovy/nebula/test/AbstractProjectSpec.groovy).

The problem appears to be the relocations - there are non-relocated string literal references to classnames:

package org.gradle.internal.impldep.org.cyberneko.html.xercesbridge;

...

    private static XercesBridge makeInstance() {
        String[] classNames = new String[]{"org.cyberneko.html.xercesbridge.XercesBridge_2_3", "org.cyberneko.html.xercesbridge.XercesBridge_2_2", "org.cyberneko.html.xercesbridge.XercesBridge_2_1", "org.cyberneko.html.xercesbridge.XercesBridge_2_0"};

Failures are:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.gradle.internal.impldep.org.cyberneko.html.xercesbridge.XercesBridge
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2041)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
	at org.gradle.internal.resource.transport.http.ApacheDirectoryListingParser.parse(ApacheDirectoryListingParser.java:54)
	at org.gradle.internal.resource.transport.http.HttpResourceLister.list(HttpResourceLister.java:47)
	at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.list(DefaultExternalResourceConnector.java:70)
	at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.list(DefaultExternalResourceRepository.java:77)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listAll(ResourceVersionLister.java:141)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listRevisionToken(ResourceVersionLister.java:73)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.visit(ResourceVersionLister.java:54)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.listVersionsForAllPatterns(ExternalResourceResolver.java:134)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.doListModuleVersions(ExternalResourceResolver.java:123)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.access$100(ExternalResourceResolver.java:56)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.listModuleVersions(ExternalResourceResolver.java:405)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$1.run(CacheLockReleasingModuleComponentsRepository.java:62)
	at org.gradle.testfixtures.internal.InMemoryCacheFactory$InMemoryCache.longRunningOperation(InMemoryCacheFactory.java:115)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:56)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess.listModuleVersions(CacheLockReleasingModuleComponentsRepository.java:60)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.listModuleVersions(CachingModuleComponentRepository.java:280)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.listModuleVersions(BaseModuleComponentRepositoryAccess.java:38)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.listModuleVersions(InMemoryCachedModuleComponentRepository.java:68)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.listModuleVersions(ErrorHandlingModuleComponentRepository.java:80)
	... 36 more

Which is caused by:

Caused by: java.lang.ExceptionInInitializerError
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2041)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
	at org.gradle.internal.impldep.org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
	at org.gradle.internal.resource.transport.http.ApacheDirectoryListingParser.parse(ApacheDirectoryListingParser.java:54)
	at org.gradle.internal.resource.transport.http.HttpResourceLister.list(HttpResourceLister.java:47)
	at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.list(DefaultExternalResourceConnector.java:70)
	at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.list(DefaultExternalResourceRepository.java:77)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listAll(ResourceVersionLister.java:141)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listRevisionToken(ResourceVersionLister.java:73)
	at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.visit(ResourceVersionLister.java:54)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.listVersionsForAllPatterns(ExternalResourceResolver.java:134)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.doListModuleVersions(ExternalResourceResolver.java:123)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.access$100(ExternalResourceResolver.java:56)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.listModuleVersions(ExternalResourceResolver.java:405)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$1.run(CacheLockReleasingModuleComponentsRepository.java:62)
	at org.gradle.testfixtures.internal.InMemoryCacheFactory$InMemoryCache.longRunningOperation(InMemoryCacheFactory.java:115)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:56)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess.listModuleVersions(CacheLockReleasingModuleComponentsRepository.java:60)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.listModuleVersions(CachingModuleComponentRepository.java:280)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.listModuleVersions(BaseModuleComponentRepositoryAccess.java:38)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.listModuleVersions(InMemoryCachedModuleComponentRepository.java:68)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.listModuleVersions(ErrorHandlingModuleComponentRepository.java:80)
	... 36 more
Caused by: java.lang.ClassCastException: org.cyberneko.html.xercesbridge.XercesBridge_2_3 cannot be cast to org.gradle.internal.impldep.org.cyberneko.html.xercesbridge.XercesBridge
	at org.gradle.internal.impldep.org.cyberneko.html.xercesbridge.XercesBridge.newInstanceOrNull(XercesBridge.java:64)
	at org.gradle.internal.impldep.org.cyberneko.html.xercesbridge.XercesBridge.makeInstance(XercesBridge.java:54)
	at org.gradle.internal.impldep.org.cyberneko.html.xercesbridge.XercesBridge.<clinit>(XercesBridge.java:32)
	... 59 more

(Danny Thomas) #2

I should add: all of our tests are green otherwise, so the other issues we reported are all resolved.


(Sterling Greene) #3

Could you give this a try with RC6? Thanks!


(Danny Thomas) #4

Works on both RC5 and 6.