Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Aplicação não sobe nem com reza brava. Diversos erros apontados no Eclipse.

Segui os passos de configuração duas vezes, em máquinas diferentes, mas após importar o projeto, e instalar o tomcat, mysql, diversos erros são apontados e a aplicação não sobe de jeito nenhum.

Pelo tanto de problemas de configuração que vi reportados nesse fórum, a Alura deveria considerar seriamente prover uma máquina virtual com a aplicação já configurada.

Description    Resource    Path    Location    Type
javax.servlet.jsp.JspException cannot be resolved to a type    admin.jsp    /alura-shows/WebContent/WEB-INF/views    line 9    JSP Problem
javax.servlet.jsp.JspException cannot be resolved to a type    depoimento.jsp    /alura-shows/WebContent/WEB-INF/views    line 5    JSP Problem
javax.servlet.jsp.JspException cannot be resolved to a type    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 22    JSP Problem
javax.servlet.jsp.JspException cannot be resolved to a type    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 43    JSP Problem
javax.servlet.jsp.JspException cannot be resolved to a type    usuarioLogado.jsp    /alura-shows/WebContent/WEB-INF/views    line 18    JSP Problem
javax.servlet.jsp.PageContext cannot be resolved to a type    admin.jsp    /alura-shows/WebContent/WEB-INF/views    line 10    JSP Problem
javax.servlet.jsp.PageContext cannot be resolved to a type    depoimento.jsp    /alura-shows/WebContent/WEB-INF/views    line 6    JSP Problem
javax.servlet.jsp.PageContext cannot be resolved to a type    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 23    JSP Problem
javax.servlet.jsp.PageContext cannot be resolved to a type    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 43    JSP Problem
javax.servlet.jsp.PageContext cannot be resolved to a type    usuarioLogado.jsp    /alura-shows/WebContent/WEB-INF/views    line 18    JSP Problem
The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder    admin.jsp    /alura-shows/WebContent/WEB-INF/views    line 8    JSP Problem
The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder    depoimento.jsp    /alura-shows/WebContent/WEB-INF/views    line 4    JSP Problem
The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 21    JSP Problem
The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder    usuario.jsp    /alura-shows/WebContent/WEB-INF/views    line 42    JSP Problem
The method getBuild() is undefined for the type MvcUriComponentsBuilder.MethodArgumentBuilder    usuarioLogado.jsp    /alura-shows/WebContent/WEB-INF/views    line 17    JSP Problem
No end tag (</a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 33    JSP Problem
No end tag (</a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 35    JSP Problem
No end tag (</a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 38    JSP Problem
No end tag (</a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 40    JSP Problem
No start tag (<a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 33    JSP Problem
No start tag (<a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 35    JSP Problem
No start tag (<a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 38    JSP Problem
No start tag (<a>).    cabecalho.jsp    /alura-shows/WebContent/WEB-INF/views    line 40    JSP Problem
No start tag (<div>).    rodape.jsp    /alura-shows/WebContent/WEB-INF/views    line 9    JSP Problem
The tag handler class for "c:if" (org.apache.taglibs.standard.tag.rt.core.IfTag) was not found on the Java Build Path    admin.jsp    /alura-shows/WebContent/WEB-INF/views    line 1    JSP Problem
The import javax.persistence.Table is never used    Depoimento.java    /alura-shows/src/br/com/alura/owasp/model    line 8    Java Problem
TODO Auto-generated method stub    CasaDeShowInitializer.java    /alura-shows/src/br/com/alura/owasp/infra    line 14    Java Task
3 respostas

Como sugestão de ajuda seria interessante ver as etapas de preparação para o deploy da aplicação:

Preparando o ambiente: Projeto Alura Shows Preparando o ambiente: Instalando o Tomcat Preparando o ambiente: Instalando o MySQL Preparando o ambiente: Configurando o banco

E conferir se tudo está conforme a preparação para a execução da aplicação.

Algumas mensagens de erro sumiram ao apontar o Tomcat em Properties -> Targeted Runtime. Porém notei pelo console que o erro está acontecendo na tentativa de criação do banco de dados. Revisei as configurações feitas na etapa do mysql e estão corretas.

solução!

Consegui fazer aparecer as páginas (http://localhost:8080/alura-shows/) mas o eclipse acusa erro nos .jsp (parece que é bug do eclipse mesmo)

Estou usando Java 1.8, Tomcat 9, MySQL 8.0.21.

Adicionei a dependência no pom.xml

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
        </dependency>

Mudei a versão do mysql no pom.xml

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.21</version>
        </dependency>

Criei o banco pelo MySQL

create database owasp

Em JPAConfiguration.java e ConnectionFactory.java utilizei a string de conexão

"jdbc:mysql://localhost:3306/owasp?serverTimezone=UTC"