Andrew.
Roland Beuker wrote in message <8fc0oe$s3b$1...@porthos.nl.uu.net>...
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> =20
> String result =3D "??";<BR><BR> public void init=20
> ()<BR> {<BR> =20
> ORB
=
> orb =3D=20
> ORB.init (this, null);<BR> =20
> byte[] managerId
=3D=20
> "BankManager".getBytes ();<BR> =20
> AccountManager manager =3D AccountManagerHelper.bind =
> (<BR> =20
>
orb, <BR> =20
> =20
> "/bank_agent_poa", <BR> =20
> managerId<BR>
=20
> );<BR> =20
> String name =3D =
> getParameter=20
> ("name");<BR> =20
> Account account =3D =
> manager.open=20
> (name);<BR> =20
> float balance
=3D=20
> account.getBalance ();<BR><BR> =
> result =3D=20
> "The balance in " + name + "'s account is $" + =
> balance;<BR> =20
> System.out.println (result);</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> =
> }<BR><BR> =20
> public void paint (Graphics g)<BR> =
> {<BR> =20
> g.drawString (result, 0,
40);<BR> =20
> }<BR>}</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
> <DIV><FONT face=3DCourier size=3D2>And the HTML code:</FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
> <DIV><FONT face=3DCourier size=3D2><HTML><BR><APPLET=20
> <BR> CODE =
> =3D"Client.class"<BR> CODEBASE=20
> =3D"."<BR> WIDTH =3D200 =
> <BR> HEIGHT =20
> =3D100><BR><PARAM NAME=3Dorg.omg.CORBA.ORBClass=20
>
VALUE=3Dcom.visigenic.vbroker.orb.ORB><BR></APPLET><BR></HTM
L=
> ><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> at=20
> sun.io.CharacterEncoding.<clinit>(CharacterEncoding.java:0)
<BR>&nbs=
> p; =20
> at sun.applet.AppletPanel.run(Compiled Code)<BR>
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]
=
>
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> java.lang.Throwable.<init>(Compiled Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> java.lang.Exception.<init>(Compiled Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> java.lang.RuntimeException.<init>(Compiled Code) =
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> org.omg.CORBA.SystemException.<init>(Compiled Code) =20
> <BR> at
org.omg.CORBA.INITIALIZE.<init>(Compiled =
>
> Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> org.omg.CORBA.ORB.create(Compiled Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> org.omg.CORBA.ORB.init(Compiled Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at =
> Client.init(Compiled Code)*=20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled =
> Code) =20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled =
> Code) =20
> </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> at=20
> java.awt.EventDispatchThread.run(Compiled Code) </FONT></DIV>
> <DIV><FONT face=3DCourier size=3D2> 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.
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