2 Replies Latest reply on Sep 7, 2007 5:35 AM by zheng guangpeng

    why getViewId is  so strange and thus wrong ?????

    zheng guangpeng Newbie

      I used a4j in my project and envir was netbeans 5.5, a4j lates version of 1.1.1. But I found a strange question as following :
      When I navigated from one page to another , the getViewId function returned a strange viewId such as "/" or " /<??????è??????????>" .
      then exception was threw.

      I didn't know why it happend and also tried to resolve it ,but failed .

      Of cource, I did could avoid the exception by registing my own PhaseListener to catch the wrong viewId and call faceContext.responseComplete .

      But now ,I want to know why this happened ,it's strange and I can't face it again !

      Thanks if you could give me advice ......

        • 1. Re: why getViewId is  so strange and thus wrong ?????
          Ilya Shaikovsky Master

          Seems we need more info. War file will be most helpfull to see what happens.

          • 2. Re: why getViewId is  so strange and thus wrong ?????
            zheng guangpeng Newbie

            if not using my own phaseListener ,it reported the following exception:

            - Servlet.service() for servlet Faces Servlet threw exception
            com.sun.faces.el.impl.parser.ParseException: Encountered "}" at line 1, column 3.
            Was expecting one of:
            <INTEGER_LITERAL> ...
            <FLOATING_POINT_LITERAL> ...
            <STRING_LITERAL> ...
            "true" ...
            "false" ...
            "null" ...
            "(" ...
            "-" ...
            "not" ...
            "!" ...
            "empty" ...
            ...

            at com.sun.faces.el.impl.parser.ELParserImpl.generateParseException(ELParserImpl.java:2234)
            at com.sun.faces.el.impl.parser.ELParserImpl.jj_consume_token(ELParserImpl.java:2102)
            at com.sun.faces.el.impl.parser.ELParserImpl.Expression(ELParserImpl.java:140)
            at com.sun.faces.el.impl.parser.ELParserImpl.AttrValueExpression(ELParserImpl.java:109)
            at com.sun.faces.el.impl.parser.ELParserImpl.ExpressionString(ELParserImpl.java:50)
            at com.sun.faces.el.impl.ExpressionEvaluatorImpl.parseExpressionString(ExpressionEvaluatorImpl.java:282)
            at com.sun.faces.el.impl.ExpressionEvaluatorImpl.parseExpression(ExpressionEvaluatorImpl.java:199)
            at com.sun.faces.application.ApplicationImpl.checkSyntax(ApplicationImpl.java:785)
            at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:291)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:662)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:641)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
            at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
            at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:225)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
            at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
            :665)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
            at java.lang.Thread.run(Thread.java:595)




            the project start page is Login.jsp ,if I wrote url in browser another jsp such as register.jsp ,it would be wrong and throw the upper exception .

            And also I wonder the question .if I filled the right info and then it will navigate to right page ,but if wrong info and call "return null " back to the same page, then exception will be threw !

            My msn is zgp79@hotmail.com and goole talk is zheng.guangpeng@gmail.com . I'm very glad to get yours instant touch info .