JBoss Messaging versions 1.3.0.GA and before are built using JDK 1.4.2, so can be run using a 1.4.2 JVM.
However JBAS 4.2.0 and later is Java 5 only (see http://sourceforge.net/project/shownotes.php?release_id=507793&group_id=22866), so in order to get this to work, you will need to deploy in an earlier version of JBAS, e.g. JBAS 4.0.5.
This will probably work, but we DO NOT recommend or support this configuration. In order to do this you will have to replace various jars in the AS.
JBoss Messaging 1.4.0 and later is built using the exact same libraries as JBAS, therefore, since those libraries are built using Java 5, JBM 1.40 or later will only run under Java 5 or later.
All new releases of JBAS and JBM will be Java 5 only, so we highly recommend you move to Java 5 or you will get stuck on an older inferior version!
JDK 1.4.2 is end of life, please see http://java.sun.com/j2se/1.4.2/ for more details.