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

NullPointerException when traing to run app #103

Closed
qarmin opened this issue Feb 27, 2024 · 3 comments
Closed

NullPointerException when traing to run app #103

qarmin opened this issue Feb 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@qarmin
Copy link

qarmin commented Feb 27, 2024

Describe the bug
When trying to run command

./cats --server=http://localhost:5000 --contract=/home/rafal/Pobrane/openapi.json -b  -k -f DefaultValuesInFields,EmptyStringsInFields,ExamplesFields,IterateThroughEnumValuesFields

I got this null pointer exception

java.lang.NullPointerException
	at com.endava.cats.args.FilterArguments.matchWildCardPaths(FilterArguments.java:472)
	at com.endava.cats.args.FilterArguments.matchSuppliedPathsWithContractPaths(FilterArguments.java:451)
	at com.endava.cats.args.FilterArguments.getPathsToRun(FilterArguments.java:438)
	at com.endava.cats.command.CatsCommand.printConfiguration(CatsCommand.java:330)
	at com.endava.cats.command.CatsCommand.doLogic(CatsCommand.java:224)
	at com.endava.cats.command.CatsCommand.run(CatsCommand.java:178)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at com.endava.cats.CatsMain.run(CatsMain.java:42)
	at com.endava.cats.CatsMain_ClientProxy.run(Unknown Source)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)

I cannot provide openapi file to test

Environment:

Key           | Value
------------- | --------------------
OS Name       | Linux
OS Version    | 6.5.0-21-generic
OS Arch       | amd64
Binary Type   | native
Cats Version  | 11.0.0
Cats Build    | 2024-02-18T19:01:38Z
Term Width    | 79
Term Type     | xterm-256color
Shell         | /bin/bash
@qarmin qarmin added the bug Something isn't working label Feb 27, 2024
@en-milie
Copy link
Contributor

Can you please rerun with --verbosity DETAILED --debug. The nullpointer is caused by this line: Set<String> allContractPaths = openAPI.getPaths().keySet(); which suggests that the OpenAPI specs were not properly parsed.

@qarmin
Copy link
Author

qarmin commented Feb 27, 2024

I now noticed that in the script I am downloading openapi from an incorrect address, so openapi.json is empty and shows this error

@en-milie
Copy link
Contributor

I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants