2
respostas

Erro ao executar comandos

Pessoal,

Quando eu vou executar o start.sh, aparece o erro: Error: Unable to access jarfile target/forum.jar

Minha máquina é MAC.

E quando vou executar mvn clean package:

INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   ForumApplicationTests.contextLoads » IllegalState Failed to load ApplicationCo...
[INFO] 
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  18.075 s
[INFO] Finished at: 2023-02-24T14:11:42-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project forum: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/higormiranda/Downloads/prometheus-grafana/app/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [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/MojoFailureException

Está tudo no ar, reiniciei o mysql e redis.

Ao acessar localhost/topicos: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.

Fri Feb 24 17:28:46 GMT 2023 There was an unexpected error (type=Internal Server Error, status=500).

Mas quando acesso localhost/topicos/1 aparece normal.

Obrigado

2 respostas

Olá Higor

Sobre o erro There are test failures. tente rodar o comando com -DskipTests:

mvn clean package -DskipTests

Muito obrigado Otávio!

Mas está mostrando o erro de whitelabel

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Mar 01 18:11:25 GMT 2023 There was an unexpected error (type=Internal Server Error, status=500).