0 Replies Latest reply on Jan 8, 2015 8:48 AM by Rastko Soskic

    Spring as module - JBoss EAP 6.3

    Rastko Soskic Newbie

      Hi,
      I have followed instructions here:

      https://access.redhat.com/solutions/168093

      to install spring as JBoss module.

       

      My deployment is simple EAR with one EJB and one WAR within.


      I've referenced (depended on) it via jboss-deployment-structure.xml at EAR level
      (and exported it so it is available to sub modules).
      However, spring context I have set-up via beanRefContext won't
      start because of  class not found exception(s) (the only problem/exception coming up)
      for classes which are not within spring module - e.g. Jackson's ObjectMapper.

       

      Now, I have had it in lib directory of EAR - that didn't help, nor referencing another module
      (via, again, jboss-deployment-structure.xml) which contains/exposes Jackson had.

       

      Yet when I have added that spring module (via spring's module.xml) depends on module

      containing jackson the problem has gone away. There was another CNF
      which again only resolution was adding dependency into spring's module.xml.

       

      To me it looks like when spring context is booted up, all the classes required for it
      must be present/available for classloader which loaded module... that is, other classes
      are not reachable otherwise.

       

      Perhaps I am doing something wrong, any suggestion, tip, advice is welcome...
      ...but currently this looks like issue to me as I think it should be possible to reference
      required modules in j-d-s.xml and/or provide them in lib of EAR as otherwise I would need to
      pollute spring module to depend on all modules which would have to contain classes
      required for each spring application deployed into app server...

       

      Thanks in advance for help.