Thomas,
My guess that the lookup of your home interface is not successfull.
Does your code for home interface lookup look anything like the code shown
below?
Since this is what I use and it works fine for me.
/**
* Centralized reference resolving to EJB home interfaces
*/
public static Object getHome(String jndiName, Class homeInterface)
throws ClassCastException,
NamingException
{
//
// JBoss from www.jboss.org
//
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.setProperty(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
props.setProperty(Context.PROVIDER_URL, "localhost:1099");
return new InitialContext(props).lookup(jndiName);
}
This code returns a home interface, just cast it to the home interface you
want to create. Something like the example below.
MyBeanHome home = (MyBeanHome) getHome("MyJNDIBeanName", MyBean.class);
>From here you can access any home methods.
Regards,
Cor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, January 18, 2001 14:18
To: [EMAIL PROTECTED]
Subject: [jBoss-User] NoInitialContextException
When I try to access my stateful session bean from the client I am getting
the following error message:
javax.naming.NoInitialContextException in
JForex.JForexPDO.Messenger.Messenger(): Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory
I have the following jars on my classpath:
ejb.jar
jboss-client.jar and
a jar containing the remote and home interfaces of my ejb.
I am wondering what I am missing.
Thank you for your help!
Thomas Kirsch
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]