1 Reply Latest reply on Oct 11, 2010 10:51 AM by Jesse Sweetland

    JBoss 5.1 -> 4.2 compatibility: javax.naming.Reference cannot be cast to javax.jms.Queue

    Michał Borowiecki Newbie

      Hi,

       

      We're trying to to lookup a JMS Queue that resides on JBoss-4.2.2 from an ear deployed in JBoss 5.1.0 (specifically sar packaged inside and ear)

      We are getting:

       

      java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.Queue
              at pl.bluepay.utils.jms.MDBUtil.getQueue(MDBUtil.java:56)

       

      I understand this is related to incompatible changes in the client libs between the versions.

      We tried putting jbossall-client.jar from JBoss-4.2.2 inside the ear (classloader isolation is enabled in the ear-deployer), and referenced it from the sar's MANIFEST file, but this caused the thread to hang.

       

      Does anybody know a solution?