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

MAY DAY!!! CORBA client applet can't find his ORB

6 views
Skip to first unread message

Roland Beuker

unread,
May 10, 2000, 3:00:00 AM5/10/00
to
Hi there,

I'm trying to build an applet that communicates with a CORBA server.
I just took the Client.java source from the Visibroker
examples/basic/bank_agent directory and added code to make it an
applet. This has become the source code:

import org.omg.CORBA.*;
import Bank.*;
import java.applet.*;
import java.awt.*;

public class Client extends Applet
{
    String result = "??";

    public void init ()
    {
        ORB            orb = ORB.init (this, null);
        byte[]         managerId = "BankManager".getBytes ();
        AccountManager manager = AccountManagerHelper.bind (
            orb, 
            "/bank_agent_poa", 
            managerId
        );
        String         name = getParameter ("name");
        Account        account = manager.open (name);
        float          balance = account.getBalance ();

        result = "The balance in " + name + "'s account is $" + balance;
        System.out.println (result);
    }

    public void paint (Graphics g)
    {
        g.drawString (result, 0, 40);
    }
}
 
And the HTML code:
 
<HTML>
<APPLET
 CODE     ="Client.class"
 CODEBASE ="."
 WIDTH    =200
 HEIGHT   =100>
<PARAM NAME=org.omg.CORBA.ORBClass VALUE=com.visigenic.vbroker.orb.ORB>
</APPLET>
</HTML>

A lot of people seem to have problems with this but I have not found a
solution yet.

Here are the exceptions that have been tormenting me:

APPLETVIEWER:

java.lang.NoClassDefFoundError: org/omg/CORBA/ORB
    at sun.io.CharacterEncoding.<clinit>(CharacterEncoding.java:0)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:466)

NETSCAPE 4.70 (from Java Console):

org.omg.CORBA.INITIALIZE[completed=MAYBE, reason=Could not instantiate ORB implementation:
com.visigenic.vbroker.orb.ORB] 
    at java.lang.Throwable.<init>(Compiled Code) 
    at java.lang.Exception.<init>(Compiled Code) 
    at java.lang.RuntimeException.<init>(Compiled Code) 
    at org.omg.CORBA.SystemException.<init>(Compiled Code) 
    at org.omg.CORBA.INITIALIZE.<init>(Compiled Code) 
    at org.omg.CORBA.ORB.create(Compiled Code) 
    at org.omg.CORBA.ORB.init(Compiled Code) 
    at Client.init(Compiled Code)*
    at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code) 
    at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) 
    at java.awt.EventDispatchThread.run(Compiled Code) 
    at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)

INTERNET EXPLORER 5:

exception: java.lang.ClassNotFoundException: org.omg.CORBA.ORB

I hope someone can help me.

Thanks!

Ralph Brecheisen, The Netherlands

Andrew McPherson

unread,
May 11, 2000, 3:00:00 AM5/11/00
to
Roland,
I speak as absolutely no expert, but it sounds like you have Java 1.1 which
does not have the CORBA classes. I think the Netscape classes may use a
different ORB interface, and IE uses Java1.1 too. Again, no personal
knowledge but you could go to JDK1.2, and do something with the Java plug in
(Hot Spot?) to get up to a Java1.2 compliant VM/libraries for the web
browsers.

Andrew.

Roland Beuker wrote in message <8fc0oe$s3b$1...@porthos.nl.uu.net>...

al...@writeme.com

unread,
May 11, 2000, 3:00:00 AM5/11/00
to
For all of you out there having problems with applets not being find
the ORB:

1) The JVM's used by the browsers have no implementation of CORBA.
a) Netscape containes old visibroker CORBA implementation something
like v2.5 which most likely not compliant with with your server code
using v3.x
2) JDK 1.2 has CORBA implementation but not the one by visibroker so
the value attribute in your <PARAM NAME=org.omg.CORBA.ORBClass
VALUE=com.visigenic.vbroker.orb.ORB> should be set to the correct
class implementing the ORB. (This is for appletviewer for JDK1.2)
3) If you want to use visibroker ORB implementation you have include
the vbjorb.jar from lib directory of your visibroker installation into
the applet tag so it looks like this:
<APPLET CODE="Client.class"
ARCHIVE=vbjorb.jar


WIDTH =200
HEIGHT =100>
<PARAM NAME=org.omg.CORBA.ORBClass
VALUE=com.visigenic.vbroker.orb.ORB>
</APPLET>

Good like,
Alec


In article <8fc0oe$s3b$1...@porthos.nl.uu.net>,
"Roland Beuker" <beu...@solair1.inter.NL.net> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0020_01BFBAAA.7C279A00
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable


>
> Hi there,
>
> I'm trying to build an applet that communicates with a CORBA

server.=20
> I just took the Client.java source from the Visibroker=20
> examples/basic/bank_agent directory and added code to make it an=20


> applet. This has become the source code:
>
> import org.omg.CORBA.*;
> import Bank.*;
> import java.applet.*;
> import java.awt.*;
>
> public class Client extends Applet
> {

> String result =3D "??";
>
> public void init ()
> {
> ORB orb =3D ORB.init (this, null);
> byte[] managerId =3D "BankManager".getBytes ();
> AccountManager manager =3D AccountManagerHelper.bind (
> orb,=20
> "/bank_agent_poa",=20
> managerId
> );
> String name =3D getParameter ("name");
> Account account =3D manager.open (name);
> float balance =3D account.getBalance ();
>
> result =3D "The balance in " + name + "'s account is $" + =


> balance;
> System.out.println (result);
> }
>
> public void paint (Graphics g)
> {
> g.drawString (result, 0, 40);
> }
> }
>
> And the HTML code:
>
> <HTML>

> <APPLET=20
> CODE =3D"Client.class"
> CODEBASE =3D"."
> WIDTH =3D200=20
> HEIGHT =3D100>
> <PARAM NAME=3Dorg.omg.CORBA.ORBClass =
> VALUE=3Dcom.visigenic.vbroker.orb.ORB>


> </APPLET>
> </HTML>
>
> A lot of people seem to have problems with this but I have not found a
> solution yet.
>
> Here are the exceptions that have been tormenting me:
>
> APPLETVIEWER:
>
> java.lang.NoClassDefFoundError: org/omg/CORBA/ORB
> at sun.io.CharacterEncoding.<clinit>(CharacterEncoding.java:0)
> at sun.applet.AppletPanel.run(Compiled Code)
> at java.lang.Thread.run(Thread.java:466)
>
> NETSCAPE 4.70 (from Java Console):
>

> org.omg.CORBA.INITIALIZE[completed=3DMAYBE, reason=3DCould not =
> instantiate ORB implementation:=20
> com.visigenic.vbroker.orb.ORB] =20
> at java.lang.Throwable.<init>(Compiled Code) =20
> at java.lang.Exception.<init>(Compiled Code) =20
> at java.lang.RuntimeException.<init>(Compiled Code) =20
> at org.omg.CORBA.SystemException.<init>(Compiled Code) =20
> at org.omg.CORBA.INITIALIZE.<init>(Compiled Code) =20
> at org.omg.CORBA.ORB.create(Compiled Code) =20
> at org.omg.CORBA.ORB.init(Compiled Code) =20
> at Client.init(Compiled Code)*=20
> at =
> netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled =
> Code) =20
> at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
=
> Code) =20
> at java.awt.EventDispatchThread.run(Compiled Code) =20
> at =
> netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
(Compiled=


> Code)
>
> INTERNET EXPLORER 5:
>
> exception: java.lang.ClassNotFoundException: org.omg.CORBA.ORB
>
> I hope someone can help me.
>
> Thanks!
>
> Ralph Brecheisen, The Netherlands
>

> ------=_NextPart_000_0020_01BFBAAA.7C279A00
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Diso-8859-1" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY background=3D"" bgColor=3D#ffffff>
> <DIV><FONT face=3DCourier size=3D2>Hi there,<BR><BR>I'm trying to
build =
> an applet=20
> that communicates with a CORBA server. <BR>I just took the
Client.java =
> source=20
> from the Visibroker <BR>examples/basic/bank_agent directory and added
=
> code to=20
> make it an <BR>applet. This has become the source
code:<BR><BR>import=20
> org.omg.CORBA.*;<BR>import Bank.*;<BR>import
java.applet.*;<BR>import=20
> java.awt.*;<BR><BR>public class Client extends =
> Applet<BR>{<BR>&nbsp;&nbsp;&nbsp;=20
> String result =3D "??";<BR><BR>&nbsp;&nbsp;&nbsp; public void init=20
> ()<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> ORB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
=
> orb =3D=20
> ORB.init (this, null);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> byte[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; managerId
=3D=20
> "BankManager".getBytes ();<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> AccountManager manager =3D AccountManagerHelper.bind =
> (<BR>&nbsp;&nbsp;&nbsp;=20
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
orb,&nbsp;<BR>&nbsp;&nbsp;&nbsp;=20
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> "/bank_agent_poa",&nbsp;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> &nbsp;&nbsp;&nbsp; managerId<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;=20
> );<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =3D =
> getParameter=20
> ("name");<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> Account&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; account =3D =
> manager.open=20
> (name);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
> float&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; balance
=3D=20
> account.getBalance ();<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
> result =3D=20
> "The balance in " + name + "'s account is $" + =
> balance;<BR>&nbsp;&nbsp;&nbsp;=20
> &nbsp;&nbsp;&nbsp; System.out.println (result);</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; =
> }<BR><BR>&nbsp;&nbsp;&nbsp;=20
> public void paint (Graphics g)<BR>&nbsp;&nbsp;&nbsp; =
> {<BR>&nbsp;&nbsp;&nbsp;=20
> &nbsp;&nbsp;&nbsp; g.drawString (result, 0,
40);<BR>&nbsp;&nbsp;&nbsp;=20
> }<BR>}</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DCourier size=3D2>And the HTML code:</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DCourier size=3D2>&lt;HTML&gt;<BR>&lt;APPLET=20
> <BR>&nbsp;CODE&nbsp;&nbsp;&nbsp;&nbsp; =
> =3D"Client.class"<BR>&nbsp;CODEBASE=20
> =3D"."<BR>&nbsp;WIDTH&nbsp;&nbsp;&nbsp; =3D200 =
> <BR>&nbsp;HEIGHT&nbsp;&nbsp;=20
> =3D100&gt;<BR>&lt;PARAM NAME=3Dorg.omg.CORBA.ORBClass=20
>
VALUE=3Dcom.visigenic.vbroker.orb.ORB&gt;<BR>&lt;/APPLET&gt;<BR>&lt;/HTM
L=
> &gt;<BR><BR>A=20
> lot of people seem to have problems with this but I have not found =
> a<BR>solution=20
> yet.<BR><BR>Here are the exceptions that have been tormenting=20
> me:<BR><BR>APPLETVIEWER:<BR><BR>java.lang.NoClassDefFoundError:=20
> org/omg/CORBA/ORB<BR>&nbsp;&nbsp;&nbsp; at=20
> sun.io.CharacterEncoding.&lt;clinit&gt;(CharacterEncoding.java:0)
<BR>&nbs=
> p;&nbsp;&nbsp;=20
> at sun.applet.AppletPanel.run(Compiled Code)<BR>&nbsp;&nbsp;&nbsp;
at=20
> java.lang.Thread.run(Thread.java:466)<BR><BR>NETSCAPE 4.70 (from
Java=20
> Console):<BR><BR>org.omg.CORBA.INITIALIZE[completed=3DMAYBE, =
> reason=3DCould not=20
> instantiate ORB implementation: <BR>com.visigenic.vbroker.orb.ORB]
&nbsp; =
>
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> java.lang.Throwable.&lt;init&gt;(Compiled Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> java.lang.Exception.&lt;init&gt;(Compiled Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> java.lang.RuntimeException.&lt;init&gt;(Compiled Code)&nbsp; =
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> org.omg.CORBA.SystemException.&lt;init&gt;(Compiled Code)&nbsp;=20
> <BR>&nbsp;&nbsp;&nbsp; at
org.omg.CORBA.INITIALIZE.&lt;init&gt;(Compiled =
>
> Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> org.omg.CORBA.ORB.create(Compiled Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> org.omg.CORBA.ORB.init(Compiled Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at =
> Client.init(Compiled Code)*=20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled =
> Code)&nbsp;=20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled =
> Code)&nbsp;=20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> java.awt.EventDispatchThread.run(Compiled Code)&nbsp; </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp; at=20
> netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
(Compiled=
> =20
> Code)<BR><BR>INTERNET EXPLORER 5:<BR><BR>exception:=20
> java.lang.ClassNotFoundException: org.omg.CORBA.ORB<BR><BR>I hope =
> someone can=20
> help me.<BR><BR>Thanks!<BR><BR>Ralph Brecheisen, The=20
> Netherlands</FONT></DIV></BODY></HTML>
>
> ------=_NextPart_000_0020_01BFBAAA.7C279A00--
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

zhangj...@yahoo.com

unread,
May 30, 2000, 3:00:00 AM5/30/00
to
Hi,

I admire you can build application yourself I also want but I do not know learn what knid of language. could you tell me?

Regards
Abby

0 new messages