SAR中的MBean取决于部署的JAR中的类

时间:2018-07-05 21:57:54

标签: java maven wildfly

我在wildfly中有2个部署,一个持久层部署为aitrader-ejb.jar,其中包含我的实体bean和DAO类,一个服务部署在aitrader-correlation.sar中,其中包含我的MBean CorrelationService。相关服务中的代码取决于-ejp.jar中的DAO和Entity类,但是运行该服务时出现ClassNotFoundException。

我尝试按如下所示在jboss-deployment-structure.xml中指定依赖项:

<jboss-deployment-structure>
    <deployment>
        <resources>
            <resource-root path="aitrader-jpa.jar" />
        </resources>
    </deployment>
</jboss-deployment-structure>

我还尝试通过在我的行家pom中添加以下内容来尽力指定依赖项

<configuration>
    <archive>
        <manifestEntries>
            <Dependencies>aitrader-jpa.jar</Dependencies>
        </manifestEntries>
    </archive>
</configuration>

jar和sar都部署为wildfly,并显示在控制台中。有什么想法为什么sar无法看到jar中的类?

谢谢

杰米

0 个答案:

没有答案