I needed 

  java.naming.provider.url 

not 

  java.naming.provider (sans ".url")

Thanks for the help!

-- 
-bk


Quoting Paul Robinson <[EMAIL PROTECTED]>:

> I had a similar problem of connection refused and I modified the
> jndi.properties file in jboss/client so that
> java.naming.provider.url=jnp://localhost:1099/ changed to
> java.naming.provider.url=jnp://"machinename or ip address":1099/
> 
> Not sure if this is on the right track but it may help
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Brandon
> Knitter
> Sent: Thursday, 6 June 2002 12:53 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] Timeout connecting to the jndi server
> 
> 
> When trying to get an initial context I get the following:
> 
> env
> CLASSPATH=:.:/usr/java/lib/tools.jar:/usr/java/jre/lib/rt.jar:/home/knitterb
> /lib/java:/home/knitterb/lib/java/jars/spy.jar:/home/knitterb/lib/java/jars/
> xalan.jar:/home/knitterb/lib/java/jars/xerces.jar:/home/knitterb/lib/java/ja
> rs/postgresql.jar:/home/knitterb/lib/java/jars/struts.jar:/home/knitterb/lib
> /java/jars/burlap-2.1.0.jar:/home/knitterb/lib/java/jars/hessian-2.1.0.jar:/
> home/knitterb/progs/jboss-3.0.0/client/jboss-client.jar:/home/knitterb/progs
> /jboss-3.0.0/client/jbosssx-client.jar:/home/knitterb/progs/jboss-3.0.0/clie
> nt/jaas.jar:/home/knitterb/progs/jboss-3.0.0/client/jnp-client.jar:/home/kni
> tterb/progs/jboss-3.0.0/client/jboss-j2ee.jar:/home/knitterb/progs/jboss-3.0
> .0/client/log4j.jar:/usr/j2ee/lib/j2ee.jar
> \
> /usr/java/bin/java -Djava.compiler=NONE \
>         -client \
>         -Xmx64m -Xms64m \
>         -XX:NewSize=16m -XX:MaxNewSize=16m -XX:SurvivorRatio=6 \
>         -XX:+PrintTenuringDistribution \
>         -verbose:gc \
>         org.blandsite.music.play.PlaylistClient
> Getting context
> Exception in thread "main" javax.naming.CommunicationException: Receive
> timed
> out.  Root exception is java.net.SocketTimeoutException: Receive timed out
>         at java.net.PlainDatagramSocketImpl.receive(Native Method)
>         at java.net.DatagramSocket.receive(DatagramSocket.java:670)
>         at
> org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:919)
>         at
> org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1009)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:436)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
>         at javax.naming.InitialContext.lookup(InitialContext.java:347)
>         at
> org.blandsite.music.play.PlaylistClient.main(PlaylistClient.java:30)
> make: *** [run] Error 1
> 1.540u 0.130s 0:06.72 24.8%     0+0k 0+0io 3725pf+0w
> 
> 
> So just to make sure, I try to connect manually:
> 
> [knitterb@zoot play]$ telnet localhost 1099
> Trying 127.0.0.1...
> Connected to localhost.localdomain.
> Escape character is '^]'.
> ¬ísrjava.rmi.MarshalledObject|½ícü>IhashlocBytest[BobjBytesq~xp/¼Éur[B¬óTàxp
> "¬íthttp://zoot:8083/q~q~uq~À¬ísr
> org.jnp.server.NamingServer_Stubxrjava.rmi.server.RemoteStubéþÜÉáexrjava.rmi
> .server.RemoteObjectÓa´a3xpw4UnicastRef2
>      127.0.0.³¼îC ð%xConnection closed by foreign host.
> 0.000u 0.000s 0:00.02 0.0%      0+0k 0+0io 169pf+0w
> [knitterb@zoot play]$
> 
> 
> Code looks like:
> 
>     public static void main(String ags[]) throws Exception {
>         Properties p=new Properties();
>         p.put("java.naming.factory.initial",
>             "org.jnp.interfaces.NamingContextFactory");
>         p.put("java.naming.provider", "localhost:1099");
>         p.put("java.naming.factory.url.pkgs",
>             "org.jboss.naming:org.jnp.interfaces");
>         InitialContext iniCtx = new InitialContext(p);
> 
>         System.err.println("Getting context");
>         Context ejbCtx=(Context) iniCtx.lookup("java:comp/env/ejb");
>         System.err.println("Got context");
> 
> And nothing at all shows up in the server.log or xx.request.log.  Any
> ideas?
> 
> Oh yeah, did a tcpdump as "/usr/local/sbin/tcpdump port 1099" and I get
> nothing
> at all.  Am I on the wrong port?
> 
> --
> -bk
> 
> 
> 
> 
> 
> 
> _______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> _______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

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

Reply via email to