MyFaces Core
  1. MyFaces Core
  2. MYFACES-2686

javax.faces.FacesException: java.lang.NumberFormatException while initializing if MANIFEST.MF version exceeds int value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.8, 2.0.0
    • Fix Version/s: 1.2.9, 2.0.1
    • Component/s: General
    • Labels:
      None
    • Environment:
      Windows XP, Tomcat 6.0.26, MyFaces 2.0.0

      Description

      Prerequisites:

      My Application contains three libraries (WEB-INF/lib) where version exceeds integer boundaries:
      spring-modules-cache-1.0-rc1-20060714150240.jar
      spring-modules-jbpm31-0.1-20060714150320.jar
      spring-modules-jcr-1.0-dev-20060714150325.jar

      MANIFEST.MF (of the first one) looks like as follows:

      Manifest-Version: 1.0
      Ant-Version: Apache Ant 1.6.5
      Created-By: 1.5.0_07-b03 (Sun Microsystems Inc.)
      Implementation-Vendor: springframework.org
      Implementation-Title: $

      {project.title}

      Implementation-Version: 1.0-rc1-20060714150240

      SCENARIO: If the MyFaces is being initialized on application startup, it parses meta-inf information from MANIFEST.MF of all jars in classpath. And the following exception is thrown:

      SEVERE: An error occured while initializing MyFaces: java.lang.NumberFormatException: For input string: "20060714150240"
      javax.faces.FacesException: java.lang.NumberFormatException: For input string: "20060714150240"
      at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:653)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:510)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:243)
      at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:113)
      at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:186)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:159)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NumberFormatException: For input string: "20060714150240"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:461)
      at java.lang.Integer.valueOf(Integer.java:554)
      at org.apache.myfaces.config.FacesConfigurator$Version.<init>(FacesConfigurator.java:2492)
      at org.apache.myfaces.config.FacesConfigurator.logMetaInf(FacesConfigurator.java:592)
      ... 30 more

        Activity

        Hide
        Jakob Korherr added a comment -

        I committed the solution to this problem (changed int to long) to MyFaces core 2.0.x (trunk).

        However this should also be changed on the 1.2.x branch (note that on the 1.1.x branch this version check is not implemented), so I will commit it there as well.

        Show
        Jakob Korherr added a comment - I committed the solution to this problem (changed int to long) to MyFaces core 2.0.x (trunk). However this should also be changed on the 1.2.x branch (note that on the 1.1.x branch this version check is not implemented), so I will commit it there as well.
        Hide
        Jakob Korherr added a comment -

        Added 1.2.8 as affected version.

        Show
        Jakob Korherr added a comment - Added 1.2.8 as affected version.

          People

          • Assignee:
            Jakob Korherr
            Reporter:
            Evgeni Gordeev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development