Skip to content

OAuth2ResourceServerSpecTests and OAuth2WebClientControllerTests fail #9421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
manueljordan opened this issue Feb 9, 2021 · 6 comments
Closed
Assignees
Labels
in: build An issue in the build status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@manueljordan
Copy link

With the project cloned (07 Feb 2021) in Windows 10 and then:

  • git remote add upstream URL
  • git fetch upstream
  • git merge upstream/master

With JAVA_HOME and java[c] --version, all for Java 8

  • gradlew.bat install
  • gradlew.bat clean
  • gradlew.bat build

The third task fails with:

> Task :spring-security-samples-boot-oauth2resourceserver-opaque:integrationTest
2021-02-09 09:25:43.378  INFO 11960 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

> Task :spring-security-samples-boot-oauth2webclient-webflux:test

sample.OAuth2WebClientControllerTests > implicitWhenAuthenticatedThenUsesDefaultRegistration FAILED
    java.lang.IllegalStateException at OAuth2WebClientControllerTests.java:69

> Task :spring-security-samples-boot-oauth2webclient:test
2021-02-09 09:26:04.142  INFO 20520 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2021-02-09 09:26:04.142  INFO 20520 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

> Task :spring-security-samples-boot-oauth2webclient-webflux:test FAILED

9 tests completed, 1 failed

> Task :spring-security-samples-boot-oauth2webclient:test
2021-02-09 09:26:06.258  INFO 20520 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

> Task :spring-security-samples-boot-saml2login:integrationTest
2021-02-09 09:26:11.969  INFO 388 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
09:26:38.356 [scheduler_Worker-4] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.serviceRegistryReloaderJobDetail
09:26:38.357 [scheduler_Worker-4] INFO org.jasig.cas.services.DefaultServicesManagerImpl - Reloading registered services.
09:26:38.357 [scheduler_Worker-4] DEBUG org.jasig.cas.services.DefaultServicesManagerImpl - Adding registered service ^(https?|imaps?)://.*
09:26:38.357 [scheduler_Worker-4] INFO org.jasig.cas.services.DefaultServicesManagerImpl - Loaded 1 services.
09:28:38.356 [scheduler_Worker-5] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.serviceRegistryReloaderJobDetail
09:28:38.356 [scheduler_Worker-5] INFO org.jasig.cas.services.DefaultServicesManagerImpl - Reloading registered services.
09:28:38.356 [scheduler_Worker-5] DEBUG org.jasig.cas.services.DefaultServicesManagerImpl - Adding registered service ^(https?|imaps?)://.*
09:28:38.356 [scheduler_Worker-5] INFO org.jasig.cas.services.DefaultServicesManagerImpl - Loaded 1 services.

> Task :spring-security-config:test

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > postWhenSignedThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > introspectWhenValidThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getJwtDecoderWhenTwoBeansWiredAndDslWiredThenDslTakesPrecedence FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenValidTokenAndPublicKeyInLambdaThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenValidUsingPlaceholderThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getJwtDecoderWhenNoBeansAndNoDslWiredThenWiringException FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenExpiredThenReturnsInvalidToken FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenCustomDecoderThenAuthenticatesAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > postWhenMissingTokenThenReturnsForbidden FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getJwtDecoderWhenBeanWiredAndDslWiredThenDslTakesPrecedence FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenExpiredTokenAndPublicKeyInLambdaThenReturnsInvalidToken FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUsingCustomAuthenticationManagerInLambdaThenUsesItAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenValidThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUsingCustomAuthenticationManagerResolverThenUsesItAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenTokenHasInsufficientScopeThenReturnsInsufficientScope FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getJwtDecoderWhenTwoBeansWiredThenThrowsWiringException FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > configureWhenUsingBothAuthenticationManagerResolverAndOpaqueThenWiringException FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenCustomBearerTokenEntryPointThenResponds FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUsingJwkSetUriThenConsultsAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenEmptyBearerTokenThenReturnsInvalidToken FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenSignedAndCustomConverterThenConverts FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUsingJwkSetUriInLambdaThenConsultsAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUsingCustomAuthenticationManagerThenUsesItAccordingly FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenCustomBearerTokenServerAuthenticationConverterThenResponds FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > introspectWhenValidAndIntrospectionInLambdaThenReturnsOk FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenUnsignedThenReturnsInvalidToken FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

org.springframework.security.config.web.server.OAuth2ResourceServerSpecTests > getWhenCustomBearerTokenDeniedHandlerThenResponds FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.BeanCreationException at AutowiredAnnotationBeanPostProcessor.java:405
            Caused by: java.io.UncheckedIOException at ResourceKeyConverterAdapter.java:87
                Caused by: java.io.FileNotFoundException at ClassPathResource.java:180

1938 tests completed, 27 failed

> Task :spring-security-config:test FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':spring-security-samples-boot-oauth2webclient-webflux:test'.
> There were failing tests. See the report at: file:///C:/blueroom/sts-workspace-spring-security/spring-security/samples/boot/oauth2webclient-webflux/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':spring-security-config:test'.
> There were failing tests. See the report at: file:///C:/blueroom/sts-workspace-spring-security/spring-security/config/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 12m 20s
534 actionable tasks: 408 executed, 3 from cache, 123 up-to-date

A build scan was not published as you have not authenticated with server 'ge.spring.io'.

88

The complete ourput is:

java.lang.IllegalStateException: Timeout on blocking read for 5000000000 NANOSECONDS
	at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:123)
	at reactor.core.publisher.Mono.block(Mono.java:1703)
	at org.springframework.test.web.reactive.server.DefaultWebTestClient$DefaultRequestBodyUriSpec.exchange(DefaultWebTestClient.java:354)
	at sample.OAuth2WebClientControllerTests.implicitWhenAuthenticatedThenUsesDefaultRegistration(OAuth2WebClientControllerTests.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.lang.Thread.run(Thread.java:748)
@manueljordan manueljordan added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Feb 9, 2021
@manueljordan manueljordan changed the title OAuth2ResourceServerSpecTests and OAuth2WebClientControllerTests fails OAuth2ResourceServerSpecTests and OAuth2WebClientControllerTests fail Feb 9, 2021
@manueljordan
Copy link
Author

Just in case, I see many Threads running

100

99

Even when I am able to remove all the instances (taskkill /F /PID id_number), if I execute the gradlew.bat build command, all of them appears, Of course with different numbers. It only happens on Windows, but not on Mac

@jzheaux
Copy link
Contributor

jzheaux commented Feb 9, 2021

@manueljordan, thanks for the report. The build is parallelized by default, which is why you see multiple processes created.

You might be able to simplify your analysis by running gradlew.bat build --no-parallel. Then, each module will be built serially.

@jzheaux jzheaux self-assigned this Feb 9, 2021
@jzheaux jzheaux added in: build An issue in the build and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 9, 2021
@manueljordan
Copy link
Author

Hello @jzheaux , understood - but according with my understanding that approach is better.
Remember when I build on Mac all go well.

Ok, I tried with gradlew.bat clean --no-parallel and works

With gradlew.bat build --no-parallel was helpful to find and fix the error, now one of those test classes pass. The problem was
I put wrong the Maven Local Repository path with -Dmaven.repo.local=$M2_REPO, and must be -Dmaven.repo.local=%M2_REPO%.

Now appeared other error, again for the same OAuth2ResourceServerSpecTests class, all its methods fails with:

Caused by: java.io.UncheckedIOException: java.io.FileNotFoundException: class path resource [C:/blueroom/sts-workspace-spring-security/spring-security//gradle/wrapper/gradle-wrapper.jar] cannot be opened because it does not exist
	at org.springframework.security.converter.ResourceKeyConverterAdapter.toInputStream(ResourceKeyConverterAdapter.java:87)
	at org.springframework.security.converter.ResourceKeyConverterAdapter.lambda$pemInputStreamConverter$0(ResourceKeyConverterAdapter.java:75)
	at org.springframework.core.convert.converter.Converter.lambda$andThen$0(Converter.java:62)
	at org.springframework.security.converter.ResourceKeyConverterAdapter.convert(ResourceKeyConverterAdapter.java:61)
	at org.springframework.security.converter.ResourceKeyConverterAdapter.convert(ResourceKeyConverterAdapter.java:42)
	at org.springframework.security.config.crypto.RsaKeyConversionServicePostProcessor$ConverterPropertyEditorAdapter.setAsText(RsaKeyConversionServicePostProcessor.java:98)
	at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:429)
	at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:402)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:155)
	at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:73)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1328)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
	... 64 common frames omitted
Caused by: java.io.FileNotFoundException: class path resource [C:/blueroom/sts-workspace-spring-security/spring-security//gradle/wrapper/gradle-wrapper.jar] cannot be opened because it does not exist
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
	at org.springframework.security.converter.ResourceKeyConverterAdapter.toInputStream(ResourceKeyConverterAdapter.java:84)
	... 78 common frames omitted

I don't understand why appears // twice

C:/blueroom/sts-workspace-spring-security/spring-security//gradle/wrapper/gradle-wrapper.jar

BTW locations:

  • Workspace: C:/blueroom/sts-workspace-spring-security/
  • Project: spring-security
  • Wrapper: gradle/wrapper/gradle-wrapper.jar

Some guidance would be valuable

@jzheaux
Copy link
Contributor

jzheaux commented Feb 10, 2021

Thanks for the extra detail, @manueljordan. I made an adjustment to OAuth2ResourceServerSpecTests, and they pass for gradlew.bat now.

jzheaux added a commit that referenced this issue Feb 10, 2021
- Typo in PlaceholderConfig was causing Windows builds to
resolve the CLASSPATH environment variable

Closes gh-9421
@spring-projects-issues spring-projects-issues added the status: backported An issue that has been backported to maintenance branches label Feb 10, 2021
jzheaux added a commit that referenced this issue Feb 10, 2021
- Typo in PlaceholderConfig was causing Windows builds to
resolve the CLASSPATH environment variable

Closes gh-9421
jzheaux added a commit that referenced this issue Feb 10, 2021
- Typo in PlaceholderConfig was causing Windows builds to
resolve the CLASSPATH environment variable

Closes gh-9421
@manueljordan
Copy link
Author

Hi @jzheaux

Huge thanks for the quick fix. I am going to test it right now and inform ...

@jzheaux jzheaux added this to the 5.5.0-M2 milestone Feb 10, 2021
jzheaux added a commit that referenced this issue Feb 10, 2021
- Netty returns a slightly different exception on Windows,
so adjusted assertion accordingly.

Issue gh-9421
@manueljordan
Copy link
Author

Now passes but is mandatory use --no-parallel - see #9430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: build An issue in the build status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants