Omnifaces EAR deployment issue on glassfish 3.1.2.2

后端 未结 1 1765
北海茫月
北海茫月 2021-01-26 06:19

I have a maven enterprise project (skinny) with omnifaces 1.4.1 glassfish 3.1.2.2 primefaces 3.5 primefaces extensions 0.6.3 myfaces extcdi 1.0.5

When i deploy the ear,

相关标签:
1条回答
  • 2021-01-26 07:01

    The ear/lib directory is not the ideal place to share web artifacts. It depends a bit on what else you exactly have in your wars (e.g. do you have a beans.xml in your WEB-INF, any Servlets? what's exactly in your web.xml files, etc), but in a lot of cases things just don't work nicely this way.

    See for instance:

    • http://forum.primefaces.org/viewtopic.php?f=3&t=2332
    • https://community.jboss.org/message/799262

    I have to say that I wasn't able to reproduce your error after creating an ear with two wars and the exact same libraries and same versions in the ear/lib (primefaces and myfaces-extcdi), but with things like classloader conflicts things are never easy to reproduce.

    You might wanna try putting all web artifacts (OmniFaces, PrimeFaces, etc) in the WEB-INF/lib of both wars. Personally I think that's a better practice anyway as the EJB module is not supposed to see web types, and stuff you put in ear/lib is visible to classes in the EJB module.

    For the moment I think this is primarily an EAR/classloader issue and not something specifically to OmniFaces. If you have some evidence that suggest OmniFaces does do something wrong opening an issue at https://github.com/omnifaces/omnifaces/issues might be a more appropriate place to discuss that further.

    0 讨论(0)
提交回复
热议问题