Skip to content
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

OpenApi-parser reads xml file and returns NullPointerException #647

Closed
Richter-cg opened this issue May 30, 2018 · 4 comments
Closed

OpenApi-parser reads xml file and returns NullPointerException #647

Richter-cg opened this issue May 30, 2018 · 4 comments

Comments

@Richter-cg
Copy link
Contributor

Richter-cg commented May 30, 2018

Runing the XML smoketest with Maven results in an NullPointerException.
It seems that the OpenApi-parser accepts XML files as an input but then fails to return any informations out of it.

  1. Check if the parser returns informations about errors so CobiGen could use them to continue with another parser.
  2. If not, create a workaround until a bugfix has been released.

Caused by: java.lang.NullPointerException at com.reprezen.kaizen.oasparser.ovl3.OpenApi3Impl.getServers (OpenApi3Impl.java:188) at com.devonfw.cobigen.openapiplugin.inputreader.OpenAPIInputReader.extractServers (OpenAPIInputReader.java:206) at com.devonfw.cobigen.openapiplugin.inputreader.OpenAPIInputReader.extractComponents (OpenAPIInputReader.java:136) at com.devonfw.cobigen.openapiplugin.inputreader.OpenAPIInputReader.getInputObjects (OpenAPIInputReader.java:111) at com.devonfw.cobigen.impl.generator.TriggerMatchingEvaluatorImpl.getMatchingTriggers (TriggerMatchingEvaluatorImpl.java:80)

Related Issues:
#427

@Richter-cg Richter-cg added the bug label May 30, 2018
@Richter-cg Richter-cg self-assigned this May 30, 2018
@Richter-cg Richter-cg changed the title Taking the first fitting InputReader fails for smoketests Fix the choice of the suitable InputReader for smoketests Jun 6, 2018
@Richter-cg Richter-cg changed the title Fix the choice of the suitable InputReader for smoketests OpenApi-parser reads xml file and returns NullPointerException Jun 20, 2018
@maybeec maybeec added this to the cobigen-openapiplugin-v2.1.0 milestone Jun 26, 2018
@Richter-cg
Copy link
Contributor Author

It looks like the NPE occurs only when the input file has tabs instead of spaces at the begining of each line. But the OpenApi parser still accepts the xml input which results in "MojoFailureException: The execution 'generate' of cobigen-maven-plugin resulted in no file to be generated!"

@maybeec
Copy link
Member

maybeec commented Jul 5, 2018

can you link the issues of openapi-parser repo here?

@Richter-cg
Copy link
Contributor Author

sure, it is RepreZen/KaiZen-OpenApi-Parser#170

@jdiazgon
Copy link
Member

jdiazgon commented Jul 19, 2018

Closing issue as it is fixed from our side. I have created a known issue explaining that we are waiting for it to be fixed by the RepreZen team #710.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants