0
votes

i have a IceFaces 1.8 and jsf 1.1 jsp page

<ice:form partialSubmit="true">
                                        <ice:messages />
                                        <ice:panelGrid columns="2">
                                            <ice:outputText value="#{msg.UserName}"></ice:outputText>
                                            <h:inputText required="true" id="UserName"
                                                value="#{loginBean.userName}" />

                                            <ice:outputText value="#{msg.Password}"></ice:outputText>
                                            <h:inputSecret id="Password" required="true"
                                                value="#{loginBean.password}" />

                                            <ice:outputText value=""></ice:outputText>
                                            <h:commandButton type="submit" value="#{msg.Login}"
                                                action="#{loginBean.login}" />
                            </ice:panelGrid>
                                </ice:form>

When click login button for first time the action throw exception

java.lang.RuntimeException: no message available
    at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    Truncated. see log file for complete stacktrace
java.lang.NullPointerException
    at com.sun.faces.application.NavigationHandlerImpl.getViewId(NavigationHandlerImpl.java:160)
    at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:106)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:89)
    at javax.faces.component.UICommand.broadcast(UICommand.java:312)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    Truncated. see log file for complete stacktrace
> 

when press second time the code run fine please advice about this problem and how to solve it

1
The same xhtml works for me. You might have something wrong in your web.xml or the template page if you wrapped the content in a ui:composition template.Narayana Nagireddi

1 Answers

0
votes

Probably, its because you are using ice:form and submitting it through h:commandButton. Change your commandButton to ice:commandButton then retry.

Change:

<h:commandButton type="submit" value="#{msg.Login}" 
     action="#{loginBean.login}" />

to:

<ice:commandButton type="submit" value="#{msg.Login}" 
    action="#{loginBean.login}" />