Hey,

> Hi, I've been trying to get a servlet to talk with an EJB (using the
> bundled jboss+tomcat binary from the JBoss web site). If I set the
> JNDI properties in the servlet code with System.setProperty(...)
> everything works fine, but so for I haven't managed to get the
> jndi.properties style of configuration to work.
> 
> Where should I put the jndi.properties file? In the war file? 

Yes, under WEB-INF/classes

Simon

> In the
> ear file? And where in there? I've pried various combinations, and
> everything results in:
> 
> javax.naming.NoInitialContextException: Need to specify class name in
> environment or system property, or as an applet parameter, or in an
> application resource file: java.naming.factory.initial
> 
> (i.e. the servlet isn't finding the properties). I'm using the Sun JDK
> 1.3 under Linux, in case it matters.
> 
> Here are the jndi.properties I'm trying to set:
> 
> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
> java.naming.provider.url=localhost
> java.naming.factory.url.pkgs=org.jboss.naming
> 
> Any clues?
> 
> //Petri
> 
> 
> --
> --------------------------------------------------------------
> 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