IBM-Cloud / get-started-java

Sample and tutorial to help you get started with a Java EE app, REST API and a database.
https://console.bluemix.net/docs/runtimes/liberty/getting-started.html
Apache License 2.0
27 stars 88 forks source link

A local run throws exception #31

Closed balajikadambi closed 3 years ago

balajikadambi commented 3 years ago

The command mvn install liberty:run-server throws the below error:

[ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.2.1:run-server (default-cli) on project GetStartedJava: java.util.zip.ZipException: archive is not a ZIP archive -> [Help 1]

I was following the instructions on IBMCloud documentation:

image
balajikadambi commented 3 years ago

I was able to workaround by using the OpenLiberty sample instead to run locally. https://openliberty.io/downloads/

To deploy to IBM Cloud, I followed the below steps:

kevin-ortega commented 3 years ago

@balajikadambi mvn install liberty:run-server is working for me and others. Can you try again?

balajikadambi commented 3 years ago

@kevin-ortega apologies. missed your update. I still have the same exception: [INFO] Getting: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/21.0.0.5/wlp-webProfile7-21.0.0.5.zip [INFO] To: /Users/xxxx/.m2/repository/wlp-cache/21.0.0_05/wlp-webProfile7-21.0.0.5.zip [INFO] Not modified - so not downloaded [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9.354 s [INFO] Finished at: 2021-05-26T09:43:56+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.2.1:run-server (default-cli) on project GetStartedJava: java.util.zip.ZipException: archive is not a ZIP archive -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I am using a MacOS

kevin-ortega commented 3 years ago

@balajikadambi My guess is your local maven repository is corrupted. Delete ~/.m2/repository. That will clean up the local repo where your dependencies are store and try again.

balajikadambi commented 3 years ago

@kevin-ortega thank you so much. the wlp-webProfile7-21.0.0.5.zip was possibly not downloaded properly. After cleaning the local repo, it works now. Closing the issue.