File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes can't find MessageListener class exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "can Watch "can New topic
Author

can't find MessageListener class exception

Rajasekhar Devi Reddy
Greenhorn

Joined: Dec 21, 2007
Posts: 29
Hi I am trying to develop a simple Message Driven bean (ejb 2.1 spec) using eclipse 3.4 Jboss 4.2.3.

I have implemented MessageListener interface and its only method "onMessage()" in my ejb class but my server log file shows this error

2008-09-09 14:39:30,549 WARN [org.jboss.verifier.strategy.AbstractVerifier] Failed to find class: MessageListener
java.lang.ClassNotFoundException: No ClassLoaders found for: MessageListener

and further gives a warn message
2008-09-09 14:39:30,549 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
Bean : MessageBean
Section: 15.7.2
Warning: A message driven bean must implement, directly or indirectly, the message listener class
Info : Class not found on 'MessageListener': No ClassLoaders found for: MessageListener

I have my source class coded this way
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Based on this error text:



it looks like you are not properly providing the package name for the MessageListener class. If you were giving the proper package name the error message would read:



Or actually, there would be no error message because the javax.jms.MessageListener would be found.
[ September 10, 2008: Message edited by: Peter Johnson ]

JBoss In Action
Rajasekhar Devi Reddy
Greenhorn

Joined: Dec 21, 2007
Posts: 29
Thq for reply I used javax.jms.MessageListener folowing your suggestion and changed class declaration to



but still I see the same error in my server log. It did not say "no class loader found for javax.jms.MessageListener" just says "no class loader found for MessageListener" does that show any thing some thing, any thing wrong with my server installation???
Rajasekhar Devi Reddy
Greenhorn

Joined: Dec 21, 2007
Posts: 29
Thq for reply guys!! (in this thread and in the other)

I some how still can not figure out why the code did not work on JBOSS. I tried runniong it Glassfish . I used NetBeans - Glassfish combination and the very same code worked with it. Dont know why it won't work with JBOSS.

I am still trying to find ways to check if my lib folder has all the necessary jars. Does any one know hot to check it? Or what else might be the problem ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't find MessageListener class exception