5 Replies Latest reply on Aug 27, 2009 10:13 AM by Marc Zbyszynski

    HornetQ with openejb/geronimo

    Marc Zbyszynski Newbie

      I'm trying to run hornetq inside openejb/geronimo for unit testing the mdbs normally deployed in JBoss, but I'm running into a little trouble. I'm sure I'm just missing some configuration file or something. Openejb supports JCA, so I have dropped the hornetq-ra.rar file into my classpath, and it is being automatically discovered by openejb. Unfortunately it throws this exception. I've tried adding all the other hornetq jars to the classpath, and also setting

      -Dhornetq.config.dir

      to point to the stand-alone/non-clustered configuration dir in the 2.0.0.BETA5 distribution. But I always get the below exception (I've included some possibly relevant log messages as well)

      INFO - Configuring Service(id=hornetq-raRA, type=Resource, provider-id=hornetq-raRA)
      INFO - Configuring Service(id=hornetq-ra, type=Resource, provider-id=hornetq-ra)
      INFO - Configuring Service(id=hornetq-ra, type=Container, provider-id=Default MDB Container)
      ....
      Aug 26, 2009 6:34:51 PM org.hornetq.core.logging.Logger info
      INFO: HornetQ resource adaptor started
      ..
      Aug 26, 2009 6:34:53 PM org.hornetq.core.logging.Logger error
      SEVERE: Unabler to start activation
      javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
      at javax.naming.InitialContext.getEnvironment(InitialContext.java:525)
      at org.hornetq.ra.inflow.HornetQActivation.setupDestination(HornetQActivation.java:390)
      at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:286)
      at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:498)
      at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:290)
      at org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)