Olá! Estou tentando fazer um projeto com Vraptor4. Fiz um formulário de cadastro que está funcionando. Ao clicar no botão cadastrar, a aplicação chama este método:
@Path("/condominio/salvar")
@Post
public void salvar(Condominio condominio){
dao.salvar(condominio);
result.include("mensagem", "Condomínio cadastrado com sucesso!");
result.redirectTo(this).listar();
}
E o método listar é este:
@Path("/condominio/listar")
public void listar(){
result.include("condominioList", dao.listar());
}
Muito simples né?!
Está salvando no banco e o dao.listar() funciona perfeitamente numa classe de teste que fiz.
Porem não estou conseguindo exibir a lista para o usuário pois está dando o erro abaixo e eu não estou entendendo-o para resolver. Segue abaixo:
20:50:21,877 ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /MeuCondominio/WEB-INF/jsp/condominio/listar.jsp: javax.servlet.ServletException: /WEB-INF/jsp/condominio/listar.jsp raised an exception
at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:127) [vraptor-4.1.4.jar:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
Caused by: org.apache.jasper.JasperException: /WEB-INF/jsp/condominio/listar.jsp(24,20) JBWEB004178: #{..} is not allowed in template text
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:145) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:96) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:705) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:958) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:862) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Root.accept(Node.java:495) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1768) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:359) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:339) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:326) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jastow-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) [jastow-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at br.com.caelum.vraptor.core.DefaultStaticContentHandler.deferProcessingToContainer(DefaultStaticContentHandler.java:87) [vraptor-4.1.4.jar:]
at br.com.caelum.vraptor.core.DefaultStaticContentHandler$Proxy$_$$_WeldClientProxy.deferProcessingToContainer(Unknown Source) [vraptor-4.1.4.jar:]
at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:114) [vraptor-4.1.4.jar:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:192) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:160) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
at br.com.caelum.vraptor.view.DefaultPageResult.defaultView(DefaultPageResult.java:81) [vraptor-4.1.4.jar:]
at br.com.caelum.vraptor.observer.ForwardToDefaultView.forward(ForwardToDefaultView.java:67) [vraptor-4.1.4.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:174) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:170) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:46) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:124) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.EventImpl.fire(EventImpl.java:84) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:94) [vraptor-4.1.4.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:271) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:258) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:237) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:174) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:170) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:46) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:124) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at org.jboss.weld.event.EventImpl.fire(EventImpl.java:84) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123) [vraptor-4.1.4.jar:]
... 28 more
```
Alguem pode me ajudar?