It's not a secret anymore!*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

Problem in client invoking EJB

Aman Verma
Greenhorn

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

Properties pr=new Properties();
pr.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
pr.put(Context.PROVIDER_URL,"jnp://localhost:1099");
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
try
{
// 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
ger
at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:102)
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingConte
xtFactory.java:41)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
62)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at InterestClient.main(InterestClient.java:42)



can any one help me out.
LazyCoder
Greenhorn

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
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

"LazyCoder",

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.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in client invoking EJB
 
Similar Threads
Remote EJB URL Issue
What am i doing wrong. I copied word for word ...
weblogic files
Confugure MYSQL to accept diffecult char
Exception in getting the context from websphere 6.0