Erro 404 ao fazer o deploy usando o beanstalk
Ao fazer deploy de uma aplicacao java web, ao terminar, a aplição fica verde, e ao clicar na url, abre a aplicacao no browser, mas se clicar na segunda vez, da erro 404. Se esperar um templo e clicar no link novamente, a aplicacao abre novamente, se clicar pela segunda vez, erro 404 denovo. Ou seja, a aplicacao funciona como deveria funcionar, so no primeiro clic no link, a partir do segundo, da erro.
Outra caracteristica do problema, é que se inserir /index.xhtml, apos o link, abre normalmente todas as vezes, conforme exemplo abaixo.
Outra caracteristica do problema, é que se inserir /index.xhtml, apos o link, abre normalmente todas as vezes, conforme exemplo abaixo.
environment.mf6j6us2wp.sa-east-1.elasticbeanstalk.com /index.xhtml Segue parte do log: Log for i-0c97823171902dde4: ------------------------------------- /var/log/tomcat8/localhost.2017-10-26.log ------------------------------------- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) 26-Oct-2017 19:34:10.363 SEVERE [http-nio-8080-exec-9] org.apache.catalina.session.StandardSession.tellNew Session event listener threw exception java.lang.NoSuchMethodError: org.springframework.security.web.context.support.SecurityWebApplicationContextUtils.findWebApplicationContext(Ljavax/servlet/ServletContext;)Lorg/springframework/web/context/WebApplicationContext; at org.springframework.security.web.context.support.SecurityWebApplicationContextUtils.findRequiredWebApplicationContext(SecurityWebApplicationContextUtils.java:46) at org.springframework.security.web.session.HttpSessionEventPublisher.getContext(HttpSessionEventPublisher.java:56) at org.springframework.security.web.session.HttpSessionEventPublisher.sessionCreated(HttpSessionEventPublisher.java:73) at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:409) at org.apache.catalina.session.StandardSession.setId(StandardSession.java:381) at org.apache.catalina.session.StandardSession.setId(StandardSession.java:362) at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:782) at org.apache.catalina.connector.Request.doGetSession(Request.java:3000) at org.apache.catalina.connector.Request.getSession(Request.java:2325) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:895) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:231) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:231) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:231) at com.sun.faces.context.ExternalContextImpl.getSession(ExternalContextImpl.java:167) at javax.faces.context.ExternalContextWrapper.getSession(ExternalContextWrapper.java:438) at com.sun.faces.application.view.FaceletViewHandlingStrategy.getSession(FaceletViewHandlingStrategy.java:513) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at
Diana Santos
Curtidas 0
Melhor post
Diana Santos
30/10/2017
Problema olucionado, estava faltando esta configuracao no web.xml:
<welcome-file-list> <welcome-file>login.xhtml</welcome-file> </welcome-file-list>
GOSTEI 1