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

Lookup EJB from another computer is failed

1 view
Skip to first unread message

Vik

unread,
May 26, 2001, 6:07:14 PM5/26/01
to
Hi all.

I have some EJBs (stateful session and entity bean) deployed at WLS6.0sp1
running at Sun server. It's working well when I'm calling it from the
servlets running at the same Weblogic server.
But when I'm trying to make lookup of the same EJBs from another computer
(Tomcat and JB4), it fails with NamingException.
However, when I do the same using Weblogic 5.1 on Win 2000 at one computer
with Tomcat, it is working.

What could be the likely reason of the fail?

Thanks.

Vik.

Xiang Rao

unread,
May 26, 2001, 2:47:19 PM5/26/01
to

Do you have Weblogic JAR files and EJB (HOME/REMOTE) JAR files installed on the
caller machine? Weblogic 6 has a small section talking about Application Client,
which could help.
http://e-docs.bea.com/wls/docs60///programming/concepts.html#1028244

Vik

unread,
May 28, 2001, 12:39:37 PM5/28/01
to
Actually, I have Weblogic 5.1 installed on the caller machine. Should I
change it to Weblogic 6? I got the weblogic.jar file from Sun server where
Weblogic 6 is running and included it into my classpath. The weblogic_sp.jar
file I couldn't find. HOME/REMOTE interfaces if you mean it, are incide my
project and available, otherwise it couldn't compile a client application.

I'm calling EJB using a lines

String url = "t3://soldb:80";
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
.........
Context ctx = new InitialContext(p);
CartHome home = (CartHome) ctx.lookup("Cart");

and the error message is,

<ConnectionManager> <Bootstrap unable to get a direct: 'Protocol:
't3''connection to: '0S:127.0.0.1:[80,-1,-1,-1,-1,-1,-1]' on port: '80'

java.rmi.ConnectException: Destination unreachable; nested exception is:

I wonder, why it tries to go to "localhost:80" while my url is,
"t3://soldb:80"?

Thanks.
Vik.

"Xiang Rao" <xian...@hotmail.com> wrote in message
news:3b0fec27$1...@newsgroups.bea.com...

Vik

unread,
May 28, 2001, 12:54:12 PM5/28/01
to
Sorry, I had found why IP is different, it's another my bug.

But I still have the lookup fail, like this:

Context log: path="" Error in BookStore.CheckOutServlet service() : null
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:380)
at
org.apache.tomcat.session.StandardSession.setAttribute(StandardSession.java:
720)
at BookStore.CheckOutServlet.getCart(CheckOutServlet.java:109)


Xiang Rao

unread,
May 28, 2001, 10:12:09 PM5/28/01
to

Try to use the same version of Weblogic on both server and client machines. I don't
think Weblogic 5 and 6 EJBs are binary compatible.

"Vik" <spi...@omnicom.ru> wrote:
>Actually, I have Weblogic 5.1 installed on the caller machine. Should
>I
>change it to Weblogic 6? I got the weblogic.jar file from Sun server
>where
>Weblogic 6 is running and included it into my classpath. The weblogic_sp.jar
>file I couldn't find. HOME/REMOTE interfaces if you mean it, are incide
>my
>project and available, otherwise it couldn't compile a client application.
>
>I'm calling EJB using a lines
>
> String url = "t3://soldb:80";
> Properties p = new Properties();
> p.put(Context.INITIAL_CONTEXT_FACTORY,
>"weblogic.jndi.WLInitialContextFactory");
> p.put(Context.PROVIDER_URL, url);

>..........

0 new messages