Version 3

    Note: Currently Hudson will not start JBossAS 5.x servers in a build, @see .  JBossAS 5.x may host Hudson, but not be run from a Hudson job.


    This document outlines the major problem encountered when installing Hudson on JBoss AS 5.


    Hudson is a tool for continious integration tests. More information can be found on


    It assumes that JBoss AS 5.0.0.GA has been extracted on the system in a directory and the default configuration has been copied to a configutation named hudson. For this installation Hudson 1.270 was used.

    The Problem

    In JBoss AS 5 every artifact encountered is considered a candidate for deployment. This includes anything packed deep into wars.


    When you deploy hudson.war you'll get a trace very much like:


    14:24:20,717 ERROR [AbstractKernelController] Error installing to ClassLoader: name=vfszip:/home/carlo/tools/jboss-5.0.0.GA/server/hudson/deploy/hudson.war state=Describe mode=Manual requiredState=ClassLoader
    org.jboss.deployers.spi.DeploymentException: Error creating classloader for vfszip:/home/carlo/tools/jboss-5.0.0.GA/server/hudson/deploy/hudson.war

    Caused by: java.lang.Error: Error visiting DelegatingHandler@32839487[path=hudson.war/WEB-INF/lib/hudson-core-1.270.jar context=file:/home/carlo/tools/jboss-5.0.0.GA/server/hudson/deploy/ real=file:/home/carlo/tools/jboss-5.0.0.GA/server/hudson/deploy/hudson.war/WEB-INF/lib/hudson-core-1.270.jar]

    Caused by: java.lang.RuntimeException: Failed to read zip file: - /home/carlo/tools/jboss-5.0.0.GA/server/hudson/tmp/vfs-nested.tmp/0085cfb5_exposed.beans


    JBoss AS 5 is very aggresive in deploying artifacts, so when it encounters hudson.war/WEB-INF/lib/hudson-core-1.270.jar/META-INF/exposed.beans it actually assumes this is a MC bean archive. Thus an error is thrown, because it's actually a text file used by Hudson.

    The Solution

    Make sure that JBoss AS 5 doesn't mark the file as being a deployable artifact. Since we're talking about a MC beans archive the configuration is limited to server/hudson/conf/bootstrap/deployers.xml.


    First of all the JARStructure bean tells JBoss AS 5 which files can be considered jar files. So you should comment out the entry:



    Second any MC bean that implements JarExtensionProvider will also add extensions to the JARStructure. Currently this only is the BeanDeployer. To override the default setting of ".beans" jar extension, add the following:

       <property name="jarExtension">.jbeans</property>


    The Impatient

    Apply this diff:


    $ diff -Naur server/default/conf/bootstrap/deployers.xml server/hudson/conf/bootstrap/deployers.xml
    --- server/default/conf/bootstrap/deployers.xml    2008-12-04 17:23:08.000000000 +0100
    +++ server/hudson/conf/bootstrap/deployers.xml    2009-01-07 14:10:04.000000000 +0100
    -96,7 +96,7 @@
    -                <value>.beans</value>
    +                <!--value>.beans</value-->
                     <!-- FIXME remove this once JBAS-6274 is done -->
    -177,6 +177,7 @@
        <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
           <property name="suffix">jboss-beans.xml</property>
    +      <property name="jarExtension">.jbeans</property>
        <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer">
           <install bean="ManagedDeploymentCreator" method="addAttachmentType">