Title: Naming URL troubles
I already have solution:
 
  System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
  System.setProperty("java.naming.provider.url", "localhost:1100");
  javax.naming.Context context = new javax.naming.InitialContext();
  PerfectTimeHome home = (PerfectTimeHome)context.lookup("PerfectTime");
 
Are there some documentation where I can find answers for similar questions?
Roman
 
-----Original Message-----
From: Roman Porotnikov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 01, 2000 1:46 PM
To: [EMAIL PROTECTED]
Subject: [jBoss-User] Naming URL troubles

Hi All,

I am using jBoss and I have a trouble with obtaining reference through JNDI.

I am running jBoss at localhost (Naming is at port 1099).
I have "PerfectTime" name bounded with my component.
When I am requesting
  PerfectTimeHome home = (PerfectTimeHome)context.lookup("PerfectTime");
- then everything is OK.
(request is from JSP page, JSP sever is Sun jswdk - at localhost)

But if I want to start naming services at another port (e.g. 1100) - and specifying all needed parameters at jndi.properties and jnp.properties,

then writing
  PerfectTimeHome home = (PerfectTimeHome)context.lookup("//localhost:1100/PerfectTime");
- I get exception:

---------------------------------------------------------
javax.naming.NameNotFoundException:  not bound
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:249)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
224)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:114)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:104)
        at javax.naming.InitialContext.lookup(InitialContext.java:354)
        at C_0003a.jswdk.examples.jsp.jBoss.PerfectTime_jsp_1._jspService(Perfec
tTime_jsp_1.java:76)
        at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:88)
        at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
        at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
        at com.sun.web.core.Context.handleRequest(Context.java:414)
        at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)

---------------------------------------------------------

The same exception is throwing even if I am starting naming with default port (1099) and use
        PerfectTimeHome home = (PerfectTimeHome)context.lookup("//localhost/PerfectTime");

It looks like something is bad with my URL format...

Can somebody help me with this?

Thanks

Roman Porotnikov
mailto:[EMAIL PROTECTED]


Reply via email to