1 Reply Latest reply on May 10, 2012 6:14 AM by sslavic

    Upgrade Weld in JBoss AS 6.1

    sslavic

      Hello JBoss AS community,

       

      Is there a way to upgrade Weld in JBoss AS 6.1?

       

      It seems to be using weld 1.1.2 while 1.1.8 is available. I have a @WebServlet HttpServlet bean and @SessionScoped POJO bean, where POJO is injected in servlet. POJO implements Serializable and has several java.lang.String fields. Both servlet and pojo are in same, war module, and beans.xml is in WEB-INF directory.

      Container startup reports "descriptive" error: "WELD-001410 The injection point [field] @Inject private foo.bar.SomeServlet.somePojo has non-proxyable dependencies".

      I've found that descriptivnes should be better in 1.1.4+ (with https://issues.jboss.org/browse/WELD-1017 fixed there).

      Any pointers on where to look would be welcome.

       

      For another issue, I find https://community.jboss.org/wiki/ClassLoadingConfiguration confusing, I'm not sure which part there applies to JBoss AS 6.1. I need to provide in war newer version of a library (slf4j api and implementation) which is provided in JBoss AS 6.1. Tried to do that by adding jboss-classloading.xml to WEB-INF with

       

      <classloading xmlns="urn:jboss:classloading:1.0"

          domain="foo-bar.war"

          export-all="NON_EMPTY"

          import-all="true"

          parent-first="false">

      </classloading>

       

      but that doesn't work - both libraries get found on the classpath, with one provided by server being first one and eventually used. Any tips here are also more than welcome! Migration to JBoss 7+ is not an option.

       

      Kind regards,

      Stevo.

        • 1. Re: Upgrade Weld in JBoss AS 6.1
          sslavic

          Added weld-core 1.1.2 as provided dependency to have source available and debugged - an @ApplicationScoped bean had private constructor...

           

          Solved slf4j issue, by reverting to older version of library that adds slf4j 1.6+ depedency.