I'm creating a spring security application integrating primefaces 5 and JSF 2.2 with a custum login jsf page. the problem is that when I execute the login page I have the following error :
Error Rendering View[/login.xhtml]: java.lang.NullPointerException
at org.springframework.faces.webflow.FlowViewStateManager.saveView(FlowViewStateManager.java:181) [org.springframework.faces-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) [jsf-impl-2.1.7-jbossorg-2.jar:]
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99) [org.springframework.faces-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.7-jbossorg-2.jar:]
this is login.xhtml
<ui:composition xmlns="http://ift.tt/lH0Osb"
xmlns:ui="http://ift.tt/KsEgXx"
xmlns:f="http://ift.tt/HcrI1S"
xmlns:h="http://ift.tt/HjFrZb"
template="/WEB-INF/templates/template.xhtml">
<ui:define name="content">
<h:body>
<h:form id="loginForm" prependId="false">
<!-- Messages must be global here, to show bad credentials -->
<h:messages globalOnly="true"/>
<!-- Id's must not be changed to support spring security check -->
<h:panelGrid columns="3">
<h:outputLabel for="j_username" value="User: * " />
<h:inputText id="j_username"
required="true" label="username"
/>
<h:message for="j_username" display="text" style="color:red"/>
<h:outputLabel for="j_password" value="Password: * " />
<h:inputSecret id="j_password" label="password"
required="true"
/>
<h:message for="j_password" display="text" style="color:red"/>
<h:outputLabel for="_spring_security_remember_me" value="Remember me: " />
<h:selectBooleanCheckbox
id="_spring_security_remember_me" />
</h:panelGrid>
<h:commandButton type="submit" id="login" value="Login" action="#{loginController.doLogin}" />
</h:form>
</h:body>
</ui:define>
and in the browser I have Status 500
javax.servlet.ServletException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
Any ideas? Thanks
Aucun commentaire:
Enregistrer un commentaire