10 Replies Latest reply on Jul 16, 2008 10:23 AM by Brian Stansberry

    JBAS-4960 - broken merge

    Adrian Brock Master

      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)

        • 1. Re: JBAS-4960 - broken merge
          Adrian Brock Master

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

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

          • 2. Re: JBAS-4960 - broken merge
            Adrian Brock Master

            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 Master

              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
                Adrian Brock Master

                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 Master

                  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
                    Adrian Brock Master

                    Try the following shell script :-)


                    makeBloodAlcoholTest.sh && svn commit $@

                    • 7. Re: JBAS-4960 - broken merge
                      Brian Stansberry Master

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

                      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
                        Ales Justin Master


                        "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
                          Suvra Chakraborty Newbie


                          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....

                          Suvra Chakraborty

                          • 10. Re: JBAS-4960 - broken merge
                            Brian Stansberry Master

                            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.