Re: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-19 Thread Scott M Stark

I'm not sure which version of JBoss your using so lets get in synch on that point.
What version are you using?

I use cygwin on w2k as well and the only time I came across the issue you mention
is when I first rebuilt the jnp JNDI provider code and dropped it onto the 2.2.0
release. This is when I saw that there had been a change to the jnp code that had
not been tested against the jboss code and so I updated the NamingService code to
not attempt to start the jnp provider in initService.

If you using a cygwin sh to start JBoss post that as well in case there is some cygwin
issue although I doubt it.

- Original Message - 
From: "Tim Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 6:38 AM
Subject: RE: [JBoss-user] NamingService initialization problems--ConnectionException


> 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.
> 



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



RE: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-16 Thread Tim Taylor

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



Re: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-16 Thread Scott M Stark

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().getContextClassLoader().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



RE: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-15 Thread Tim Taylor

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().getContextClassLoader().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



Re: [JBoss-user] NamingService initialization problems--ConnectionException

2001-05-15 Thread Scott M Stark

The problem is the warning msg displayed at the start
of the server startup regarding the jndi.properties
file. You have a jndi.properties file in your classpath
that most likely contains a provider url which puts
the naming service in client mode and so fails to connect
to the non-existant server. Remove the jndi.properties
file from you classpath and all will be fine.

On Mon, 14 May 2001 19:01:21 -0500
 Tim Taylor <[EMAIL PROTECTED]> wrote:
> The NamingService initialization intermittently fails for
> me on both 
> JBoss-2.2 and JBoss-2.2.1.  I am running on Java 1.3
> under Cygwin on 
> Windows 2000.
> 
> It looks like the org.jboss.naming.NamingService.initService()
> method is 
> creating an InitialContext.  It seems strange that an
> InitialContext 
> should be created in the initialization of the naming
> service itself, 
> and that's where I get a ConnectionException.  The log
> with stack trace 
> is below.
> 
> I noticed that the initService() method no longer creates
> an 
> InitialContext in the latest/greatest JBoss in CVS.  Is
> there a 
> workaround for previous versions or do I need to use the
> development 
> version?   I'd rather use a released version if possible.
> 
> Thanks,
> 
> Tim Taylor
> 
> jboss.home = C:\cygwin\opt\jboss-2.2
> Using configuration "default"
> Please make sure the following is intended (check your
> CLASSPATH):
>   jndi.properties is read from

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