[BUG] NullPointerException when loading configuration
See original GitHub issueDescription
I have an automatic build pipeline that uses the openapi generator to create a python-flask server. Today the builds started failing with a NullPointerException and the below mentioned stack-trace.
openapi-generator version
I use the following Docker Image:
openapitools/openapi-generator-cli latest 132da9168d58
OpenAPI declaration file content or url
Seems to be irrelevant, also happens with the swagger petstore.
Generation Details
docker run --rm -u $(id -u) -v "$(pwd):/local" openapitools/openapi-generator-cli generate -i /local/openapi.yaml -g python-flask -o /local/app -c /local/config.json --package-name PKGNAM --skip-operation-example
Contents of config.json
:
{
"packageName": "PKGNAM",
"serverPort": "8080"
}
Output
Exception in thread "main" java.lang.NullPointerException
at java.base/java.lang.String.concat(Unknown Source)
at org.openapitools.codegen.CodegenConfigLoader.forName(CodegenConfigLoader.java:48)
at org.openapitools.codegen.config.CodegenConfigurator.fromFile(CodegenConfigurator.java:94)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:272)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >Error while loading the grid -null pointer exception [duplicate]
Null pointer exception : When ever a program code tried to access the data/object which is not present or not set or set...
Read more >Java NullPointerException - Detect, Fix, and Best Practices
When we run the above program, it throws the following NullPointerException error message. Exception in thread "main" java.lang.
Read more >Receive Error 500: java.lang.NullPointerException when ... - IBM
NullPointerException when accessing Case Manager Builder using SSL with TLSv1.2 configured in the application server. Symptom. When opening Case ...
Read more >java.lang.NullPointerException when loading plugin config
I'm coding a bungeecord plugin and I get this error (apparently on the line where I load the config): 11:54:43 [WARNING] Exception ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I now use
openapitools/openapi-generator-cli:latest-release
instead ofopenapitools/openapi-generator-cli:latest
. For me this works fine.Hello, I’m also facing this issue and did a bisect and found out that commit dd3bba8c9442f2ee40d6ea8f0872ab0be43714b9 broke it. @spacether pinging you as the author of the commit.