Ir ao conteúdo
  • Cadastre-se
migueldf

ERRO NO JAVA WEB

Recommended Posts

Ola galera estadando esse erro mais nao consigo resolver podem ajuda?

 

 

HTTP Status 500 - An exception occurred processing JSP page /Cardapio/cardapio.jsp at line 4
 

type Exception report

message An exception occurred processing JSP page /Cardapio/cardapio.jsp at line 4

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /Cardapio/cardapio.jsp at line 41: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>2: <%@ include file="..\Cabecario\cabecario.jsp"%>3: <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>4: <jsp:useBean id="cod_pizza" class="br.ucb.DAO.CardapioPizzaDAO"/>5: <jsp:useBean id="cod_bebida" class="br.ucb.DAO.CardapioBebidaDAO"/> 6: 7: Stacktrace:	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:567)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:454)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:837)	org.apache.jsp.Cardapio.cardapio_jsp._jspService(cardapio_jsp.java:227)	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	java.lang.reflect.Constructor.newInstance(Unknown Source)	com.mysql.jdbc.Util.handleNewInstance(Util.java:411)	com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)	com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:355)	com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2461)	com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2498)	com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2283)	com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:822)	com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	java.lang.reflect.Constructor.newInstance(Unknown Source)	com.mysql.jdbc.Util.handleNewInstance(Util.java:411)	com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:404)	com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)	java.sql.DriverManager.getConnection(Unknown Source)	java.sql.DriverManager.getConnection(Unknown Source)	br.ucb.JDBC.ConnectionFactory.getConnection(ConnectionFactory.java:19)	br.ucb.DAO.CardapioPizzaDAO.<init>(CardapioPizzaDAO.java:23)	org.apache.jsp.Cardapio.cardapio_jsp._jspService(cardapio_jsp.java:139)	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

java.net.ConnectException: Connection refused: connect	java.net.DualStackPlainSocketImpl.connect0(Native Method)	java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)	java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)	java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)	java.net.AbstractPlainSocketImpl.connect(Unknown Source)	java.net.PlainSocketImpl.connect(Unknown Source)	java.net.SocksSocketImpl.connect(Unknown Source)	java.net.Socket.connect(Unknown Source)	java.net.Socket.connect(Unknown Source)	java.net.Socket.<init>(Unknown Source)	java.net.Socket.<init>(Unknown Source)	com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259)	com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:305)	com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2461)	com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2498)	com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2283)	com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:822)	com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	java.lang.reflect.Constructor.newInstance(Unknown Source)	com.mysql.jdbc.Util.handleNewInstance(Util.java:411)	com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:404)	com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)	java.sql.DriverManager.getConnection(Unknown Source)	java.sql.DriverManager.getConnection(Unknown Source)	br.ucb.JDBC.ConnectionFactory.getConnection(ConnectionFactory.java:19)	br.ucb.DAO.CardapioPizzaDAO.<init>(CardapioPizzaDAO.java:23)	org.apache.jsp.Cardapio.cardapio_jsp._jspService(cardapio_jsp.java:139)	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.20 logs.

Apache Tomcat/8.0.20

se tira os as seguintes linhas 

4: <jsp:useBean id="cod_pizza" class="br.ucb.DAO.CardapioPizzaDAO"/>

5: <jsp:useBean id="cod_bebida" class="br.ucb.DAO.CardapioBebidaDAO"/>

 

o programa em si roda mais nao mostra o cardapio, so mostra o layout 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora





Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas publicações sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×