Hi,
I'm getting a little confused about the JBoss Modules dependencies
available in the jboss-as-osgi-web project.
I want to use the ModuleIdentifier class in this module in a
DeploymentUnitProcessor, like the following
public static class WebContextFactoryProcessor implements
DeploymentUnitProcessor {
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws
DeploymentUnitProcessingException {
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
ModuleIdentifier mid =
depUnit.getAttachment(Attachments.MODULE_IDENTIFIER));
The jboss-as-osgi-web module itself has the dependency on the
org.jboss.modules module:
<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.web">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<dependencies>
<!-- ... -->
<module name="org.jboss.modules"/>
However, I'm getting a NoClassDefFoundError:
java.lang.NoClassDefFoundError: org/jboss/modules/ModuleIdentifier
at
org.jboss.as.osgi.web.WebContextActivationProcessor$WebContextFactoryProcessor.deploy(WebContextActivationProcessor.java:82)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116)
[jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
I'm probably missing something obvious, anyone an idea?
Cheers,
David