Axway-API-Management-Plus / apimanager-swagger-promote

Axway API-Manager CLI
Apache License 2.0
19 stars 21 forks source link

Error : Could not find or load main class com.axway.apim.App #16

Closed lynxfg closed 5 years ago

lynxfg commented 5 years ago

Hello, I'm very happy to work with your plugin, your documentation is clear and very complete. I followed the instructions in the documentation, but I have the following error throwing the command scripts/run-swagger-import.sh :

Error: Could not find or load main class com.axway.apim.App

Do you have an idea about the source of the problem?

Best,

cwiechmann commented 5 years ago

Hi, This is very likely a Classpath-Problem. Could you please let me know on which operating-system you start the script?

Cheers, Chris

lynxfg commented 5 years ago

I use the Windows operating system Windows

rathnapandi commented 5 years ago

Use following command in windows OS java -cp lib;lib* com.axway.apim.App -a samples/petstore.json -c samples/Sample1.txt -h localhost -u apiadmin -p changeme

cwiechmann commented 5 years ago

Thanks @rathnapandi! I would say almost. You missed a "/" in your example. With that it works:

java -cp lib;lib/* com.axway.apim.App -a samp....

Perhaps it's a good idea to add a bat-file to the release.

gwandwingor commented 5 years ago

Hi, we had the same problem when executing the script from a git-bash terminal on windows. I created a .bat version of the run-swagger-import.sh.

run-swagger-import.zip

Hope this helps.

lynxfg commented 5 years ago

Hello,

thank you very much for your help, it works for me perfectly. I was able to launch the command from windows.

Best regards,

cwiechmann commented 5 years ago

@gwandwingor, this is great! Thanks! I'll include this bat-file into the package!

cwiechmann commented 5 years ago

Just released version 1.3 including the provided bat-file.