我的耳朵里有一个ejb和一场战争。
| ear
| ---> ejb
| ---> war
| --- ---> WEB-INF/lib
| --- --- ---> primefaces.jar
| ---> other dependency libs
| ---> primefaces.jar
我想使用primefaces push将消息从ejb服务层发送到Web客户端。因此,我需要从ejb和从战争到primefaces.jar的依赖。
但我现在不知道如何解决这个问题。我目前的问题是,我已经加倍了罐子。但这会导致链接器异常:
loader constraint violation: when resolving method "de.digitaljukebox.service.PushService.setEventBus(Lorg/primefaces/push/EventBus;)V" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, TestBean, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for the method's defining class, PushService, have different Class objects for the type org/primefaces/push/EventBus used in the signature
我需要在我的WEB-INF / lib中保留primefaces,否则组件将无法工作。
我尝试用
设置EJB的依赖关系<scope>provided</scope>
但是ejb在WEB-INF / lib文件夹中找不到jar ...
有没有人知道如何解决maven依赖性混乱?
设置:
Primefaces 6.0
Wildfly 10