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

J2EE Reference Impl & Remote EJB Access

0 views
Skip to first unread message

Noel O'Sullivan

unread,
Dec 21, 1999, 3:00:00 AM12/21/99
to
Hi, I've looked through as much documentation and old newsgroup posts as I
can to try and solve this problem and nothing has helped yet. I'm running
the J2EE Reference Implementation (final release). The Windows NT version
refuses to work for me (j2ee.bat just fails to start anything but the naming
service - funnily enough it worked fine in the last beta version).

So I'm using the Reference Implementation on Solaris where everything is
fine. I can deploy the App to the server and the following client code works
fine when running on the same host as the J2EE server. I can use the initial
context to find my EJB and make calls on it successfully.

Properties lProps = new Properties();
// I know the following line is redundant because it's what J2EE Ref Impl
// uses by default anyway
lProps.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.EJBInitialContextFactory");
lProps.put(Context.PROVIDER_URL, "iiop://oxygen/");
Context initial = new InitialContext(lProps);

However, when running on a different machine (which, though it may not be
important, is running NT), I get the following exception:

Caught an unexpected exception!
javax.naming.NamingException: Error accessing repository: Cannot connect to
ORB
at com.sun.enterprise.naming.EJBCtx.<init>(EJBCtx.java:51)
at
com.sun.enterprise.naming.EJBInitialContextFactory.getInitialContext(EJBInit
ialContextFactory.java:62)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
at javax.naming.InitialContext.init(InitialContext.java:226)
at javax.naming.InitialContext.<init>(InitialContext.java:202)
at client.ConverterClient.main(ConverterClient.java:21)

So My guess is that the PROVIDER_URL I'm giving is wrong. I've tried it with
IP address instead of DNS name. I've tried different schemes ("rmi://" and
"iiop://") and have tried specifying the port explicitly
("iiop://oxygen:1050"). None of these seems to work so I guess I have a few
questions:

1. Is the ORB running on port 1050 using IIOP?
2. Am I specifying the PROVIDER_URL correctly?
3. Am I missing something obvious/doing this completely wrongly?

Any help would be appreciated.

Noel O'Sullivan

Frank Pitt

unread,
Dec 23, 1999, 3:00:00 AM12/23/99
to

Noel O'Sullivan <no...@whitewolf.com.au> wrote in message
news:c3z74.45$zR...@ozemail.com.au...

> So My guess is that the PROVIDER_URL I'm giving is wrong. I've tried it
with
> IP address instead of DNS name. I've tried different schemes ("rmi://" and
> "iiop://") and have tried specifying the port explicitly
> ("iiop://oxygen:1050"). None of these seems to work so I guess I have a
few
> questions:
>
> 1. Is the ORB running on port 1050 using IIOP?
> 2. Am I specifying the PROVIDER_URL correctly?
> 3. Am I missing something obvious/doing this completely wrongly?

Well, when I do an nslookup on the name "oxygen" there are no 'A' records,

I suspect you need to replace "oxygen" (which is probably an internal
machine name in whatever department compiled the W32 version ) with the
address that the Solaris version uses (seeing as that works )

If that has the same address, then see if you can do an nslookup on "oxygen"
from your location, and replace the address with whatver IP you get
returned.

_____________________________________
Frank Pitt
Tutor / Consultant
Software Education Associates Ltd
Cnr The Esplanade & Nevis St, Petone
Wellington New Zealand
Voice +64 4 568 7806 Fax +64 4 568 7920
Email fra...@softed.com
Web http://www.softed.com


Noel O'Sullivan

unread,
Dec 23, 1999, 3:00:00 AM12/23/99
to
Frank Pitt <fra...@softed.com> wrote in message
news:83rcqh$6t0i$1...@titan.xtra.co.nz...

> I suspect you need to replace "oxygen" (which is probably an internal
> machine name in whatever department compiled the W32 version ) with the
> address that the Solaris version uses (seeing as that works )
>
> If that has the same address, then see if you can do an nslookup on
"oxygen"
> from your location, and replace the address with whatver IP you get
> returned.

Thanks, Frank. But to requote myself (what you already quoted):


>> I've tried it with IP address instead of DNS name. I've tried different
schemes
>> ("rmi://" and "iiop://") and have tried specifying the port explicitly

>> ("iiop://oxygen:1050"). None of these seems to work ...

I should probably have mentioned that I have tried all combinations of the
above too. I'm 99.99% sure this isn't a machine lookup problem.

Any other ideas/similar problems? Has anyone got this to work in a similar
set-up?

Noel

0 new messages