azure-sdk-for-java: [BUG] Azure batch sdk not working with java 17.
Describe the bug azure batch sdk not working with java 17.
Exception or Stack Trace
java.lang.reflect.InaccessibleObjectException: Unable to make field private static final long java.util.UUID.serialVersionUID accessible: module java.base does not "opens java.util" to unnamed module @45afc369
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.microsoft.rest.Validator.validateClass(Validator.java:77)
at com.microsoft.rest.Validator.validate(Validator.java:64)
at com.microsoft.rest.Validator.validateClass(Validator.java:115)
at com.microsoft.rest.Validator.validate(Validator.java:64)
at com.microsoft.azure.batch.protocol.implementation.TasksImpl.deleteWithServiceResponseAsync(TasksImpl.java:1050)
at com.microsoft.azure.batch.protocol.implementation.TasksImpl.delete(TasksImpl.java:990)
at com.microsoft.azure.batch.TaskOperations.deleteTask(TaskOperations.java:579)
at com.microsoft.azure.batch.TaskOperations.deleteTask(TaskOperations.java:552)
To Reproduce Steps to reproduce the behavior: Use azure batch sdk with java 17.
Setup (please complete the following information):
- OS: macOs monetery, centos 7
- IDE: IntelliJ
- Library/Libraries: com.microsoft.azure:azure-batch:10.0.0
- Java version: 17
Additional context I suspect the issue is due to below code:
Problem due to accessing the private fields using reflection:
package com.microsoft.rest;
class: Validator.java
Reflective access not permitted with java 17

Information Checklist
- Bug Description Added
- Repro Steps Added
- Setup information Added
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (7 by maintainers)
@mario-guerra could you help get this track1 batch issue discussed in the Batch team, and/or provide any updates on Batch release timelines?
@srnagar can you please follow up from the autorest / codegen side?