• Post Reply Bookmark Topic Watch Topic
  • New Topic

Elementary Query around JBoss and EJB3  RSS feed

Anoop Jain
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Am trrying to deploy an EJB-3 stateless bean on JBoss but am unable to do that. Will appreciate if anyone can let me know what's wrong. In did the following:

[1] Created Bean and Local/Remote Interfaces:-

[2] Created a client to test the above:

[3] The client will have the following jndi.properties in its classpath

[4] Created an application.xml file to be used for EAR

[5] Created a build.xml that will package an EAR file and will place the EAR in the JBoss-default folder:

[6] AFter running the build file, I can see the following JBoss server console:

17:56:27,658 INFO [EARDeployer] Init J2EE application: file:/H:/jboss-4.0.4/server/default/deploy/calc.ear
17:56:28,017 INFO [EARDeployer] Started J2EE application: file:/H:/jboss-4.0.4/server/default/deploy/calc.ear

[7] However there is no entry corresponding to the Calc bean/interfaces in the JNDIView MBean on the JMX Console.

[8] And consequently when I run the client it fails:-

Exception in thread "main" javax.naming.NameNotFoundException: Calc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)

Any help will be hugely appreciated.
Peter Johnson
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the EJB should be named "calc/Calc/remote", is that name in the JNDI tree?

What version of JBoss AS are you using?

Could you post the contents of calc.ear? To do so, run the following:

jar -tf calc.ear
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!