On Oct 27, 2009, at 12:54 AM, thabach wrote:


Heya

I am investigating RAR support in OpenEJB and was playing with the
quartz-app from some earlier post (
http://www.nabble.com/need-help-getting-quartz-ra.rar-file-to-deploy-td18531000.html#a18538001
http://www.nabble.com/need-help-getting-quartz-ra.rar-file-to-deploy-td18531000.html#a18538001
).

When running a top-level mvn clean install the tests are executed fine. Running the quartz-beans module test from within Eclipse as a JUnit test, leads to a problem in matching the message listener interface of the MDB
against the message listener interface of the automatically deployed
MdbContainer and yields this:

org.apache.openejb.OpenEJBException: Creating application failed:
classpath.ear: Error deploying 'TimerJob'.  Exception: class
org.apache.openejb.OpenEJBException: Deployment 'TimerJob' has message
listener interface org.quartz.Job but this MDB container only supports
interface javax.jms.MessageListener: Deployment 'TimerJob' has message
listener interface org.quartz.Job but this MDB container only supports
interface javax.jms.MessageListener

It seems there's something about the way the Eclipse project is setup that does not match the Maven setup. If Eclipse isn't including the META-INF/ra.xml file in the classpath, then OpenEJB will not be able to see and deploy the resource adapter and create the required MDB container.

Try a little test code like this to verify your Eclipse setup:

  import junit.framework.TestCase;

  import java.net.URL;

  public class ClasspathTest extends TestCase {

      public void test() throws Exception {

          URL raXml = this.getClass().getResource("META-INF/ra.xml");

assertNotNull("There is no resource adapter in the classpath", raXml);
      }
  }


Hope that helps!

-David

Reply via email to