Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.

Publicité

java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet

When you migrate to the latest Forms version (10.1.2.3 or 11) and try using a JavaBean created with an older Forms version, you can get the following error, at runtime, in the Java Console:

Exception in thread "thread applet-oracle.forms.engine.Main-1" java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet

The reason is you try to use a Java Bean compiled with an older Forms JAR file, like f90all.jar.
So, to correct the issue, you have to change the Java code then re-create the JAR file:

private Main         formsMain = null;

Replace:

    formsMain  =  (Main) handler.getApplet();

by:

     // getting the Forms Main class
    try{
      Method method = handler.getClass()
                     .getMethod("getApplet", new Class[0]);

      Object applet = method.invoke(handler, new Object[0]);
      if (applet instanceof Main) {
         formsMain = (Main)applet;
      }    
    }catch(Exception ex) {;} 

Then create and deploy the new JAR file to your /forms/Java folder.

Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article