Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A stand-alone java client can't talk to remote EJBs

1 view
Skip to first unread message

Pierre-Yves Fourmond

unread,
Nov 15, 2001, 4:47:20 AM11/15/01
to

Hello,

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

Dimitri Rakitine

unread,
Nov 15, 2001, 4:58:44 AM11/15/01
to
Did you try INITIAL_CONTEXT_FACTORY weblogic.jndi.WLInitialContextFactory ?

Pierre-Yves Fourmond <pyfou...@sopra.com> wrote:

> Hello,

--
Dimitri

Pierre-Yves Fourmond

unread,
Nov 15, 2001, 5:32:45 AM11/15/01
to

Yes !

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.

Dimitri Rakitine

unread,
Nov 15, 2001, 5:52:18 AM11/15/01
to
Pierre-Yves Fourmond <pyfou...@sopra.com> wrote:

> 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

Nick Minutello

unread,
Nov 15, 2001, 8:46:08 PM11/15/01
to
However due to bug(s) in the Sun Java ORB, I think that you will find that
you wont have security interoperability (ie your client ID in weblogic will
be "guest").
Having said that, I understand that there is a fix (BEA-provided
work-around) for this supported by WLS 6.1 SP1.

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

0 new messages