File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60049
    
  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]
 
 
subject: Problem in client invoking EJB
 
Similar Threads
weblogic files
Confugure MYSQL to accept diffecult char
What am i doing wrong. I copied word for word ...
Exception in getting the context from websphere 6.0
Remote EJB URL Issue