[arquillian-issues] [JBoss JIRA] (ARQ-1122) ServletRuntime lookup only returns servlets of first web application found

Aslak Knutsen (JIRA) issues at jboss.org
Fri Jan 9 06:32:31 EST 2015


     [ https://issues.jboss.org/browse/ARQ-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aslak Knutsen closed ARQ-1122.
------------------------------


> ServletRuntime lookup only returns servlets of first web application found
> --------------------------------------------------------------------------
>
>                 Key: ARQ-1122
>                 URL: https://issues.jboss.org/browse/ARQ-1122
>             Project: Arquillian
>          Issue Type: Enhancement
>          Components: WebLogic Containers
>    Affects Versions: 1.0.2.Final
>         Environment: Weblogic 12c
>            Reporter: Ralph Abbink
>            Assignee: Vineet Reynolds
>            Priority: Minor
>             Fix For: wls_1.0.0.Alpha3
>
>
> After enriching our regular maven built .ear i noticed the following exception: {noformat}ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.{noformat}
> It appears the lookup for servletRuntimes only returns the servlets of the first web application in the deployment. In our .ear we have several web modules and the first one found wasn't the module i enriched using Arquillian.
> {code:title=WebLogicJMXClient.java}
> private ObjectName[] findServletRuntimes(ObjectName wlServerRuntime, String deploymentName) throws Exception
>       {
>          ObjectName[] applicationRuntimes = (ObjectName[]) connection.getAttribute(wlServerRuntime, "ApplicationRuntimes");
>          for(ObjectName applicationRuntime: applicationRuntimes)
>          {
>             String applicationName = (String) connection.getAttribute(applicationRuntime, "Name");
>             if(applicationName.equals(deploymentName))
>             {
>                ObjectName[] componentRuntimes = (ObjectName[]) connection.getAttribute(applicationRuntime, "ComponentRuntimes");
>                for(ObjectName componentRuntime : componentRuntimes)
>                {
>                   String componentType = (String) connection.getAttribute(componentRuntime, "Type");
>                   if (componentType.toString().equals("WebAppComponentRuntime"))
>                   {
>                      ObjectName[] servletRuntimes = (ObjectName[]) connection.getAttribute(componentRuntime, "Servlets");
>                      return servletRuntimes;
>                   }
>                }
>             }
>          }
>          throw new DeploymentException(
>                "The deployment details were not found in the MBean Server. Possible causes include:\n"
>                      + "1. The deployment failed. Review the admin server and the target's log files.\n"
>                      + "2. The deployment succeeded partially. The deployment must be the Active state. Instead, it might be in the 'New' state.\n"
>                      + "   Verify that the the admin server can connect to the target(s), and that no firewall rules are blocking the traffic on the admin channel.");
>       }
> {code}
> {code:title="Returning all servlets found" WebLogicJMXClient.java}
> private List<ObjectName> findServletRuntimes(ObjectName wlServerRuntime, String deploymentName) throws Exception
>       {
>          ObjectName[] applicationRuntimes = (ObjectName[]) connection.getAttribute(wlServerRuntime, "ApplicationRuntimes");
>          for(ObjectName applicationRuntime: applicationRuntimes)
>          {
>             String applicationName = (String) connection.getAttribute(applicationRuntime, "Name");
>             if(applicationName.equals(deploymentName))
>             {
>                List<ObjectName> servletRuntimes = new ArrayList<ObjectName>();
>                ObjectName[] componentRuntimes = (ObjectName[]) connection.getAttribute(applicationRuntime, "ComponentRuntimes");
>                for(ObjectName componentRuntime : componentRuntimes)
>                {
>                   String componentType = (String) connection.getAttribute(componentRuntime, "Type");
>                   if (componentType.toString().equals("WebAppComponentRuntime"))
>                   {
>                      servletRuntimes.addAll(Arrays.asList((ObjectName[]) connection.getAttribute(componentRuntime, "Servlets")));
>                   }
>                }
>                return servletRuntimes;
>             }
>          }
>          throw new DeploymentException(
>                "The deployment details were not found in the MBean Server. Possible causes include:\n"
>                      + "1. The deployment failed. Review the admin server and the target's log files.\n"
>                      + "2. The deployment succeeded partially. The deployment must be the Active state. Instead, it might be in the 'New' state.\n"
>                      + " Verify that the the admin server can connect to the target(s), and that no firewall rules are blocking the traffic on the admin channel.");
>       }
>    }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the arquillian-issues mailing list