File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Problem in client invoking EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem in client invoking EJB" Watch "Problem in client invoking EJB" New topic

Problem in client invoking EJB

Aman Verma

Joined: May 10, 2005
Posts: 15
following code is compiling fine but giving runtime error as

Properties pr=new Properties();
pr.put(Context.URL_PKG_PREFIXES,"org.jboss.naming rg.jnp.interfaces");

// Enclosing the whole process in a single `try' block is not an ideal way
// to do exception handling, but I don't want to clutter the program up
// with catch blocks
// Get a naming context
InitialContext jndiContext = new InitialContext(pr); // ********************PROBLEM on this statement.....

it is giving error as,

Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/Log
at org.jnp.interfaces.NamingContext.<clinit>(
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingConte
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at InterestClient.main(

can any one help me out.

Joined: Jul 08, 2004
Posts: 11
I think the problem is something with necessary jar files. Checkout whethere u have included all the jar files???
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63042


There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Problem in client invoking EJB
It's not a secret anymore!