Pessoal, estou tendo problemas ao executar minha aplicação. Não estou conseguindo identificar o problema.
ListaContatoAction
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import contatos.Contato;
import contatos.ContatoDAO;
public class ListaContatosAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
List<Contato> lista = new ContatoDAO().getLista();
request.setAttribute("contatos", lista);
return mapping.findForward("lista");
}
}
lista.jsp
<!-- for -->
<c:forEach var="contato" items="${contatos}">
${contato.id } - ${contato.nome }<br>
</c:forEach>
struts-config.xml
<struts-config>
<action-mappings>
<action path="/listaContatos" type="struts.action.ListaContatosAction">
<forward name="lista" path="/lista.jsp"/>
</action>
</action-mappings>
</struts-config>
Exception
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.AbstractMethodError: oracle.jdbc.driver.OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String;
contatos.ContatoDAO.getLista(ContatoDAO.java:44)
struts.action.ListaContatosAction.execute(ListaContatosAction.java:23)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Estou com o .jar do banco de dados dentro da lib, e o método getLista() da classe ContatoDAO está funcionando certo, uso em outra app normalmente.
Atenciosamente.