MyFaces Core
  1. MyFaces Core
  2. MYFACES-2165

concurrent issue in initializing myfaces 1.1.6

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.6
    • Fix Version/s: 1.1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      tomcat 6.0.18 java 1.6.0_06

      Description

      after starting tomcat, we will get a error when i visit a faces page. we can fix this issue by restarting tomcat. so i think it's concurrent issue.
      java.lang.NullPointerException
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:388)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:222)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      at org.apache.shale.validator.faces.ValidatorViewHandler.renderView(ValidatorViewHandler.java:130)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at cn.com.brilliance.begen.webapp.servlet.BeGenFilter.doFilter(BeGenFilter.java:56)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at cn.com.brilliance.begen.webapp.servlet.LoginServlet.doPost(LoginServlet.java:91)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

      1. myfaces-1.1.5-patched.zip
        1.34 MB
        Leonardo Uribe
      2. MYFACES-2165.patch
        2 kB
        Leonardo Uribe

        Activity

        Hide
        Simon Godard added a comment -

        We had the same problem on a customer environment:
        tomcat 5.5.23, myfaces 1.1.5

        2009-04-23 13:18:38,285 ERROR [http-443-Processor2] org.apache.catalina.core.ContainerBase.[TrueSight].[localhost].[/].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception
        java.lang.NullPointerException
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:312)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getViewIdPath(JspViewHandlerImpl.java:263)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getActionURL(JspViewHandlerImpl.java:145)
        at com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:788)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer.getActionUrl(HtmlRenderer.java:77)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase.getActionUrl(HtmlFormRendererBase.java:127)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase.encodeBegin(HtmlFormRendererBase.java:102)
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
        at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
        at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
        at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:579)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

        Show
        Simon Godard added a comment - We had the same problem on a customer environment: tomcat 5.5.23, myfaces 1.1.5 2009-04-23 13:18:38,285 ERROR [http-443-Processor2] org.apache.catalina.core.ContainerBase. [TrueSight] . [localhost] . [/] . [Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:312) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getViewIdPath(JspViewHandlerImpl.java:263) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getActionURL(JspViewHandlerImpl.java:145) at com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:788) at org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer.getActionUrl(HtmlRenderer.java:77) at org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase.getActionUrl(HtmlFormRendererBase.java:127) at org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase.encodeBegin(HtmlFormRendererBase.java:102) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:579) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        Hide
        Leonardo Uribe added a comment -

        It seems to be different issues and there are not related to myfaces 1.2.6. Checking the code and the line numbers the version where this error come from is 1.1.6 or 1.1.5. The error presented is the same and the cause is the call to servletMapping.getUrlPattern();

        Here is part of the code:

        private static ServletMapping getServletMapping(ExternalContext externalContext) {
        String servletPath = externalContext.getRequestServletPath();
        String requestPathInfo = externalContext.getRequestPathInfo();

        WebXml webxml = WebXml.getWebXml(externalContext);
        List mappings = webxml.getFacesServletMappings();

        if (requestPathInfo == null) {
        // might be extension mapping
        for (int i = 0, size = mappings.size(); i < size; i++) {
        ServletMapping servletMapping = (ServletMapping) mappings.get;
        String urlpattern = servletMapping.getUrlPattern(); //NullPointerException!!!!

        Show
        Leonardo Uribe added a comment - It seems to be different issues and there are not related to myfaces 1.2.6. Checking the code and the line numbers the version where this error come from is 1.1.6 or 1.1.5. The error presented is the same and the cause is the call to servletMapping.getUrlPattern(); Here is part of the code: private static ServletMapping getServletMapping(ExternalContext externalContext) { String servletPath = externalContext.getRequestServletPath(); String requestPathInfo = externalContext.getRequestPathInfo(); WebXml webxml = WebXml.getWebXml(externalContext); List mappings = webxml.getFacesServletMappings(); if (requestPathInfo == null) { // might be extension mapping for (int i = 0, size = mappings.size(); i < size; i++) { ServletMapping servletMapping = (ServletMapping) mappings.get ; String urlpattern = servletMapping.getUrlPattern(); //NullPointerException!!!!
        Hide
        Simon Godard added a comment -

        I don't understand how the Servlet mapping could be null.

        Do you have an idea of what could cause this intermittent problem? Our customer is very reluctant to restart his Tomcat server...

        Show
        Simon Godard added a comment - I don't understand how the Servlet mapping could be null. Do you have an idea of what could cause this intermittent problem? Our customer is very reluctant to restart his Tomcat server...
        Hide
        Leonardo Uribe added a comment -

        Checking the two stack traces, the problem described is the same.

        The problem is present on shared 2.0.x, class org.apache.myfaces.shared.webapp.webxml.WebXml

        in JspViewHandler is seen as org.apache.myfaces.shared_impl.webapp.webxml.WebXml

        A patch is attached that potentially solve the problem. The problem is simple: one thread initialize and the other get the mappings, but since the first one hasn't ended yet, the NullPointerException is thrown.

        The problem is present on both shared 2.0.x and 3.0.x, so it potentially affects 1.2.x branch (note that the code JspViewHandler is different between 1.1.x and 1.2.x)

        If there is confirmation of the patch provided solves the problem, I'll commit the solution on both branches.

        Show
        Leonardo Uribe added a comment - Checking the two stack traces, the problem described is the same. The problem is present on shared 2.0.x, class org.apache.myfaces.shared.webapp.webxml.WebXml in JspViewHandler is seen as org.apache.myfaces.shared_impl.webapp.webxml.WebXml A patch is attached that potentially solve the problem. The problem is simple: one thread initialize and the other get the mappings, but since the first one hasn't ended yet, the NullPointerException is thrown. The problem is present on both shared 2.0.x and 3.0.x, so it potentially affects 1.2.x branch (note that the code JspViewHandler is different between 1.1.x and 1.2.x) If there is confirmation of the patch provided solves the problem, I'll commit the solution on both branches.
        Hide
        Leonardo Uribe added a comment -

        committed solution on both branches but since there is no confirmation of the patch provided solves the problem, this will be let open

        Show
        Leonardo Uribe added a comment - committed solution on both branches but since there is no confirmation of the patch provided solves the problem, this will be let open
        Hide
        Leonardo Uribe added a comment -

        I'll close this one as fixed, if it appears again, I'll reopen it

        Show
        Leonardo Uribe added a comment - I'll close this one as fixed, if it appears again, I'll reopen it
        Hide
        Anudeep CA added a comment -

        Hi, We are facing the same issue with myfaces 1.1.5 jar with Jboss server. Only jboss restart resolves it.

        We have tried to use jars with higher versions(tried 1.1.7 and 1.2.6), it resolves this, but it is leading to many other UI issues.
        The 1.1.5 jars are being used since long time and we are not in a position to replace jars to higher versions and fix new issues as the application is already running at customer sites.

        It will be very helpful if it's possible to provide a jar patch for the 1.1.5 version itself.

        Show
        Anudeep CA added a comment - Hi, We are facing the same issue with myfaces 1.1.5 jar with Jboss server. Only jboss restart resolves it. We have tried to use jars with higher versions(tried 1.1.7 and 1.2.6), it resolves this, but it is leading to many other UI issues. The 1.1.5 jars are being used since long time and we are not in a position to replace jars to higher versions and fix new issues as the application is already running at customer sites. It will be very helpful if it's possible to provide a jar patch for the 1.1.5 version itself.
        Hide
        Jakob Korherr added a comment -

        If you want the patch to be applied for 1.1.5, the best you can do is to checkout the 1.1.5 release branch of myfaces, apply the patch locally and build it yourself using maven.

        You can find the core-branch at https://svn.apache.org/repos/asf/myfaces/core/branches/1_1_5 and the shared-branch (on which you need to apply the patch) at https://svn.apache.org/repos/asf/myfaces/shared/branches/2_0_5.

        But note that you have to build shared before core in order to work properly!

        Show
        Jakob Korherr added a comment - If you want the patch to be applied for 1.1.5, the best you can do is to checkout the 1.1.5 release branch of myfaces, apply the patch locally and build it yourself using maven. You can find the core-branch at https://svn.apache.org/repos/asf/myfaces/core/branches/1_1_5 and the shared-branch (on which you need to apply the patch) at https://svn.apache.org/repos/asf/myfaces/shared/branches/2_0_5 . But note that you have to build shared before core in order to work properly!
        Hide
        Leonardo Uribe added a comment -

        It could be good to know which UI issues you have when upgrading, so if it is a bug on myfaces we can fix it.

        Show
        Leonardo Uribe added a comment - It could be good to know which UI issues you have when upgrading, so if it is a bug on myfaces we can fix it.
        Hide
        Anudeep CA added a comment -

        Hi, thanks for the information.
        We have download the source code and tried to apply the patch. We are facing few issues.
        1. The patch file could not be applied using ToprtoiseSVN 'Apply Patch' option. So the changes had to be put manually to the file.
        2. The maven build of core component failed due tot he error below. Due to this the files "myfaces_core.tld" and "myfaces_html.tld" are not getting created.

        [INFO] ----------------------------------------------------------------------
        [INFO] Building Impl
        [INFO] task-segment: [clean, install]
        [INFO] ----------------------------------------------------------------------
        [INFO] [clean:clean]
        [INFO] Deleting directory D:\myfaces\impl\target
        [INFO] [xslt:transform

        {execution: default}

        ]
        [INFO] # of XML files: 2
        [INFO] transform, srcFile: D:\myfaces\impl\src\main\tld\myfaces_core.tld, des
        le: D:\myfaces\impl\target\classes\META-INF\myfaces_core.tld
        ERROR: 'java.sun.com'
        ERROR: 'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: java..com'
        javax.xml.transform.TransformerException: javax.xml.transform.TransformerExceon: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: java.sun.c at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:654)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:281)
        at org.codehaus.mojo.xslt.XsltMojo.execute(XsltMojo.java:133)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlnManager.java:453)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWitfecycle(DefaultLifecycleExecutor.java:500)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DeltLifecycleExecutor.java:479)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAnddleFailures(DefaultLifecycleExecutor.java:331)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegts(DefaultLifecycleExecutor.java:292)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaulfecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImjava:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcsorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:4
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.irnal.utils.WrappedRuntimeException: java.sun.com
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOransformerImpl.java:496)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:644)
        ... 20 more
        Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: javun.com
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTMLTCDTMManager.java:393)
        at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTMLTCDTMManager.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOransformerImpl.java:474)
        ... 21 more
        ---------
        javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utiWrappedRuntimeException: java.sun.com
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDO
        ransformerImpl.java:496)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:644)
        .....................
        ....................
        ..................
        .....................
        .....................

        Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec
        Running org.apache.myfaces.test.ImplClassElementTestCase
        Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.031 sec <<< FA
        ILURE!
        Running org.apache.myfaces.el.PropertyResolverTestCase
        Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
        Running org.apache.myfaces.application.jsp.JspStateManagerImplTest
        Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec

        Results :

        Tests in error:
        testClassPath(org.apache.myfaces.test.ImplClassElementTestCase)

        Tests run: 10, Failures: 0, Errors: 1, Skipped: 0

        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] There are test failures.

        Is this because during build we are not able to connect to "java.sun.com"?
        Could you please let me know why we have to download the shared component with version 2.0.5 and not 1.1.5?

        Show
        Anudeep CA added a comment - Hi, thanks for the information. We have download the source code and tried to apply the patch. We are facing few issues. 1. The patch file could not be applied using ToprtoiseSVN 'Apply Patch' option. So the changes had to be put manually to the file. 2. The maven build of core component failed due tot he error below. Due to this the files "myfaces_core.tld" and "myfaces_html.tld" are not getting created. [INFO] ---------------------------------------------------------------------- [INFO] Building Impl [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------- [INFO] [clean:clean] [INFO] Deleting directory D:\myfaces\impl\target [INFO] [xslt:transform {execution: default} ] [INFO] # of XML files: 2 [INFO] transform, srcFile: D:\myfaces\impl\src\main\tld\myfaces_core.tld, des le: D:\myfaces\impl\target\classes\META-INF\myfaces_core.tld ERROR: 'java.sun.com' ERROR: 'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: java..com' javax.xml.transform.TransformerException: javax.xml.transform.TransformerExceon: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: java.sun.c at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:654) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:281) at org.codehaus.mojo.xslt.XsltMojo.execute(XsltMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlnManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWitfecycle(DefaultLifecycleExecutor.java:500) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DeltLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAnddleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegts(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaulfecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImjava:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcsorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:4 at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.irnal.utils.WrappedRuntimeException: java.sun.com at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOransformerImpl.java:496) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:644) ... 20 more Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: javun.com at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTMLTCDTMManager.java:393) at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTMLTCDTMManager.java:228) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOransformerImpl.java:474) ... 21 more --------- javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utiWrappedRuntimeException: java.sun.com at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDO ransformerImpl.java:496) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transm(TransformerImpl.java:644) ..................... .................... .................. ..................... ..................... Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec Running org.apache.myfaces.test.ImplClassElementTestCase Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.031 sec <<< FA ILURE! Running org.apache.myfaces.el.PropertyResolverTestCase Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Running org.apache.myfaces.application.jsp.JspStateManagerImplTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec Results : Tests in error: testClassPath(org.apache.myfaces.test.ImplClassElementTestCase) Tests run: 10, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Is this because during build we are not able to connect to "java.sun.com"? Could you please let me know why we have to download the shared component with version 2.0.5 and not 1.1.5?
        Hide
        Leonardo Uribe added a comment -

        Is this because during build we are not able to connect to "java.sun.com"?

        Yes, I remember this issue. Since 1.1.6, we changed that stuff to use myfaces-builder-plugin instead, so that problem is not present now. You have to build the sources from a computer with internet connection.

        Could you please let me know why we have to download the shared component with version 2.0.5 and not 1.1.5?

        A full explanation is here: http://myfaces.apache.org/shared11/

        In few words, "shared" code is part of "core", so you need to build first apply the patch on shared, compile shared-core and shared-impl and then compile myfaces core, so myfaces could unpack shared-impl and put the code that requires to be patched.

        Show
        Leonardo Uribe added a comment - Is this because during build we are not able to connect to "java.sun.com"? Yes, I remember this issue. Since 1.1.6, we changed that stuff to use myfaces-builder-plugin instead, so that problem is not present now. You have to build the sources from a computer with internet connection. Could you please let me know why we have to download the shared component with version 2.0.5 and not 1.1.5? A full explanation is here: http://myfaces.apache.org/shared11/ In few words, "shared" code is part of "core", so you need to build first apply the patch on shared, compile shared-core and shared-impl and then compile myfaces core, so myfaces could unpack shared-impl and put the code that requires to be patched.
        Hide
        Leonardo Uribe added a comment -

        I have attached a build of myfaces 1.1.5 with the patch of this issue. I hope this helps.

        It could be good to know which UI issues you have when upgrading, so if it is a bug on myfaces we can fix it.

        Show
        Leonardo Uribe added a comment - I have attached a build of myfaces 1.1.5 with the patch of this issue. I hope this helps. It could be good to know which UI issues you have when upgrading, so if it is a bug on myfaces we can fix it.
        Hide
        Anudeep CA added a comment -

        Thanks a lot. This will be very much helpful.

        Regarding the UI issues faced when upgraded with higher versions of jars, below are the stack traces found.
        Although I am not sure if the errors are due to myfaces alone. I am posting them only for your information.

        Error for 1.2.6 jars:
        This error occurred when launching a page(page did not launch) having a data table with column for Date and time.

        (ApplicationDispatcher.java:719) [[jsp]] Servlet.service() for servlet jsp threw exception
        java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone
        at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:374)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
        at org.apache.myfaces.shared_impl.taglib.UIComponentELTagUtils.evaluateValueExpression(UIComponentELTagUtils.java:378)
        at org.apache.myfaces.taglib.core.ConvertDateTimeTag.setConverterTimeZone(ConvertDateTimeTag.java:213)
        at org.apache.myfaces.taglib.core.ConvertDateTimeTag.createConverter(ConvertDateTimeTag.java:137)
        at javax.faces.webapp.ConverterELTag.doStartTag(ConverterELTag.java:62)
        at org.apache.myfaces.taglib.core.ConvertDateTimeTag.doStartTag(ConvertDateTimeTag.java:125)
        .................................
        ................................
        An exception occurred javax.faces.FacesException: java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:347)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
        at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
        at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        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:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

        Errors found for 1.1.7 jars:
        Even this page had a data table.

        (ApplicationDispatcher.java:719) [[jsp]] Servlet.service() for servlet jsp threw exception
        java.lang.NullPointerException
        at javax.faces.component.html.HtmlOutputText.getStyleClass(HtmlOutputText.java:76)
        at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585) at javax.faces.component._ComponentAttributesMap.getComponentProperty(_ComponentAttributesMap.java:394)
        at javax.faces.component._ComponentAttributesMap.get(_ComponentAttributesMap.java:235)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderHTMLAttributesWithOptionalStartElement(HtmlRendererUtils.java:585)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutputText(HtmlTextRendererBase.java:108)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:80)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:775)
        at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:420)
        at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
        .............................
        .............................
        ........................
        An exception occurred
        javax.faces.FacesException: javax.faces.FacesException: Exception while calling encodeEnd on :

        {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /pages/elements.jsp][Class: javax.faces.component.html.HtmlForm,Id: elementsForm][Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id: installedComponents][Class: javax.faces.component.UIColumn,Id: replication][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp45]}

        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:432)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:255)
        at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
        at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)

        Show
        Anudeep CA added a comment - Thanks a lot. This will be very much helpful. Regarding the UI issues faced when upgraded with higher versions of jars, below are the stack traces found. Although I am not sure if the errors are due to myfaces alone. I am posting them only for your information. Error for 1.2.6 jars: This error occurred when launching a page(page did not launch) having a data table with column for Date and time. (ApplicationDispatcher.java:719) [ [jsp] ] Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:374) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101) at org.apache.myfaces.shared_impl.taglib.UIComponentELTagUtils.evaluateValueExpression(UIComponentELTagUtils.java:378) at org.apache.myfaces.taglib.core.ConvertDateTimeTag.setConverterTimeZone(ConvertDateTimeTag.java:213) at org.apache.myfaces.taglib.core.ConvertDateTimeTag.createConverter(ConvertDateTimeTag.java:137) at javax.faces.webapp.ConverterELTag.doStartTag(ConverterELTag.java:62) at org.apache.myfaces.taglib.core.ConvertDateTimeTag.doStartTag(ConvertDateTimeTag.java:125) ................................. ................................ An exception occurred javax.faces.FacesException: java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:347) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337) at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 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:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) Errors found for 1.1.7 jars: Even this page had a data table. (ApplicationDispatcher.java:719) [ [jsp] ] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at javax.faces.component.html.HtmlOutputText.getStyleClass(HtmlOutputText.java:76) at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at javax.faces.component._ComponentAttributesMap.getComponentProperty(_ComponentAttributesMap.java:394) at javax.faces.component._ComponentAttributesMap.get(_ComponentAttributesMap.java:235) at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderHTMLAttributesWithOptionalStartElement(HtmlRendererUtils.java:585) at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutputText(HtmlTextRendererBase.java:108) at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:80) at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:775) at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:420) at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401) ............................. ............................. ........................ An exception occurred javax.faces.FacesException: javax.faces.FacesException: Exception while calling encodeEnd on : {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /pages/elements.jsp][Class: javax.faces.component.html.HtmlForm,Id: elementsForm][Class: org.apache.myfaces.component.html.ext.HtmlDataTable,Id: installedComponents][Class: javax.faces.component.UIColumn,Id: replication][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp45]} at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:432) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:255) at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)
        Hide
        Leonardo Uribe added a comment -

        The error found with 1.1.7:

        (ApplicationDispatcher.java:719) [[jsp]] Servlet.service() for servlet jsp threw exception
        java.lang.NullPointerException
        at javax.faces.component.html.HtmlOutputText.getStyleClass(HtmlOutputText.java:76

        was solved on MYFACES-2006. 1.1.8 jars released include this fix. So it could be good if you try 1.1.8 jars and if works I suggest you use them.

        I'll investigate the one related to ConvertDateTimeTag

        Show
        Leonardo Uribe added a comment - The error found with 1.1.7: (ApplicationDispatcher.java:719) [ [jsp] ] Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at javax.faces.component.html.HtmlOutputText.getStyleClass(HtmlOutputText.java:76 was solved on MYFACES-2006 . 1.1.8 jars released include this fix. So it could be good if you try 1.1.8 jars and if works I suggest you use them. I'll investigate the one related to ConvertDateTimeTag
        Hide
        Leonardo Uribe added a comment -

        The error found in 1.2.6:

        (ApplicationDispatcher.java:719) [[jsp]] Servlet.service() for servlet jsp threw exception
        java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone
        at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:374)

        It was solved on MYFACES-2177 which was fixed on 1.2.7. It could be good if you try 1.2.9 jars and if works I strongly suggest you use them, because it is considered the latest releases contains many fixed issues.

        Show
        Leonardo Uribe added a comment - The error found in 1.2.6: (ApplicationDispatcher.java:719) [ [jsp] ] Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: Cannot convert IST of type class java.lang.String to class java.util.TimeZone at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:374) It was solved on MYFACES-2177 which was fixed on 1.2.7. It could be good if you try 1.2.9 jars and if works I strongly suggest you use them, because it is considered the latest releases contains many fixed issues.

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            xuxiankun
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development