2 Replies Latest reply on Jul 23, 2012 10:14 AM by Claus P

    java.lang.LinkageError on MDB

    Claus P Newbie

      Hello community,

       

      I've got two deployed units in jboss-7.1.1 final.

       

      First deployment contains an MDB which refers/extends an abstract MDB

      <code>

      public class MBTopicOutPre421ReceiverBean extends BaseMDB implements MessageListener {

          /**

           * @see MessageListener#onMessage(Message)

           */

          @Override

          public void onMessage(Message rcvMessage) {

          ....

      </code>

       

      In the MAINIFEST.MF I refer via    

      Manifest-Version: 1.0

      Dependencies: deployment.mdb2.jar   

      to the other deployment.

         

      Second jar contains base implemenation (without any deployment descriptor/annotation):

       

      <code>

      public abstract class BaseMDB implements MessageListener {

          private final static Logger LOGGER = Logger.getLogger(BaseMDB.class.getSimpleName());

          /**

           * {@inheritDoc}

           */

          @Override

          public void onMessage(Message msg) {

              LOGGER.info("------->"+msg);

          }

      }

      <code>

       

      I can deploy second jar without problems but when the depending first deployment will be published I get "java.lang.LinkageError" (see attachements for stacktrace).

      It's strange because I used the same strategy with EJB session beans eg. base sessionbean in jar2 and reference form jar1 without any problems.

       

      Any clues?

      Thanx!