Thanks. I modified the code so that it passes in the provider URL based on
EJB server.





-----Original Message-----
From: Tom Cook [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 18:51 PM
To: JBoss-User
Subject: Re: [jBoss-User] javax.naming.ServiceUnavailableException: t3.
Why?


You are trying to use a weblogic style url in your jndi.properties (or
whatever you use to set java.naming.provider.url), aren't you?  URLs for
JBoss naming service are of the form 'host:port', not 't3://host:port'

Tom

On Mon, 5 Mar 2001, Hardy, Patrick, DDI - Garden City wrote:

> Hello,
> 
> I have JBoss 2.0 FINAL running on one server and Apache Tomcat running on
> another server. When executing my servlet, I keep getting the following
> exception:
> 
> javax.naming.ServiceUnavailableException: t3.  Root exception is
> java.net.Unknow
> nHostException: t3
>         at java.net.InetAddress.getAllByName0(InetAddress.java:571)
>         at java.net.InetAddress.getAllByName0(InetAddress.java:540)
>         at java.net.InetAddress.getByName(InetAddress.java:449)
>         at java.net.Socket.<init>(Socket.java:100)
>         at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:94)
>         at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:693)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:286)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
>         at javax.naming.InitialContext.lookup(InitialContext.java:350)
>         at
> com.bookspan.BOMC.editor.client.controller.Editor.service(Editor.java
> :36)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
> 04)
> 
> 
> Can anyone tell me why? Everything in JBoss seems to be running and Tomcat
> is fine.
> 
> Relevant servlet code is the following:
> 
>         private Context getInitialContext() throws NamingException
>         {
>           Properties p = new Properties();
>           p.put (Context.INITIAL_CONTEXT_FACTORY,
>                   "org.jnp.interfaces.NamingContextFactory");
>           p.put (Context.PROVIDER_URL, "t3://marvin:1099");
> 
>           return new InitialContext (p);
>         }
> 
> 
>         public void service (HttpServletRequest req, HttpServletResponse
> res)
>                             throws ServletException, IOException
>         {
>           LookupHome home = null;
> 
>           try
>           {
>             Context ctx = getInitialContext();
>             Object ref = ctx.lookup ("BOMC/Lookup");
>             home = (LookupHome) PortableRemoteObject.narrow (ref,
>                LookupHome.class);
>           }
>           catch (NamingException n) {
>             n.printStackTrace (System.err);
>           }
> 
> 
> Thanks for your help.
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> 
> 

-- 
"If you mess with something for long enough it will break." - Schmidt



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to