0 Replies Latest reply: Jan 17, 2013 3:41 PM by errodr RSS

    JDAPI - Copy object group from one form to another?

    errodr
      I am using Forms 10g.

      I am attempting to copy an object group from one form to another. I do not have a .olb library file.

      In my code I open up the reference form and find the object group, I then try to add it to the other form I have open.

      I keep getting the following error:

      oracle.forms.jdapi.JdapiStatusException: jnicreate_object failed
      at oracle.forms.jdapi.BaseAPI._jni_create_object(Native Method)
      at oracle.forms.jdapi.ObjectGroup.<init>(Unknown Source)
      at com.adfresources.scanengine.OracleFormScanSubscriber.copyObjectGroup(OracleFormScanSubscriber.java:106)
      at com.adfresources.scanengine.OracleFormScanSubscriber.onSubscribe(OracleFormScanSubscriber.java:144)
      at com.adfresources.scanengine.ScanSubscriber.subscribe(ScanSubscriber.java:37)
      at com.adfresources.scanengine.ScanEngine.run(ScanEngine.java:71)
      at com.adfresources.utility.fmbreport.FmbReport.main(FmbReport.java:53)

      Here is the code:
          private void copyObjectGroup(FormModule form) throws Exception {
              ObjectGroup newObjgroup;
              
              try {
                  FormModule RefForm = FormModule.open("REF.fmb");
                  System.out.println("Opened Ref Form.");
                  
                  ObjectGroup objGroup = ObjectGroup.find(RefForm,"LIBHTML");
                  
                  System.out.println("Found object group: " + objGroup.getName());                      
                  newObjgroup = new ObjectGroup(form, "LIBHTML", objGroup);
                         
              } catch (Exception e){
                  e.printStackTrace();
              }
          }
      Any ideas?