Version 56

    You can find a brief description of how to test a patch manually




    Steps required for JBoss WebServices pre 1.2.0 patch (both against 4.0.4.GA, jdk1.4.2 and 4.0.4.GA-ejb3 profile, jdk1.5_07)


    • JDK1.4

      • Once a patch has been delivered, get the jar/sar from JIRA. ex:

      • Create a folder in your home directory for this test. I created ~/qa/webservice

      • Create a binaries folder ~/qa/webservice/binaries

      • Copy the jar/sar here. Snapshot:


    Pjhadev03Binaries$ pwd  /home/pjha/qa/webservice/binaries  Pjhadev03Binaries$ ls  jbossws14-client.jar  jbossws14.sar  jbossws-client.jar  jbossws.sar  Pjhadev03Binaries$//Note:jar/sar with 14 in their name are to be used with JDK 1.4 and other ones are for JDK1.5

      • Get the  patch-script.tar.gz from /opt and put it under ~/qa/webservice

      tar xzvf patch-script.tar.gz

      • rename the patch-script folder to the JIRA issue id, eg.JBWS-1028

      • Read the README.txt to get the details of contents under this directory

      • Delete run-tests from the build-all target as we need to do some stuff before running the test suite (due to client jars not being replaced outside the binaries)

      • Make sure your JAVA_HOME is set to JDK1.4

      • Run  ant build-all -Dcompl.number=<JBOSS_RELEASE_NUMBER> eg. 4.0.4.GA

        • The build file gets the source of given release, builds the AS, replaces all the matching jar/sar in newly built server with that from binaries folder.

      • Copy the jar/sar from binaries to thirdparty directory. Since this patch was for web servcies, I had to copy to /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/thirdparty/jboss/jbossws14/lib

      • Go to testsuite folder under newly built JBoss AS.e.g. /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/testsuite and run the all test cases

                ./ clean
                ./ tests -Dnode0= -Dnode1=$MYTESTIP_1 -DudpGroup= 
      • It takes about two hours to run all the test cases.

      • It may fail while generating test reports with OutOfMemory error. Do the following     export ANT_OPTS=-Xmx640m     ant reports

      • See the test report summary under /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/testsuite/output/reports/text

      • Make a backup of  text report under different directory

      • Some errors are known and most of them don't happen when running the test cases seperately. I ran into these errors:


     Suite:       org.jboss.test.cluster.test.DRMTestCase(Default-UDP) #########IGNORE THIS ERROR #####################
     Test:        testNonConflictingAddRemoveDeadlock
     Type:        failure
     Exception:   junit.framework.AssertionFailedError
     Message:     Acquired thread 5
     Suite:       org.jboss.test.jbossmq.test.UnackedUnitTestCase  ####NOT WITH ONE TEST
     Test:        testUnackedDurableTopic
     Type:        failure
     Exception:   junit.framework.AssertionFailedError
     Message:     Topic should be full
     Suite:       org.jboss.test.pooled.test.SSLSocketsUnitTestCase ####NOT WITH ONE TEST
     Test:        testClientCertSSLAccess
     Type:        error
     Exception:   java.rmi.AccessException
     Message:     SecurityException; nested exception is: Supplied Credential did not
      match existing credential for null
    Suite:       org.jboss.test.webservice.samples.ServerSideJMSTestCase ####NOT WITH ONE TEST
    Test:        testSOAPMessageToEndpointQueue
    Type:        failure
    Exception:   junit.framework.ComparisonFailure
    Message:     expected:<<env:Envelope xmlns:env=''><env:Header></env:Header><env:Body><ns1:getContactI
    nfoResponse xmlns:ns1='http://org.jboss.test.webservice/samples'><result>The 'mafia' boss is currently out of office, please call
    again.</result></ns1:getContactInfoResponse></env:Body></env:Envelope>> but was:<null>
      • To verify that these errors dont occur when run individually, run the server with "all" config: /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/build/output/jboss-4.0.4.GA/bin/ -c all -b $MYTEStIP_1 -u

      • From another console, run the failed test cases /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/testsuite/ -Dtest=org.jboss.test.jbossmq.test.UnackedUnitTestCase one-test Note: All tests should pass

    This verifies that the patch works with JDK1.4. If you see other errors then it means patch needs to repatched. Assign the JIRA issue back to



    cd /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4_installer/server mv default all because test suites run under "all" configuration and "default" here is basically all.

      • Copy jdk5 jar/sar.

    cp binaries/jbossws-client.jar /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4_installer/client/.   cp binaries/jboss/jbossws.sar home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4_installer/server/all/deploy/

      • Copy these jdk15 jars to thirdparty as done for JDK14. /home/pjha/qa/webservice/JBWS-1028/jboss-4.0.4.GA-src/thirdparty/jboss/jbossws/lib.   Note that it's jbossws/lib not jboss14/lib

      • Rename JBWS-1028/jboss-4.0.4.GA-src/build/output/jboss-4.0.4.GA to jboss-4.0.4.GA-temp

      • Move jboss-4.0.4_installer to JBWS-1028/jboss-4.0.4.GA-src/build/output/jboss-4.0.4.GA. Basically you are replacing the 4.0.4.GA build with the one from installer so that test can run against it.

      • Not all tests in testsuite will pass against jboss instance from installer. So, it's sufficient to pass "jboss-all-config-tests". It's better to confirm with developer in case patch specifically targets test under other test targets.

             testsuite/ clean
             testsuite/ jboss-all-config-tests -Dnode0= -Dnode1=$MYTESTIP_1 -DudpGroup=




    If some cluster tests fail


    You can run a single cluster testcase if you paste the contents of the following file ClusterTestTargets.ent in the testsuites build.xml. See below (from JBAS-3814):

    From Brian Stansberry:
    I have attached an xml fragment "cluster-test-targets.ent" that can be pasted into the 4.0.3.SP1 testsuite/build.xml to give the ability to run a limited number of the clustering tests (the ones normall invoked from "tests-clustering". It adds 2 targets:
    The first uses the "Default" config, the 2nd uses the "SyncModeNUseJVM" config.
    To use for running the ScopedTestCase that's in question here:
    build -Dtest=org/jboss/test/cluster/test/ScopedTestCase* one-cluster-sync-test


    Steps required for JBoss WebServices 1.2.0+ patch

    Few points:

    • First it seems JBoss internal testsuite (at least 4.0.5GA) cannot pass with these webservices versions.

    • Sample tests seem to be unable to compile with jdk14

    • Better bind to localhost

    • You could look at WebservicesReleaseGuide for hints

    • When running ws-internal and samples tests keep directory path short as classpath can get truncated and many tests fail!

    for example use /home/username/a/jbossws instead of /home/username/JBWS-1222/checkout/jbossws-1.2.1GA


    Generally for any tests we do:

    1. compile  (jbossws - laways jdk15, others - jdk we want to test)

    2. deploy the GA WS version (use proper target for any jboss/jdk combination but using jdk15)

    3. patch (see "Instructions on how to patch" below)

    4. run tests

    5. check if files stay patched after the testing (were not replaced somehow)

    6. compare with non-patched results


    Hence here is how did we tested last patches against JBoss AS 4.0.5GA ( See a well):


    1. setup environment

      1. cd; mkdir a; cd a; svn export jbossws (patch branch); svn export jbossws-GA; svn export jbossas-4.0.5

      2. assume $testdir is current dir, $jbossws is $testdir/jbossws, $jboss is $testdir/jboss

      3. download binary versions of JBossAS 4.2GA, 5 BETA2 and tomcat 5

      4. For every test assume you have this clean environment

    2. JBoss AS 4.0.5GA, jdk15, ws-internal and samples

      1. assume we always use jdk5

      2. build jboss as

      3. cd $jbossws-GA/build

      4. edit and set all non-hudson properties

      5. as 4.0.5 server set the ejb3 directory

      6. ant main && ant deploy-jboss40

      7. cd $jbossws/build

      8. edit

      9. ant main && ant jboss40-jars

      10. replace all occurrences of patched files within jbossws and jboss dir

      11. cd $testdir; mv jbossas-4.0.5/build/output/jboss...-ejb3 jboss (to make path short)

      12. edit $jbossws/build/ with the new jboss home

      13. start jbossas

      14. cd $jbossws/jbossws-tests; ant main

      15. check if all files are the patched versions

      16. ant tests (all tests should pass)

      17. cd $jbossws/build; ant build-samples (if you have troubles compiling, try '"false"' or downloading the precompiled samples package)

      18. cd output/samples...; cp ../../ . ;ant main;

      19. replace any patched files

      20. ant tests (all should pass)

      21. if some tests don't pass, try restarting the server and using the one-test target (e.g. ant one-test

      22. after finished testing check if all files in jbossws and jboss dir stay patched

    3. JBoss AS 4.0.5GA, jdk14, ws-internal

      1. use jdk 1.4.2 version with Bouncy Castle libraries installed!

      2. as above with some exceptions

      3. use deploy-jboss40-jdk14 instead of deploy-jboss40 and jboss40-jars14 instead of jboss40-jars

      4. use jdk15 to build jbossws and deploy

      5. use jdk14 to build jbossas, compile jbossws tests and run tests (set JAVA_HOME=/opt/j2sdk1.4.2_09-ws -this has bouncy castle security jar and ANT_HOME=/opt/apache-ant-1.6.5-ws -has updated xercesImpl and junit jar

      6. use the non-ejb3 dir (there's no ejb3 one with jdk14)

      7. skip samples (couldn't make them compile with jdk14)

    4. JBoss AS 4.0.5GA internal tests (skip these as actually useless)

      1. As there seem to be some incompatibilities we just compare results with patched and non-patched server

      2. so compile jbossas (with the appropriate jdk)

      3. edit jbossws

      4. set as jboss40 dir the ejb3 one if using jdk15

      5. compile jbossws and deploy to all and default server instance (use proper deploy target for jdk 14 or 15 but always use jdk15)

      6. run jboss testsuite and log to tests1.log (with proper jdk and use -Djboss.home to specify ejb3 directory)

      7. replace patched files within the jbossas dir

      8. run testssuite again and log to tests2.log

      9. cat tests1.log | grep FAIL > t1.log

      10. cat tests2.log | grep FAIL > t2.log

      11. diff t1.log t2.log

      12. if any regressions try one-test target


    Patch testing of JBoss EAP:

    note: we use only JDK 1.5 and ANT_HOME=/opt/apache-ant-1.6.5-ws (has updated xercesImpl and junit jar)


    1. run the EAP test suite

      1. that's pretty much like a regular patch testing

      2. get proper release src zip

      3. build from src

      4. replace built JBoss AS with the noauth distro (or apply patch to the auth distro)

      5. replace patched files

      6. run tests suite (don't use localhost as one of the bind IPs and ensure correct mcast setup)

        • note: if you run "./ main" before tests, you need to specify -Dnode0/1 to have ws tests pass
    2. run the WS test suite

      1. unzip EAP version

      2. unzip jboss 4.0.5

      3. unzip jboss 5

      4. checkout WS patch branch

      5. edit jbossws/ or jbossws/build/ ( as sample)

        1. integration target jboss42

        2. server all (default have some services missing like juddi)

        3. bind address (use the same string as the server's -b option)

        4. prefer shorter path depths
      6. in jbossws or jbossws/build do "ant main && ant jboss42-jars" (or jars-jboss42)

        1. NOTE: don't use deploy-jboss42 as you don't want to replace other files

      7. in jbossws/jbossws-tests do "ant main" (WS 1.2.x only)

      8. replace files in EAP directory and jbossws directory

      9. export JAVA_OPTS="$JAVA_OPTS -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m" and start the server

      10. "ant tests 2>&1 | tee test.log" in jbossws or jbossws/jbossws-tests dir

      11. expect 100% pass rate

      12. check patched files are not replaced

    3. run WS sample tests

      1. get apache tomcat 5.5 and edit with its location (?)

      2. cd jbossws or jbossws/build

      3. ant tests-samples or see next steps if target doesn't exists (all should pass)

        1. if not, try restarting the running server and run one-test

          ant ... tests-samples -Dinclude.wildcard="org/jboss/test/ws/*/samples/**/<test name>.class"

          See test-framework/ant-import/build-testsuite.xml for more details

        2. if you get "java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=jmx-console" and out of permgen in server log then also restart the server

      4. (ws 1.2.x) ant build-samples"false" (the option is because compile fails with the beta jboss 5 zip) (?)

      5. (ws 1.2.x) cd output/jbossws-samples-1.2.1.GA_CP01 &&  cp ../../ . &&  ant main &&  replace patched files && ant tests

      6. check if patched files are still the same


    Instructions on how to patch all files in a dir:

    When you just need to replace files with ones with the same name:

    1. Find command: "find -name <file1> -or -name <file2> ...

    2. Check MD5SUM: "md5sum `<find command>`"

    3. Replace all files in current dir and subdirs:

    for i in `<find command>`; do
      nm=`basename $i` 
      cp -v <binaries location>/$nm $i 


    When you need to replace jbossws.sar in jboss-4.0.x:

    1. you will need to replace expanded sars and non-expanded sar

    2. as well file names are not the same

    3. so no reliably working scripts are currently available