Thomas Becker wrote:
> did you initialize the ORB with ORB.init(Applet, Properties) ?
> This is necessary to tell the ORB to use the class-loader of the applet
> and thus being able to find the interface stub classes (which are
> hopefully included in the applets archive or codebase).
> The "standard" way of using ORB.init(String[], Properties) is not usefull here.
>
> Hope it helps,
> Thomas
Sure it helps. I had forgot about this special way of getting an ORB object within an
applet (oups!). Everything is working allright now.
Thanks a lot,
-- Bruno.
> Bruno Dillenseger wrote:
>
> > Hello,
> >
> > I'm currently trying to get a CORBA (David) object to work as an applet. As a
>first step, I use the appletviewer.
> >
> > My problem is that the applet gets an exception when trying to call another CORBA
>object or itself, and the applet's clients also get the same exception:
> > org.omg.CORBA.BAD_PARAM: org.omg.CfMAF._<IDL_interface>Stub
> > thrown by <IDL_interface>Helper.narrow()
> > (where <IDL_interface> is one of my own interfaces' name)
> >
> > The funny thing is that the applet can deal with CORBA naming service!
> >
> > In fact, as we see below, there is a ClassLoader issue...
> > Does anyone have a suggestion?
> >
> > example/more details
> > ====================
> > By adding a printStackTrace() in MAFAgentSystemHelper.narrow(), I get the
>following trace:
> >
> > java.lang.ClassNotFoundException: org.omg.CfMAF._MAFAgentSystemStub
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:275)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> > at
>org.objectweb.david.libs.stub_factories.std.JStubFactory.createClass(JStubFactory.java:166)
> > at
>org.objectweb.david.libs.stub_factories.std.JStubFactory.newSmartStub(JStubFactory.java:190)
> > at
>org.objectweb.david.libs.stub_factories.std.JStubFactory.newStub(JStubFactory.java:129)
> > at org.omg.CfMAF.MAFAgentSystemHelper.narrow(MAFAgentSystemHelper.java:55)
> > [...]