Using custom MainDeployer2 example in new JBoss EAP or SOA is not working

Solution Verified - Updated -

Issue

  • We run a continuous integration application that uses Maven to deploy our war. In JBoss EAP 5.0, we had our own version of MainDeployer that allowed us to deploy the war to the server/default/deploy directory (as versus the /tmp directory that MainDeployer uses). In JBoss SOA 5.2, I can't seem to install that special version of MainDeployer. If I add it to the jboss-service.xml file, JBoss SOA 5.2 won't start.
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] (http-vm-test-11.test%2F192.168.1.101-8080-4) Servlet.service() for servlet HtmlAdaptor threw exception
javax.management.InstanceNotFoundException: jboss.system:service=MainDeployer2 is not registered.
  at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:662)
  at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
  ...

We are using the example main deployer2 code from https://access.redhat.com/knowledge/solutions/40947 and We have MainDeployer2 configured in $JBOSS_HOME/server/$PROFILE/conf/jboss-service.xml as:

   <mbean code="org.jboss.example.MainDeployer2"
          name="jboss.system:service=MainDeployer2">
    <!-- This is used to delegate the deployment handling -->
      <!-- <attribute name="KernelMainDeployer"><inject bean="MainDeployer" /></attribute> -->
      <!-- This is used to validate incomplete deployments -->
      <attribute name="Controller"><inject bean="jboss.kernel:service=Kernel" property="controller"/></attribute>
   </mbean>

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
  • JBoss Enterprise SOA Platform (SOA)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.