6 Replies Latest reply on Jul 17, 2008 1:17 AM by Andrew Rubinger

    Regression in Smoke Test - WebIntegrationUnitTestCase

    Andrew Rubinger Master

      In changing JNDI mechanisms, I've introduced regressions into the WebIntegrationTestCase:

      http://jboss.hudson.alrubinger.com/job/AS_TestSuite_Smoke_Tests/13/

      The underlying error is:

      Caused by: java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface: org.jboss.test.web.interfaces.StatelessSessionLocal
       at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveEjbInterface(MappedReferenceMetaDataResolverDeployer.java:1034)
       at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveEjbLocalRefs(MappedReferenceMetaDataResolverDeployer.java:856)
       at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(MappedReferenceMetaDataResolverDeployer.java:722)
       at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:171)


      My assumption is that some change needs to take place in MappedReferenceMetadataResolverDeployer.mapEjbs,but I can't seem to find the magic touch to make:

      EndpointInfo info = resolver.getEndpointInfo(ifaceClass, EndpointType.EJB, vfsContext);


      ...not return null when given a valid interface. I see that:

      ejb@org.jboss.test.cts.interfaces.StatelessSessionLocal


      ...is placed into the endpointAlternateMap just fine.

      Any ideas what I'm missing?

      Reproduce by:

      testsuite$ ./build.sh one-test -Dtest=org.jboss.test.web.test.WebIntegrationUnitTestCase


      S,
      ALR

        • 1. Re: Regression in Smoke Test - WebIntegrationUnitTestCase
          Scott Stark Master

          I would not expect that any of the WebIntegrationTestCase refs would need to fallback to the ejb interface for resolution, so an ejb-ref or ejb-local-ref is not being picked up or resolved. I'll take a look at the test.

          • 2. Re: Regression in Smoke Test - WebIntegrationUnitTestCase
            Andrew Rubinger Master

            Though not relevant for the Web Integration tests, there's definitely some stuff amiss here. For example, I'm considering the following (as exposed by EJB3 Integration TestSuite "bank" test):

            Index: server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
            ===================================================================
            --- server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (revision 75930)
            +++ server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (working copy)
            @@ -390,6 +390,8 @@
             {
             // Add ejb/vfsPath@iface
             String remote = sbean.getRemote();
            + String remoteJndiName = sbean.determineResolvedJndiName(remote);
            + cdmd.addJndiName(remoteJndiName);
             String ifacePath = prefix + "@" + remote;
             if(endpointAlternateMap.containsKey(ifacePath))
             log.debug(ejbName+" duplicates remote: "+remote+", existing: "+endpointAlternateMap.get(ifacePath));
            @@ -451,6 +453,8 @@
             {
             // Add ejb/vfsPath@iface
             String local = sbean.getLocal();
            + String localJndiName = sbean.determineLocalJndiName();
            + cdmd.addJndiName(localJndiName);
             String ifacePath = prefix + "@" + local;
             if(endpointAlternateMap.containsKey(ifacePath))
             log.debug(ejbName+" duplicates local: "+local+", existing: "+endpointAlternateMap.get(ifacePath));
            @@ -537,8 +541,8 @@
             }
             // Add ejb/iface
             ifacePath = "ejb@" + remote;
            - if(endpointAlternateMap.containsKey(ifacePath))
            - log.debug(ejbName+" duplicates business-remote: "+remote+", existing: "+endpointAlternateMap.get(ifacePath));
            + if(endpointMap.containsKey(ifacePath))
            + log.debug(ejbName+" duplicates business-remote: "+remote+", existing: "+endpointMap.get(ifacePath));
             else
             {
             endpointAlternateMap.put(ifacePath, ejbCompID);


            S,
            ALR

            • 3. Re: Regression in Smoke Test - WebIntegrationUnitTestCase
              Andrew Rubinger Master

              Eh, forget that patch. It satisfies an unmet demand, but the demand is bogus anyway as those bindings won't ever be made.

              S,
              ALR

              • 4. Re: Regression in Smoke Test - WebIntegrationUnitTestCase
                Andrew Rubinger Master

                This patch brings the WebIntegrationUnitTestCase back in line:

                Index: server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
                ===================================================================
                --- server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (revision 75930)
                +++ server/src/main/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java (working copy)
                @@ -390,6 +390,8 @@
                 {
                 // Add ejb/vfsPath@iface
                 String remote = sbean.getRemote();
                + String remoteJndiName = sbean.determineJndiName();
                + cdmd.addJndiName(remoteJndiName);
                 String ifacePath = prefix + "@" + remote;
                 if(endpointAlternateMap.containsKey(ifacePath))
                 log.debug(ejbName+" duplicates remote: "+remote+", existing: "+endpointAlternateMap.get(ifacePath));
                @@ -451,6 +453,8 @@
                 {
                 // Add ejb/vfsPath@iface
                 String local = sbean.getLocal();
                + String localJndiName = sbean.determineLocalJndiName();
                + cdmd.addJndiName(localJndiName);
                 String ifacePath = prefix + "@" + local;
                 if(endpointAlternateMap.containsKey(ifacePath))
                 log.debug(ejbName+" duplicates local: "+local+", existing: "+endpointAlternateMap.get(ifacePath));
                @@ -537,8 +541,8 @@
                 }
                 // Add ejb/iface
                 ifacePath = "ejb@" + remote;
                - if(endpointAlternateMap.containsKey(ifacePath))
                - log.debug(ejbName+" duplicates business-remote: "+remote+", existing: "+endpointAlternateMap.get(ifacePath));
                + if(endpointMap.containsKey(ifacePath))
                + log.debug(ejbName+" duplicates business-remote: "+remote+", existing: "+endpointMap.get(ifacePath));
                 else
                 {
                 endpointAlternateMap.put(ifacePath, ejbCompID);
                @@ -946,7 +950,7 @@
                 // Determine the jndi name for the reference interface
                 String iface = getInterface(ref);
                 //LegacyEjb3JndiPolicy policy = new LegacyEjb3JndiPolicy();
                - String containerJndiName = target.getBeanMetaData().determineResolvedJndiName(iface);
                + String containerJndiName = target.getBeanMetaData().determineJndiName();
                 if(containerJndiName != null)
                 ref.setResolvedJndiName(containerJndiName);
                 }


                I'm testing against some of the other testsuites locally now to see what impact this has elsewhere.

                S,
                ALR

                • 5. Re: Regression in Smoke Test - WebIntegrationUnitTestCase
                  Andrew Rubinger Master

                  Committed to r75934.

                  Easily rolled back tomorrow if this breaks other stuff, but it handles all but one of my regressions to the smoke tests.

                  S,
                  ALR