Why do I get an exception when I use NC 4.x to run the applet client?

From Support
Jump to: navigation, search

Question:

I got the following exception what I use NC 4.6 to run the applet client.

java.lang.NoSuchMethodError: org.omg.CORBA.Object: method_set_policy_override
([Lorg/omg/CORBA/Policy;Lorg/omg/CORBA/SetOverrideType;)Lorg/omg/CORBA/Object;not found
at com.inprise.vbroker.firewall.BindInterceptor.bind(Compiled Code)
at com.inprise.vbroker.interceptor.ChainBindInterceptorImpl.bind(Compiled Code)
at com.inprise.vbroker.orb.DelegateImpl._bind(Compiled Code)
at com.inprise.vbroker.orb.DelegateImpl.bind(Compiled Code)
at com.inprise.vbroker.CORBA.portable.ObjectImpl._bind(Compiled Code)
at com.inprise.vbroker.orb.ORB.bind(Compiled Code)
at Bank.AccountManagerHelper.bind(Compiled Code)
at Bank.AccountManagerHelper.bind(Compiled Code)
at ClientApplet.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)


Answer:

This is because there is a VBJ2.5 ORB bundled with NC, which is a result of an agreement between Inprise and Netscape. This VBJ2.5 jar file also
packages some OMG standard interfaces which have been changed. That is why you see the NoSuchMethodError exception.

1) The way to fix the problem is to remove the VBJ2.5 jar file and then restart your browser. The jar file is at path>/Communicator/Program/Java/Classes/iiop10.jar

2)  Alternatively, you can use have your applet run in the JRE 1.2.2 environment See Solution #11197

3)  A third alternative is to use a servlet base architecture - see  examples/servlets. This is the recommended solution as it
reduces the overhead of downloading the orb classes and avoiding potential firewall restrictions



Article originally contributed by Borland Developer Support