4 Replies Latest reply on Aug 19, 2002 7:01 PM by terkozer

    NoSUchMethodException in Message Driven Bean

    thl-mot

      I created a very simple MDB. Like the one in the online documentation (code shown below). After sending a Message to the specified topic I get the following message on the servers console (JBoss 3):

      [11:06:57,920,JMSContainerInvoker] Exception in JMSCI message listener
      java.lang.NoSuchMethodException
      at java.lang.Class.getMethod0(Native Method)
      at java.lang.Class.getMethod(Unknown Source)
      at org.jboss.ejb.MessageDrivenEnterpriseContext.(MessageDrivenEnte
      rpriseContext.java:61)
      at org.jboss.ejb.plugins.MessageDrivenInstancePool.create(MessageDrivenI
      nstancePool.java:64)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.j
      ava:153)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
      DrivenInstanceInterceptor.java:71)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:98)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep

      ......


      Here the Beans source code (Compiled with Java 1.3.1):

      package test.ejb;

      import javax.ejb.*;
      import javax.jms.*;

      public class MessageBean implements MessageDrivenBean, MessageListener {

      public MessageBean() {
      }

      public void setMessageDrivenContext(MessageDrivenContext parm1) throws javax.ejb.EJBException {
      }

      public void ejbRemove() throws javax.ejb.EJBException {
      }

      public void onMessage(Message parm1) {
      System.out.println( parm1.toString());
      }
      }