10 Replies Latest reply on Jul 16, 2008 10:23 AM by brian.stansberry

    JBAS-4960 - broken merge

      With the latest change to the JBossWebMetaData, the merge is failing
      due to an NPE.

      Caused by: java.lang.NullPointerException
       at org.jboss.metadata.web.jboss.JBossWebMetaData.merge(JBossWebMetaData.java:1051)
       at org.jboss.metadata.web.jboss.JBossWebMetaData.merge(JBossWebMetaData.java:871)
       at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:101)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:162)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
       ... 18 more
      


      This is caused by the change in maxActiveSessions:
      - private int maxActiveSessions = -1;
      + private Integer maxActiveSessions = null;
      


      breaking this code (line 1051 is the if statement):
       if(override != null && override.maxActiveSessions != -1)
       setMaxActiveSession(override.maxActiveSessions);
      


        • 1. Re: JBAS-4960 - broken merge

          I "fixed it" by changing the code to read:

           if(override != null && override.maxActiveSessions != null && override.maxActiveSessions != -1)
           setMaxActiveSession(override.maxActiveSessions);
          


          • 2. Re: JBAS-4960 - broken merge

            I also had to "fix" the Tomcat deployer.
            Can you check this patch?

            [ejort@warjort tomcat]$ svn diff
            Index: src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
            ===================================================================
            --- src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java (revision 66950)
            +++ src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java (working copy)
            @@ -769,11 +769,12 @@
             if (metaData.getDistributable() != null)
             {
             ReplicationConfig repCfg = metaData.getReplicationConfig();
            - repCfg.setDefaultCacheName(this.cacheName);
            - repCfg.setDefaultUseJK(this.useJK);
            - repCfg.setDefaultSnapshotMode(this.snapshotMode);
            - repCfg.setDefaultSnapshotInterval(this.snapshotInterval);
            - repCfg.setDefaultUseLocalCache(this.useLocalCache);
            + repCfg.setCacheName(this.cacheName);
            + repCfg.setUseJKBoolean(this.useJK);
            + repCfg.setSnapshotMode(this.snapshotMode);
            + repCfg.setSnapshotIntervalInteger(this.snapshotInterval);
            + // This appears to be not used anymore??? - See JBAS-4960
            + //repCfg.setUseLocalCache(this.useLocalCache);
             }
            
             //Check if there are any xacml policy files
            


            • 3. Re: JBAS-4960 - broken merge
              brian.stansberry

              Crap. I'm sorry, Adrian; :-( I'd thought I'd tested this against a clean AS checkout, but it seems it wasn't clean.

              • 4. Re: JBAS-4960 - broken merge

                I think you must have forgetten to commit it to repository.jbosa.com? :-)

                But the merge problem was causing one of the tests to fail in the metadata project itself.

                • 5. Re: JBAS-4960 - broken merge
                  brian.stansberry

                  Yeah, no excuse there. I think I'm going to hack my svn client to disallow commits between 6:00 PM Friday and 9:00 AM Monday. The risk/reward ratio is just too high.

                  • 6. Re: JBAS-4960 - broken merge

                    Try the following shell script :-)

                    safecommit.sh

                    #/usr/bin/sh
                    
                    makeBloodAlcoholTest.sh && svn commit $@
                    


                    • 7. Re: JBAS-4960 - broken merge
                      brian.stansberry

                      LOL. I wish it were so simple. More like:

                      #/usr/bin/sh
                      
                      check2YearOldIsNotInOffice.sh && checkWifeIsNotHasslingToGoShopping.sh && svn commit $@
                      


                      Glad to see that your blood alcohol test doesn't state that high is the incorrect result. :)

                      • 8. Re: JBAS-4960 - broken merge
                        alesj

                         

                        "bstansberry@jboss.com" wrote:
                        Glad to see that your blood alcohol test doesn't state that high is the incorrect result. :)

                        The test should have some way of connecting to calendar and determine what is the 'appropriate' level, depending on the location. :-)

                        • 9. Re: JBAS-4960 - broken merge
                          suvra82002

                          Hi,

                          I need a help...

                          I wil explain the setup 1st....I need to install rhel5 images on some linux boxes.The requirement is that ones the system boots Jboss shud be up and running.Yups.....I have the init script with meto do that.....

                          But the requirement is to write a script for Jboss clustering so that when the system is booted clustering on jboss is setup and up and running.

                          So i shud have the init script for service and one more script for automating the cluster in all the nodes.....(may be 2-4 nodes cluster)

                          Pls if any one has such script or knows some pdf or links kindly send me asap......

                          i need it urgently....

                          Regards
                          Suvra Chakraborty

                          • 10. Re: JBAS-4960 - broken merge
                            brian.stansberry

                            I don't understand. Starting jboss with the 'all' configuration starts the clustering features.

                            Please post on the user forum Clustering/JBoss if you need help. This forum is for discussing the internal design of JBoss AS clustering features.