I have an EJB deployed on WebLogic 6.1 on my NT machine and I try to reach it
with a Java client program on that same machine.
I used the following code in the client :
Properties prop = new Properties();
prop.setProperty (Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty (Context.PROVIDER_URL,url);
System.err.println("Attempting to create context...");
return new InitialContext(prop);
I've tried a few different PROVIDER_URL like t3://hostname:port (since it is the
protocol used by WebLogic for JNDI) or IIOP://hostname:port but I always get this
:
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:66)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:154
)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at examples.hello.Client.lookupHome(Client.java:122)
at examples.hello.Client.<init>(Client.java:38)
at examples.hello.Client.main(Client.java:68)
I have installed j2sdkee13 and have j2ee.jar in client's CLASSPATH.
Do you have an idea of what's wrong ??????
Thanks a lot in advance.
Pierre-Yves FOURMOND
Axway Software. a Sopra Group Company
Direction Edition de Progiciels
EAI - R&D XTalk
Puteaux 2 - Bureau n°204
pyfou...@axway.com
Tél : 01 47 17 22 55
Fax : 01 47 17 24 25
Pierre-Yves Fourmond <pyfou...@sopra.com> wrote:
> Hello,
--
Dimitri
But I want to use SUN's JNDI to avoid carrying weblogic.jar on the client.
Moreover, if the EBJ is on WebSphere, then you should modify the client which
seems a little bit non portable ....
I don't know if it's possible but I think so. Some people seem to have succeeded.
> Yes !
> But I want to use SUN's JNDI to avoid carrying weblogic.jar on the client.
t3: means WebLogic proprietary RMI implementation, which needs lots of WebLogic classes,
and http: means webLogic proprietary HTTP tunneling. You can use RMI/IIOP :
Properties prop = new Properties();
prop.setProperty (Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtxFactory");
prop.setProperty (Context.PROVIDER_URL, "iiop://hostname:port");
System.err.println("Attempting to create context...");
return new InitialContext(prop);
with 1.3.x client.
--
Dimitri
Post a message in the rmi-iiop section if you dont get one here soon.
-Nick
"Dimitri Rakitine" <d...@dima.dhs.org> wrote in message
news:3bf3...@newsgroups.bea.com...