1 Reply Latest reply on Sep 5, 2012 2:43 AM by Juraj Húska

    Updating Richfaces from 4.0.2 to 4.2.2 breaks web app deployment

    cd greb Newbie

      An existing and working Netbeans v7.0 project had it's 4 richfaces jars replaced to a newer version after which the project was cleaned and built successfully, the glassfish server was stopped and the web app was deployed unsuccessfully. Here are the error highlights from what was logged:

       

      The netbean "Glassfish Server 3.1" tab: ... INFO:

      WELD-000900 ${parsedVersion (osgiVersion})

      SEVERE: Exception while loading the app

      SEVERE: Exception while shutting down application container

      SEVERE: Exception while shutting down application container : java.lang.NullPointerException

       

      The netbean projectname "(run-deploy)" tab:

      ... Initializing...

      deploy?DEFAULT=[path-to-project]/build/web&name=MisThirdPartyUpdate&force=true failed on Glasfish Server 3.1

      Error occurred during deployment: Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details.

      [path-to-project]/nbproject/build-impl.xml:782:

      The module has not been deployed.  

        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187)  

        at org.netbeans.modules.j2ee.ant.Deploy.execution(Deploy.java:106)  

        ...[14 more levels]

      BUILD FAILED (total time: 23 seconds)

       

      server.log file:

      ...

      SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=36;_ThreadName=Thread-1;|Exception while loading the app[#]

      SEVERE|glassfish3.1|javax.enterprise.system.tools.admon.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=Thread-1;|Exception while shutting down application container[#]

      SEVERE|glassfish3.1|javax.enterprise.system.tools.admon.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=Thread-1;|Exception while shutting down application container : java.lang.NullPointerException[#]

       

      Now here is the strange part, if I replace a certain 1 of the 4 richfaces jar files the project deploys and runs perfectly. That is, I replaced richfaces-core-impl-4.2.2.Final.jar with richfaces-core-impl-4.0.0.Final.jar, i.e. I have 3 jars from 4.2.2 and 1 from 4.0.0. As I said earlier, the project will also deploy and run perfectly if I have all 4 Richfaces 4.0.0 jars in the build path.

       

      Here is the exhaustive ordered list of jars in this projects build path when it can not deploy:

      tomahawk-1.1.8.jar

      annotations-4.2.1.Final.jar

      log4j-1.2.17.jar

      cssparser-0.9.5.jar

      guava-11.0.2.jar

      hibernate-validator-3.0.0.ga.jar sac-1.3.jar

      richfaces-components-api-4.2.2.Final.jar

      richfaces-components-ui-4.2.2.Final.jar

      richfaces-core-api-4.2.2.Final.jar

      richfaces-core-impl-4.2.2.Final.jar

      validation-api-1.0.0.GA.jar

      primefaces-3.3.jar

      hibernate3.jar

      mail.jar

      poi-3.2-FINAL-20081019.jar

      poi-contrib-3.2-FINAL-20081019.jar

      poi-scratchpad-3.2-FINAL-20081019.jar

      iText-5.0.4.jar

      resolver.jar

      xbean.jar

      xbean_xpath.jar

      xmlbeans-qname.jar

      xmlpublic.jar

      dom4j-1.6.1.jar

      commons-logging-1.1.1.jar

      commons-collections-3.2.1.jar

      antlr-2.7.6rc1.jar

      commons-el-1.0.jar

       

      I'm using java version 1.6.0_33.

       

      From a similar bug report, http://stackoverflow.com/questions/7195243/exception-while-loading-the-app-without-a-stack-trace, I made sure both beans.xml files were zero length. Also, based on this report as well as http://www.wobblycogs.co.uk/index.php/computing/jee/53-glassfish-31-exception-while-loading, I made sure all my beans with "@SessionScope" implemented Serializable.

       

      To me, the fact that it will run with an older version of one of the richfaces jars should be a big clue.

       

      Ideas???