Yes.  That file is there and it sets no provider url.  That causes a
"Missing Provider URL ConfigurationException" in the
NamingService.initService() method.  If I slow the server startup down with
a debugger, the server starts up fine.  It looks like you may have fixed
this issue in the CVS trunk by moving the creation of the InitialContext to
after the naming.start() call in the NamingService.startService() method.  

However, you also seem to be saying that it should be possible to create an
InitialContext within JBoss's VM even if the NamingService.startService()
has yet to be called in the startup sequence.  I.e., the naming service has
a mode where it uses the provider url (client mode) and one where it doesn't
(server mode).

Thanks for the help so far.  I'm using Cygwin, so I'm sure it's something
I'm doing.

JBoss is great, BTW!  I'm running it on Solaris and Linux with zero
problems.

> -----Original Message-----
> From: Scott M Stark [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 16, 2001 5:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] NamingService initialization
> problems--ConnectionException
> 
> 
> There is supposed to be a jndi.properties file in the conf/default or
> equivalent
> jboss dist directory  that either does not set the provider 
> url or has it
> commented out. This sets only the initial context factory and 
> the prefix
> url packages.
> 
> ----- Original Message -----
> From: "Tim Taylor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 15, 2001 10:40 AM
> Subject: RE: [JBoss-user] NamingService initialization
> problems--ConnectionException
> 
> 
> > Scott, thanks for the reply.  I get an NPE when I delete the
> jndi.properties
> > file.
> >
> > Here's the code for 
> org.jboss.naming.NamingService.initService() in JBoss
> > 2.2.1.  Without the jndi.properties file, the 
> System.getProperties... line
> > gets an NPE.  With the jndi.properties file in place, the 
> Context ctx =
> ...
> > line gets a ConnectionException.  If the jndi.properties 
> file contains no
> > provider url, the Context ctx = ... line gets a 
> ConfigurationException
> > saying "Provider URL missing."
> >
> > Tim Taylor
> >
> > public void initService()
> >    throws Exception
> > {
> >    // Read jndi.properties into system properties
> >    // RO: this is necessary because some components 
> (=Tomcat servlets) use
> a
> >
> >    // buggy classloader that disallows finding the resource properly
> >
> >
> System.getProperties().load(Thread.currentThread().getContextC
> lassLoader().g
> > etResourceAsStream
> >    ("jndi.properties"));
> >
> >    // Create "java:comp/env"
> >    RefAddr refAddr = new StringRefAddr("nns", "ENC");
> >    Reference envRef = new Reference("javax.naming.Context", refAddr,
> > ENCFactory.class.getName(), null);
> >    Context ctx = (Context)new InitialContext().lookup("java:");
> >    ctx.rebind("comp", envRef);
> > }
> 
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to