-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG] InaccessibleObjectException: Unable to make field transient #13684
Comments
I am running into the same issue |
I also ran into that issue. Guess sth is kinda hardcoded which should not be, didn't dig too much into the internals. My solution was to just use openjdk 11 instead of the latest one, now it's working. |
👋🏼 I got the same issue after installing the openapi-generator CLI using Homebrew this morning.
Downloading the Jar and running the Jar using openjdk 11 worked. |
I'm also afflicted by this issue, on Fedora 36. The nicest resolution I've found is to set which version of Java is being used: npm install @openapitools/openapi-generator-cli
"$(npm bin)/openapi-generator-cli" help # ok
"$(npm bin)/openapi-generator-cli" generate ... # fail
# pick default java version
update-alternatives --display java
sudo update-alternatives --set java java-11-openjdk.x86_64
"$(npm bin)/openapi-generator-cli" generate ... # ok
# reset changes
sudo update-alternatives --auto java |
I managed to get this to work without downgrading java by adapting the answer to this stackoverflow question - I added the |
Thanks @lukeselden for the solution. If you use direnv:
|
I had that error with the brew install 6.3.0, but it works with the 6.3.0-SNAPSHOT that I built from the github repository. |
I've gone through that issue as well after
Tested with other generators ( |
I investigated a bit and found that |
Code generation would fail for JDK >11 due to the following issue: OpenAPITools/openapi-generator#13684 Setting JAVA_OPTS works around this issue, allowing for generation with newer JDKs
Code generation would fail for JDK >11 due to the following issue: OpenAPITools/openapi-generator#13684 Setting JAVA_OPTS works around this issue, allowing for generation with newer JDKs
Bug Report Checklist
Description
When I try to generate a python client for the current petstore api, the generator runs into an issue. It seems that this problem is platform dependent. The error occurs on Windows with Java 17, but on Linux with Java 8 everything works fine.
openapi-generator version
6.2.0
OpenAPI declaration file content or url
See https://editor.swagger.io/
petstore.yaml.txt
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: