<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Folks,<br>
      <br>
      here is a friendly reminder that your DUPs must take OSGi
      deployments into consideration. So if you mark a given DU as of
      type foo, you must make sure that foo is also supported as an OSGi
      bundle deployment.<br>
      <br>
      I constantly fix DUPs that assume that every deployment is a
      module deployment. Here is the latest one<br>
    </tt>
    <blockquote><tt>Caused by: java.lang.NullPointerException<br>
        &nbsp;&nbsp;&nbsp; at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:101)<br>
        &nbsp;&nbsp;&nbsp; at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)</tt><br>
    </blockquote>
    <tt>Generally, I don't mind fixing those since I cannot assume that
      you even know/care what an OSGi bundle deployment is ;-)<br>
      <br>
      However, on our way to x.y.z.Final we probably want to avoid these
      basic errors.<br>
      <br>
      What do you need to do is to check that a given DU does not
      contain a valid OSGi Manifest before you mark it as "your type"<br>
    </tt>
    <blockquote><tt>&nbsp;&nbsp;&nbsp; public void deploy(final DeploymentPhaseContext
        phaseContext) throws DeploymentUnitProcessingException {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DeploymentUnit deploymentUnit =
        phaseContext.getDeploymentUnit();<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        if(deploymentUnit.hasAttachment(Attachments.OSGI_MANIFEST)) {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        if(deploymentUnit.getName().toLowerCase().endsWith(WAR_EXTENSION))
        {<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DeploymentTypeMarker.setType(DeploymentType.WAR,
        deploymentUnit);<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp; }<br>
      </tt></blockquote>
    <tt>Please take a minute to review your "entry point" DUP and make
      sure it ignores OSGi deployments if you are not prepared to handle
      them.<br>
      <br>
      cheers<br>
      -thomas<br>
    </tt>
    <blockquote><br>
    </blockquote>
    <tt><br>
    </tt>
    <blockquote><br>
    </blockquote>
    <tt></tt><br>
    <pre class="moz-signature" cols="72">-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx 
</pre>
  </body>
</html>