Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Build produces some of these: 'WARNING: An illegal reflective access operation has occurred' #3036

Closed
Eilon opened this issue Oct 1, 2018 · 5 comments
Labels
client: Java PRI: 3 - Optional Represents a low-priority issue. Handle if time allows. type: Bug
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Oct 1, 2018

E.g. this build: http://aspnetci/viewLog.html?buildId=565722&buildTypeId=Coherence_UpdateRepos&tab=buildLog&_focus=7795

Has these warnings (I have no idea what they mean):

[12:28:34][Step 2/2]   WARNING: An illegal reflective access operation has occurred
[12:28:34][Step 2/2]   WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/C:/Users/asplab/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages()
[12:28:34][Step 2/2]   WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
[12:28:34][Step 2/2]   WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[12:28:34][Step 2/2]   WARNING: All illegal access operations will be denied in a future release

And further down a few more instances:

[12:30:14][Step 2/2] EXEC : warning : An illegal reflective access operation has occurred [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:14][Step 2/2] EXEC : warning : Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/C:/Users/asplab/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages() [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:14][Step 2/2] EXEC : warning : Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:14][Step 2/2] EXEC : warning : Use --illegal-access=warn to enable warnings of further illegal reflective access operations [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:14][Step 2/2] EXEC : warning : All illegal access operations will be denied in a future release [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:20][Step 2/2]   

...

[12:30:34][Step 2/2]   Packing Java client
[12:30:34][Step 2/2]   > gradlew -PpackageVersion="0.1.0-alpha1-111" -Dorg.gradle.daemon=false createPackage
[12:30:35][Step 2/2] EXEC : warning : An illegal reflective access operation has occurred [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:35][Step 2/2] EXEC : warning : Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/C:/Users/asplab/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages() [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:35][Step 2/2] EXEC : warning : Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:35][Step 2/2] EXEC : warning : Use --illegal-access=warn to enable warnings of further illegal reflective access operations [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:35][Step 2/2] EXEC : warning : All illegal access operations will be denied in a future release [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]

...

[12:30:44][Step 2/2] EXEC : warning : An illegal reflective access operation has occurred [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/C:/Users/asplab/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages() [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Use --illegal-access=warn to enable warnings of further illegal reflective access operations [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : All illegal access operations will be denied in a future release [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] D:\b\w\33bdfc1cae7b2a38\.packages\internal.aspnetcore.sdk\3.0.0-alpha1-20180919.1\build\ApiCheck.targets(61,5): warning : No baseline file 'D:\b\w\33bdfc1cae7b2a38\modules\SignalR\src\Microsoft.AspNetCore.SignalR.Specification.Tests\baseline.netcore.json' for netcoreapp2.2 found in Microsoft.AspNetCore.SignalR.Specification.Tests. [D:\b\w\33bdfc1cae7b2a38\modules\SignalR\src\Microsoft.AspNetCore.SignalR.Specification.Tests\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj]
[12:30:44][Step 2/2] D:\b\w\33bdfc1cae7b2a38\.packages\internal.aspnetcore.sdk\3.0.0-alpha1-20180919.1\build\ApiCheck.targets(61,5): warning : No baseline file 'D:\b\w\33bdfc1cae7b2a38\modules\SignalR\src\Microsoft.AspNetCore.SignalR.Specification.Tests\baseline.netframework.json' for net461 found in Microsoft.AspNetCore.SignalR.Specification.Tests. [D:\b\w\33bdfc1cae7b2a38\modules\SignalR\src\Microsoft.AspNetCore.SignalR.Specification.Tests\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj]
[12:30:44][Step 2/2] EXEC : warning : An illegal reflective access operation has occurred [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/C:/Users/asplab/.gradle/wrapper/dists/gradle-4.9-bin/e9cinqnqvph59rr7g70qubb4t/gradle-4.9/lib/gradle-base-services-4.9.jar) to method java.lang.ClassLoader.getPackages() [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : Use --illegal-access=warn to enable warnings of further illegal reflective access operations [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2] EXEC : warning : All illegal access operations will be denied in a future release [D:\b\w\33bdfc1cae7b2a38\.dotnet\buildtools\korebuild\3.0.0-alpha1-20180919.1\KoreBuild.proj]
[12:30:44][Step 2/2]     12 Warning(s)
[12:30:44][Step 2/2]     0 Error(s)
@analogrelay
Copy link
Contributor

This previously occurred when using pre-release versions of Java 9 with Gradle but I'm not sure what's causing it now since that machine seems to be using Java 10. Is it blocking the build?

@Eilon
Copy link
Member Author

Eilon commented Oct 3, 2018

Not blocking. I just happened to see these while looking at an unrelated thing that was actually blocking.

@Eilon
Copy link
Member Author

Eilon commented Oct 3, 2018

And BTW, I'm not saying it isn't a serious issue, I just have no idea what it is. And should certainly be addressed at some points because warnings are never good.

@analogrelay analogrelay added type: Bug PRI: 3 - Optional Represents a low-priority issue. Handle if time allows. labels Oct 3, 2018
@analogrelay
Copy link
Contributor

Ok, we should look at this in 2.2 but it doesn't need to happen for preview3

@analogrelay analogrelay modified the milestones: 2.2.0, 3.0.0 Oct 22, 2018
@analogrelay
Copy link
Contributor

Not really relevant since this was all due to a pre-release build of Java 9 and isn't a warning in our code but rather a warning triggered by gradle

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client: Java PRI: 3 - Optional Represents a low-priority issue. Handle if time allows. type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants