aspose file tools*
The moose likes JBoss/WildFly and the fly likes Elementary Query around JBoss and EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Elementary Query around JBoss and EJB3" Watch "Elementary Query around JBoss and EJB3" New topic
Author

Elementary Query around JBoss and EJB3

Anoop Jain
Greenhorn

Joined: Jun 17, 2009
Posts: 2
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
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

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


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Elementary Query around JBoss and EJB3