I have a common seam component class in a jar file.And I make it as a module(my.component).
But a "Null pointer" error occurs when I load my ear.The component doesn't loaded.
If I put this jar file in my ear/lib , it works well.But I have other ear use it too.
How can I resole it?
My jboss-deployment-structure.xml file:
<jboss-deployment-structure>
<!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->
<!-- This is the top level ear module, which contains all the classes in the EAR's lib folder -->
<deployment>
<dependencies>
<module name="my.component" export="true"/>
</dependencies>
</deployment>
<sub-deployment name="jboss-seam.jar">
<exclusions>
<module name="org.apache.log4j"/>
</exclusions>
</sub-deployment>
<sub-deployment name="myejb.jar">
<exclusions>
<module name="org.apache.log4j"/>
</exclusions>
</sub-deployment>
<sub-deployment name="mywar.war">
<exclusions>
<module name="org.apache.log4j"/>
<module name="javax.faces.api" slot="main"/>
<module name="com.sun.jsf-impl" slot="main"/>
</exclusions>
</sub-deployment>
</jboss-deployment-structure>