4 Replies Latest reply on Jun 20, 2011 7:40 AM by ronsen

    MessageDrivenBean NoClassDefFound error

    ronsen

      Hello all,

      my mdb works great so far, the problem is, if i try use a imagemanipulation library(imagej) in the onMessage() function i get this exception:

       

      Caused by: java.lang.NoClassDefFoundError: ij/ImagePlus

       

      I first thought this should be an imageJ problem and tried to fix some issues with the class path. After all my tries failed, i tried to use the lib in another class (from the client) and it worked perfectly on the first try. What I did then, was to take out the @MessageDriven annotation and used the library again, and hey, as expected did it work directly... So the problem relies somewhere with the bean, does anybody have an idea of what the problem could be?

       

      I also tried to put the transformation call into another bean and call it with @EJB, but this doesnt work either....

       

      Thats the mdb:

       

      @MessageDriven(mappedName = "MDBtrans", 

              activationConfig = 

                 { 

      //                @ActivationConfigProperty(propertyName="messagingType", propertyValue="javax.jms.MessageListener"),

                      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), 

                      @ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/testQueue"), 

                 })

       

      public class Consumer implements MessageListener{

          private static final String IMAGEPATH = "Images/";

         

          private @EJB TransFormPictureAPI transPic;

         

          public Consumer(){

         

          }

       

          @Override

          public void onMessage(Message message) {

           }

       

       

       

       

      Thats it basically... i hope somebody here can help me.

       

      Thanks in advance,