ahosny (4) [Avatar] Offline
MDB is not deployed on JBoss !!! --> 'jms-ra.rar' is not registered.
Hiiii all,

I got this exception when deploying chapter 2 EJBs on JBoss AS 5.0.0.Beta3

*** CONTEXTS IN ERROR: Name -> Error

jboss.j2ee:jar=chapter2-ejb.jar,name=OrderBillingMDB,service=EJB3 -> javax.management.InstanceNotFoundException: jboss.jca:service=RARDeployment,name='jms-ra.rar' is not registered.

Thanks and Regards
Ahmed Hosny Sayed
reza_rahman (456) [Avatar] Offline
Re: MDB is not deployed on JBoss !!! --> 'jms-ra.rar' is not registered.

We currently do not support JBoss 5.

ahosny (4) [Avatar] Offline
Re: MDB is not deployed on JBoss !!! --> 'jms-ra.rar' is not registered.
thanks a lot, Raza, for your reply smilie

I created an EJB project on eclipse galileo IDE and configured jboss-4.2.2.GA run time to the project. I created the files as the same directory structure of chapter 2.

The ear and other jars are deployed fine with no problems but when I try to run the client I get this exception :

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:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at slsb.com.ejb3inaction.actionbazaar.client.PlaceBidClient.main(PlaceBidClient.java:15)
ahosny (4) [Avatar] Offline
Re: MDB is not deployed on JBoss !!! --> 'jms-ra.rar' is not registered.
I solved the problem smilie

the jndi.properties file was not in the classpath when I complied and run the client.
I tried to set jndi.properties file in the classpath from eclipse but I don't know why it is not working.

finally I passed the JNDI properties to initial context and it works fine

Properties properties = new Properties();
properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url", "");

Context context = new InitialContext(properties);