WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

WAS migration 6.1 to 8

  • 1.  WAS migration 6.1 to 8

    Posted Tue September 18, 2012 04:04 AM
    Hi All,

    We have migrated WAS  6.1 to WAS 8.0.   While login into application i am getting below errors. Same problem in two applications, other applciatons are working.

    Errors :

    [9/12/12 13:12:58:777 GMT-05:30] 0000002f lifecycle     E   JSF1054:
    (Phase ID: RESTORE_VIEW 1, View ID: "") Exception thrown
    during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle
    .LifecycleImpl@f91cb17a]
    [9/12/12 13:12:58:799 GMT-05:30] 0000002f servlet 
          E com.ibm.ws.webcontainer.servlet.ServletWrapper
    service SRVE0014E: Uncaught service() exception root
    cause Faces Servlet: javax.servlet.ServletException:
    viewId:/UserLogin.faces - View /UserLogin.faces could not be restored.
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service
    (ServletWrapper.java:1224)
     at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest
    (ServletWrapper.java:774)
     at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest
    (ServletWrapper.java:456)

    Caused by: javax.faces.application.ViewExpiredException: viewId:/UserLogin.faces - View /UserLogin.faces could not be restored.
     
    at

    com.sun.faces.lifecycle.RestoreViewPhase.execute
    (RestoreViewPhase.java:186)

    0000002f webapp       
    E com.ibm.ws.webcontainer.webapp.WebApp
    logServletError SRVE0293E: [Servlet Error]-[Faces Servlet]:
    javax.faces.application.ViewExpiredException:
    viewId:/UserLogin.faces
    - View /UserLogin.faces could not be restored.
     at

    com.sun.faces.lifecycle.RestoreViewPhase.execute
    (RestoreViewPhase.java:186)
     
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
     
    at
    com.sun.faces.lifecycle.RestoreViewPhase.doPhase
    (RestoreViewPhase.java:104)

     at com.sun.faces.lifecycle.LifecycleImpl.execute
    (LifecycleImpl.java:118)


    please help me.

    Thanks,
    Chinna.


  • 2.  WAS migration 6.1 to 8

    Posted Tue September 18, 2012 05:12 AM
    Hi Chinna,

      Seems application error, when a logout/timeout has occurred and you go back to previous page.
        
      stackoverflow.com/questions/3642919/java...

      Tell us if you managed to solve the problem, this will help others who may have the same problem.
     
    Regards,


  • 3.  WAS migration 6.1 to 8

    Posted Tue September 18, 2012 05:17 AM
    Hi Chinna,

      Not timeout or logout ocurred, but yes seems an application error:
     
       JavaServer Faces page fails when you pass a URL parameter
       www-01.ibm.com/support/docview.wss?uid=s...
      
      "The behavior of the RestoreView method has changed from the Sun Microsystems JavaServer Faces reference implementation Version 1.1 to 1.2."

       Hope this helps and tell us if you managed to solve the problem, this will help others who may have the same problem.

    regards,


  • 4.  WAS migration 6.1 to 8

    Posted Fri October 05, 2012 10:03 AM
    Hi Gabriel,

    Thanks for your response.

    We have raised PMR for this problem. We have got solution for JSF code based applications login in WAS 8.0.

    Solution :

    This is the expected behavior from JSF, this is not a defect. When a JSF page is requested, JSF creates a View, stores it in the session, and then renders the page. If the page is left idle, and either the session times out or other activity in the application forces the View to be removed from the session. JSF stores a number of View in the sessionbase on the com.sun.faces.numberOfViewsInSession context parameter. The default value is 15. When a button is clicked on that page (a Postback) there is no view in the session or the session itself is gone. This will cause the ViewExpiredException to be thrown. Setting the com.sun.faces.enableRestoreView11Compatibility will suppress theViewExpiredException and create a new View for that page, which results in the page to be re-rendered (refreshed). This is all expected behavior and how the JSF life cycle works.

    There are two ways to get around this that I can think of:

    1. Do not use JSF components in your login page. You could use a standard JSP file as your login page. This would not invoke the JSFcode and therefore no ViewExpiredException would be thrown.

    2. Increase your session timeout value to a higher value.


    We have incresed session timeout value to 30. Post increasing this value we are able to login.

    Thanks,

    Chinna.



  • 5.  WAS migration 6.1 to 8

    Posted Mon October 08, 2012 05:12 AM
    Hi Chinna,

      Glad to hear that you have solved the problem!!!

      Thank you very must for sharing the solution.

    Regards,


  • 6.  WAS migration 6.1 to 8

    Posted Tue October 09, 2012 03:59 AM
    Hi Gabriel,

    Now we are able to login into applications in WAS 8.0.

    But some modules are not working. I am getting below exception.

    An Error Occurred:
    javax.el.ELException: Not a Valid Method Expression:


    Caused by:
    javax.el.ELException - Not a Valid Method Expression:
    +- Stack Trace
    javax.faces.FacesException: javax.el.ELException: Not a Valid Method Expression:
     at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap
    (ExceptionHandlerImpl.java:241)
     at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle
    (ExceptionHandlerImpl.java:156)
     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop
    (ResultHandler.java:775)
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
    Caused by: javax.el.ELException: Not a Valid Method Expression:
     at org.apache.el.lang.ExpressionBuilder.createMethod...
    ExpressionBuilder.java:235)
     at org.apache.el.ExpressionFactoryImpl.createMethod...
    ExpressionFactoryImpl.java:55)
     at com.ibm._jsp._PaperList._jspx_meth_h_commandLink_9
    (_PaperList.java:2403)
     at com.ibm._jsp._PaperList._jspService(_PaperList.java:395)


    These modules we are using EL language.

    Please suggest.

    Thanks,
    Chinna.



  • 7.  WAS migration 6.1 to 8

    Posted Tue October 09, 2012 06:55 AM
    Hi chinna,

      Seems and code error.
     
      I have found the next:

      In our project, We were getting "javax.el.ELException: Not a Valid Method Expression"
     
      In WAS 7, JSF tags cannot have an empty string as their value
     
      The cause of this exception was that, certain JSF components had empty string as their value.
     
     
     
     
     
     
      I suggest to review not working modules.
     
      Hope this helps.
     
    Regards


  • 8.  WAS migration 6.1 to 8

    Posted Tue October 09, 2012 06:57 AM
    1. Check if any of your JSF files have an empty value
    2. Check if there are any FFDC files and share
    3. check myfaces version compatibility with WAS8/Java6


  • 9.  WAS migration 6.1 to 8

    Posted Tue October 09, 2012 07:33 AM
    In addition to joseph's suggest. 

    WAS 8 supported JSF versions:

    Apache MyFaces 2.0 or the Sun Reference Implementation 1.2 of JSF

    pic.dhe.ibm.com/infocenter/wasinfo/v8r0/...

    regards,


  • 10.  WAS migration 6.1 to 8

    Posted Wed October 10, 2012 03:08 AM
    Hi Gabriel,

    We have deployed JSF application, post increasing session timeout value. We are able to login into application, if we click some modules its not working because of EL exception, not valid method.

    Post server restart, application login page also not coming. We are getting below error in log in page.

    Error:

    An Error Occurred:


    com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoClassDefFoundError: com/sun/faces/taglib/jsf_core/ViewTag

    Caused by:
    java.lang.NoClassDefFoundError - com/sun/faces/taglib/jsf_core/ViewTag

    Post deployment we are able to login and work with application , after bouncing the server we are getting this problem.


    Please suggest.

    Thanks,
    Chinna.


  • 11.  WAS migration 6.1 to 8

    Posted Thu October 11, 2012 10:45 PM
    Hi chinna,

      I suggest first  to review that you have properly configure JSF environmet.

      pic.dhe.ibm.com/infocenter/wasinfo/v8r0/...


      and the review not working modules.

      Tell us if you need more support.

    regards,


  • 12.  WAS migration 6.1 to 8

    Posted Fri October 19, 2012 09:25 AM
    Hi Gabriel,

    We have solved many issues. One more exeption is exist, one of the modle window(dialog box) is not working in application in WAS 8.0.

    We are getting below exception in logs.

    Error:


    10/9/12 16:50:53:622 IST] 0000003a LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
    [10/9/12 16:50:53:622 IST] 0000003a lifecycle     E   JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /JSP/workflow/config/SelectFields.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@47e03251]
    [10/9/12 16:50:53:622 IST] 0000003a servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause Faces Servlet: javax.servlet.ServletException: [#msg] is not a valid Java identifier
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1229)


     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
    Caused by: javax.el.ELException: [#msg] is not a valid Java identifier
     at org.apache.el.parser.AstIdentifier.setImage(AstIdentifier.java:132)
     at org.apache.el.parser.ELParser.Identifier(ELParser.java:1215)
     at org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1191)
     at org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1017)


    Error 500: javax.servlet.ServletException: [#msg] is not a valid Java identifier



    Please suggest.

    Thanks,

    Chinna.


  • 13.  WAS migration 6.1 to 8

    Posted Thu October 25, 2012 03:59 PM
    Hi Chinna,

      I think that you have some error at code level based on the next links:
     
      stackoverflow.com/questions/3879794/spri...

      stackoverflow.com/questions/6233473/java...

      you have [#msg] in some point of your code that is not supported and is a reserved keyword in the Java Programming Language(tm).
     
      Hope this helps.
     
    regards,


  • 14.  WAS migration 6.1 to 8

    Posted Fri October 26, 2012 06:41 AM
    add this to your java options and give a try :

    -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true


  • 15.  WAS migration 6.1 to 8

    Posted Fri October 26, 2012 10:35 AM
    jajajaja sure Joseph


    According to EL, the Whatever comes to the right of the dot operator must follow normal Java naming rules for identifiers.

    The org.apache.el.parser.SKIP_IDENTIFIER_CHECK is provided for non-specification compliant applications but is is strongly recommended that applications fix any bugs that rely on this feature for a work-around.

    I think that is better if they fix the problem....but you give faster solution.

    regards,


  • 16.  WAS migration 6.1 to 8

    Posted Fri October 26, 2012 01:58 PM
    Agree
    If the app size is small .. it will be easy to rewrite but if app is big then problem is BIG


  • 17.  WAS migration 6.1 to 8

    Posted Fri October 26, 2012 06:15 PM
    Totally agree with you Joseph, I understand your suggestion....

    I always tell my clients that there are no shortcuts in migration process.  Normally the easiest is migrate the infrastucture (WAS version) and the hardest is migrate the applications, to be "native WAS version", that is to be aligned with the SDK version and specifications.

    I think it's best to plan migration of applications carefully.

    Always in the migrations plan there to paths to be must completed one for applications and one for product.  As the product normally supports previous versions, people believe that migrating the product and deploying applications already completed migration.

    sometimes cheap is expensive