I'm seeing the same thing.

I wonder if you're using a jdk1.2.2 client?  I've been trying to get
ColdFusion to invoke the interest bean.  As far as I can tell, I have to run
the jdk1.2.2 libjvm.so under ColdFusion.

Anyway, by setting a:
<configuration-name>jdk1.2.2 Stateless SessionBean</configuration-name>
in the jboss.xml for the bean I managed to get it to get through the lookup,
but it'll only run once.  After that I get the same
javax.naming.NoInitialContextException that you describe.  I'm setting the
system props each time through.  Example:
   ...
   <cfobject action="create" type="JAVA" class="javax.naming.InitialContext"
name="jndiContext">
   <cfset blah=jndiContext.addToEnvironment("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory")>
   <cfset blah=jndiContext.addToEnvironment("java.naming.provider.url",
"hostname.domain.com:1099")>
   <cfset blah=jndiContext.addToEnvironment("java.naming.factory.url.pkgs",
"org.jboss.naming")>
   <cfset ref  = jndiContext.lookup("interest/Interest")>
   ...
The thing that leads me to believe that it's jdk1.2.2 is that I ran the same
thing as a JSP, and it worked repeatedly.  Tomcat was running under jdk1.3.

Rian

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: jBoss <[EMAIL PROTECTED]>
Sent: Saturday, December 30, 2000 10:16 AM
Subject: Re: [jBoss-User] NoInitialContextException]


>
> There is no difference between runs. In the first and subsequent runs, the
> client retrieves the initial context like this:
>
> private Context getInitialContext() throws NamingException
>    {
>       Properties props = new Properties();
>
>       props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
>       props.put(Context.PROVIDER_URL, "cmtexwebdev:1099");
>
>       return new InitialContext(props);
>    }
>
> The client, however, saves the initial context and then uses it for all
the ejb calls within each run. Each run, however,
> retrieves its own initial context using the code above.
>
> The client code is identical for each run; so is the ejb code. The only
difference could be that the first time around, the server and client code
is
> loaded into memory
> and initialized while the second and subsequent times around, cached code
might be used.
>
> 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]

Reply via email to