JDAPI error: _jni_initialize

HI,
I use JDAPI for batch converting forms 6i to forms 9i (add webutil, change PLSQL code, save in a 9i directory, compile....).
When converting many (more then 80) fmbs I get a Exception: jniinitialize: Failed to create new forms context
Restarting my JAVA application and convert only lets say 50 modules works fine.
Is there someone how had similar problems?
Thanks,
Michael

After you have processed each module try calling Jdapi.shutdown(). This will free up resources

Similar Messages

  • JDAPI Error: ORA-04020: deadlock detected while trying to lock object

    I have written a JDAPI program to perform read-only impact analysis and report any problems.
    The following error is occurring:
    "A deadlock among DDL and parse locks is detected.
    This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
    ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
    The error refers to a procedure in a PL/SQL library.
    In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
    Any ideas?
    Thanks,
    Neville Sweet.

    I have written a JDAPI program to perform read-only impact analysis and report any problems.
    The following error is occurring:
    "A deadlock among DDL and parse locks is detected.
    This deadlock is usually due to user errors in the design of an application or from issuing a set of concurrent statements which can cause a deadlock.
    ORA-04020: deadlock detected while trying to lock object /NSPC6/CHECK_FOR_FORM_CHANGE"
    The error refers to a procedure in a PL/SQL library.
    In one case the error occurred after my final "end of processing" message, which is followed only by a call to "Jdapi.shutdown()".
    Any ideas?
    Thanks,
    Neville Sweet.

  • Error in Using JDAPI (Java Development API)

    I have some forms developed in Version 6.0.8.8.0 I am using Oracle JDeveloper 9.0.4 But when I try to test these code for upgrading from version 6 to 10g I am getting following Error
    My Program Codes
    import java.io.*;
    import oracle.forms.jdapi.*;
    public class Example1 {
    // generic part
    public static void main(String[] args) {
    Jdapi.setFailLibraryLoad(true);
    Jdapi.setFailSubclassLoad(true);
    try {
    File file = new File("c:\\Amsorcl\\Forms\\chart.fmb");
    System.out.println("Exist=" + file.exists());
    System.out.println("Can Read=" + file.canRead());
    System.out.println("Can Write=" + file.canWrite());
    //JdapiModule.openModule(file);
    //JdapiModule.openModule("c:\\Amsorcl\\Forms\\chart.fmb");
    FormModule form = FormModule.open("C:\\AMSORCL\\FORMS\\CHART.FMB");
    finally {
    Jdapi.shutdown();
    Error as the result of progam
    Exist=true
    Can Read=true
    Can Write=true
    oracle.forms.jdapi.JdapiStatusException: jniinitialize: Failed to create new forms context
         at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
         at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
         at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
         at oracle.forms.jdapi.FormModule.open(Unknown Source)
         at oracle.forms.jdapi.FormModule.open(Unknown Source)
         at Example1.main(Example1.java:22)
    Exception in thread main
    Process exited with exit code 1.

    1. Why are you using JDAPI to upgrade from 6i to 10g? You can use the Forms Migration Utility instead.
    2. Are you running this in UNIX environment? If yes, have you set the LD_LIBRARY_PATH to $ORACLE_HOME/lib directory?

  • Oracle.forms.jdapi.JdapiStatusExcept

    Hi,
    Help me
    I am trying link to Oracle Forms by JDeveloper ,
    but i can't link , showing this Exception
    Exception in thread "AWT-EventQueue-0" oracle.forms.jdapi.JdapiStatusException:
    jniinitialize: Failed to create new forms context
    ok

    Hello , I think its JDapi related error . i explain more details below.
    import oracle.forms.jdapi.*;
    public class JdapiSessionExample
    public static void main(String[] args)
    Jdapi.setFailSubclassLoad(true);
    Jdapi.setFailLibraryLoad(true);
    FormModule fmb = new FormModule("myform.fmb");
    Jdapi.shutdown();
    Exception
    Exception in thread "main" oracle.forms.jdapi.JdapiStatusException: jniinitial
    ize: Failed to create new forms context
    at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
    at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
    at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
    at oracle.forms.jdapi.FormModule.<init>(Unknown Source)
    at JdapiSessionExample.main(JdapiSessionExample.java:16)

  • Jdapi with forms 6

    Hello,
    I am building a java program to make changes programmatically to a form programmed under forms 6i.
    I want to use the library jdapi in java that works fine under form 10g.
    I have added f60jdapi.jar file in my project library and ifjapi60.dll to the oracle 6.
    I have executed the following commands:
    Jdapi.setFailLibraryLoad(true);
    Jdapi.setFailSubclassLoad(true)
    JdapiModule jdapmod;
    but when i execute this command
    jdapmod = JdapiModule.openModule("FORM6I.fmb");
    i get this error:
    oracle.forms.jdapi.JdapiException: jniinitialize: Failed to create new forms context
         at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
         at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
         at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
         at oracle.forms.jdapi.FormModule.open(Unknown Source)
         at oracle.forms.jdapi.JdapiModule.openModule(Unknown Source)
         at oracle.forms.jdapi.JdapiModule.openModule(Unknown Source)
         at common.backing.FormsUpdate.editForm(FormsUpdate.java:92)
         at common.backing.FormsUpdate.main(FormsUpdate.java:56)
    Note: These commands are executed without errors under forms 10g.
    Thanks for your help!
    Best regards,

    As said I can only speak for 10g, but this is what my path looks like:
    ${ora10.home}/jdk/jre/bin/classic;${ora10.home}/jdk/jre/bin;${ora10.home}/jdk/jre/bin/client;${ora10.home}/jlib;${ora10.home}/bin;${ora10.home}/jre/1.4.2/bin/client;${ora10.home}/jre/1.4.2/bin;So as you can see there is also the JDK of the developer suite in front in the path. What I seem to see in your path is that at least you have a 11g installation and the corresponding JDK in your path which might be a problem as it is 1.6 whereas the 6i developer suite is....well, some ancient version below 1.6 ;-). So you might want to try change that too. As you seem to have a little bit newer OS (powershell in the path) did you try it on a certified combination (e.g. virtual XP machine)? I did something with the OpenAPI in 6i on my Windows 7 which basically works, but I don't know if this will work with the JDAPI (which basically calls the C-API again, but then who knows whats inbetween).
    cheers

  • Forms Migration from 6i to 9i.

    Hi
    We have installed Oracle 9iAS and 9i database on Solaris system and now in the process to migrate 6i forms to 9i version. When I use Migration Assistant, came along with 9i, to convert a single form, I only get a core dump file and following message in log file :
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0xff233144
    Function name=strlen
    Library=/usr/lib/libc.so.1
    Current Java thread:
    at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
    at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
    at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
    at oracle.forms.jdapi.FormModule.open(Unknown Source)
    at oracle.forms.jdapi.JdapiModule.openModule(Unknown Source)
    at oracle.forms.jdapi.JdapiModule.openModule(Unknown Source)
    at oracle.forms.util.upgrade.Analyzer.doAllModulesTreewalk(Unknown Sou
    at oracle.forms.util.upgrade.Analyzer.<init>(Unknown Source)
    at oracle.forms.util.upgrade.PlsqlConverterBatch.<init>(Unknown Source
    at oracle.forms.util.upgrade.PlsqlConverter.main(Unknown Source)
    Dynamic libraries:
    0x10000 /local/oracle/product/business/9iDEV/jdk/bin/../bin/sparc/native_threa
    0xff350000 /usr/lib/libthread.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff200000 /usr/lib/libc.so.1
    0xff330000 /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
    0xfe480000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/client/libjvm.s
    0xff2e0000 /usr/lib/libCrun.so.1
    0xff1e0000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff0d0000 /usr/lib/libm.so.1
    0xff310000 /usr/lib/libw.so.1
    0xff0b0000 /usr/lib/libmp.so.2
    0xff070000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/native_threads/libhp
    0xff040000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/libverify.so
    0xfe440000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/libjava.so
    0xfe410000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/libzip.so
    0xfe3a0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xfe2a0000 /usr/lib/nss_files.so.1
    0xfd090000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/libawt.so
    0xfac80000 /local/oracle/product/business/9iDEV/jdk/jre/lib/sparc/motif21/libmawt.so
    0xfd040000 /local/oracle/product/business/9iDEV/jdk/bin/../jre/lib/sparc/libmlib_image
    0xf4980000 /usr/lib/libXm.so.4
    0xfaf90000 /usr/lib/libXt.so.4
    0xfaed0000 /usr/lib/libXext.so.0
    0xfd010000 /usr/openwin/lib/libXtst.so.1
    0xf4880000 /usr/lib/libX11.so.4
    0xfaeb0000 /usr/lib/libSM.so.6
    0xfadd0000 /usr/lib/libICE.so.6
    0xfac50000 /usr/openwin/lib/libdga.so.1
    0xf4000000 /home/oracle/product/business/9iDEV/lib/libifjapi90.so
    0xf4bd0000 /home/oracle/product/business/9iDEV/lib/libnn90.so.0
    0xf3d00000 /home/oracle/product/business/9iDEV/lib/libobx90.so.0
    0xf3c00000 /home/oracle/product/business/9iDEV/lib/libvgs90.so.0
    0xf3980000 /home/oracle/product/business/9iDEV/lib/libde90.so.0
    0xf4940000 /home/oracle/product/business/9iDEV/lib/libucol90.so.0
    0xf4820000 /home/oracle/product/business/9iDEV/lib/libca90.so.0
    0xf47f0000 /home/oracle/product/business/9iDEV/lib/libuicc90.so.0
    0xfadb0000 /home/oracle/product/business/9iDEV/lib/libmma90.so.0
    0xf47b0000 /home/oracle/product/business/9iDEV/lib/libmmiw90.so.0
    0xf4bb0000 /home/oracle/product/business/9iDEV/lib/libmmov90.so.0
    0xf3fd0000 /home/oracle/product/business/9iDEV/lib/libmmos90.so.0
    0xf3f90000 /home/oracle/product/business/9iDEV/lib/libmmoi90.so.0
    0xf3be0000 /home/oracle/product/business/9iDEV/lib/libmmia90.so.0
    0xf3bc0000 /home/oracle/product/business/9iDEV/lib/libmmft90.so.0
    0xf3940000 /home/oracle/product/business/9iDEV/lib/libmmcm90.so.0
    0xf3ba0000 /home/oracle/product/business/9iDEV/lib/libuihx90.so.0
    0xf38d0000 /home/oracle/product/business/9iDEV/lib/libuc90.so.0
    0xf3860000 /home/oracle/product/business/9iDEV/lib/libuipr90.so.0
    0xf3680000 /home/oracle/product/business/9iDEV/lib/libuimotif90.so.0
    0xf3640000 /home/oracle/product/business/9iDEV/lib/libot90.so.0
    0xf35e0000 /home/oracle/product/business/9iDEV/lib/librem90.so.0
    0xf3560000 /home/oracle/product/business/9iDEV/lib/libree90.so.0
    0xf3540000 /home/oracle/product/business/9iDEV/lib/librec90.so.0
    0xf3510000 /home/oracle/product/business/9iDEV/lib/libuiimg90.so.0
    0xf34d0000 /home/oracle/product/business/9iDEV/lib/libuia90.so.0
    0xf34b0000 /home/oracle/product/business/9iDEV/lib/libtknqap90.so.0
    0xf3480000 /home/oracle/product/business/9iDEV/lib/libutt90.so.0
    0xf3450000 /home/oracle/product/business/9iDEV/lib/librod90.so.0
    0xf3420000 /home/oracle/product/business/9iDEV/lib/libror90.so.0
    0xf33f0000 /home/oracle/product/business/9iDEV/lib/libros90.so.0
    0xf33d0000 /home/oracle/product/business/9iDEV/lib/libdfc90.so.0
    0xf33a0000 /home/oracle/product/business/9iDEV/lib/libuat90.so.0
    0xf3380000 /home/oracle/product/business/9iDEV/lib/libutc90.so.0
    0xf3360000 /home/oracle/product/business/9iDEV/lib/libutj90.so.0
    0xf3330000 /home/oracle/product/business/9iDEV/lib/libutl90.so.0
    0xf3310000 /home/oracle/product/business/9iDEV/lib/libsl90.so.0
    0xf2800000 /home/oracle/product/business/9iDEV/lib/libclntsh.so.9.0
    0xf32f0000 /home/oracle/product/business/9iDEV/lib/libwtc9.so
    0xf32d0000 /usr/lib/libsched.so.1
    0xf32b0000 /usr/lib/libaio.so.1
    0xf3100000 /usr/lib/libXm.so.3
    0xf30e0000 /usr/lib/libgen.so.1
    0xf30c0000 /usr/lib/librt.so.1
    0xf30a0000 /usr/openwin/lib/locale/common/xlibi18n.so.2
    0xf27c0000 /usr/openwin/lib/locale/common/ximlocal.so.2
    Local Time = Wed Nov 20 12:23:45 2002
    Elapsed Time = 5
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode)
    It seems that some Java library is not properly installed. Further, there is no option like File -> Administration -> Compile File in 9i unlike previous versions which suggests that we have to use command line utilities (CLU) to compile the forms.
    Any help will be highly appriciated.
    Manish

    you should just need to change your calls from "ole2.whatever" to "client_ole2.whatever".It is not as straightforward as that. Sunil is using OLE Containers, for which there is no support, so he needs to first migrate his FORMS_OLE calls to use OLE2 and then he can convert those to use the webutil package.
    My own experience is that if you're doing anything simple you'll be okay, but anything leftfield will give you grief. JACOB is pretty stern with what it will accept as an OLE call.
    Cheers, APC

  • Forms Migration Assistant Access Violation

    Hi
    I have just installed Forms 10g Dev Suite locally. I am in the process of converting my 6i forms to 10g. When I run the frmplsqlconv.bat file I get an access violation. The output to the screen is as follows,
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x609001F6
    Function=lxhh2ci+0x6
    Library=C:\OraDevSuite10g\bin\oranls10.dll
    Current Java thread:
    at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
    at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
    at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
    at oracle.forms.jdapi.Jdapi.connectToDatabase(Unknown Source)
    at oracle.forms.util.wizard.Converter.main(Unknown Source).
    This is followed by a long list of dll files on my machine.
    Any ideas what is happening and what I need to do to correct it.
    Thanks.
    Leon

    No bugs have been reported on that particular function name. Please contact Oracle Support and have them analyze the problem and log a bug if necessary.

  • Error JDAPI

    Hello, I have this error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Oracle\Dev6i\BIN\ifjapi60.DLL: The operating system cannot run %1
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:992)
    at oracle.forms.jdapi.Jdapi.<clinit>(Unknown Source)
    at oracle.forms.jdapi.FormModule.open(Unknown Source)
    at oracle.forms.jdapi.FormModule.open(Unknown Source)
    at pkg_ana.AnalizarFormularios.main(AnalizarFormularios.java:179)
    How can I fix it?
    Thanks

    I know this problem in 10g jdapi; you have to put your JDAPI Oracle-Home entries before all other Oracle Homes in the Path...that worked for me in 10g...
    regards

  • Error initialising the Forms Jdapi

    Hi there
    We in the process of migrating from 6i to 10g. The process is convert all the .fmb to .xml, make neccessary changes and convert .xml to .fmb
    I used the Oracle utility tool
    frmf2xml.sh /oracle/test.fmb
    Error initialising the Forms Jdapi:
    jniinitialize: Failed to create new forms context
    I have set the DISPLAY as well. I have set all the relevant path etc to the Java files and also as recommended by Oracle.
    Our OS version is: Sun Solaris 5.10
    Dev Suite: 10.1.0.2
    $java -version
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
    This is quite urgent.
    I would appreciate your quick response. Thanks all for your help in advance.
    Regards
    PC

    This is a duplicate of
    frmf2xml.sh: need help

  • Error while invoking bpel through java

    when i was using java to invoke iam getting an exception
    com.oracle.bpel.client.ServerException: IDeliveryService.request() invoked for one-way operation 'initiate'. This method can only be used to invoke two-way operations which return an output message. Please check the WSDL which defines this operation and use the method IDeliveryService.post() to invoke a one-way operation.
    when iam using html the bpel works fine.
    But when i use java with IDeliveryService.post() it is giving error in Bpel flow by saying
    exception on JaxRpc invoke:
    start fault message:
    Internal Server Error (Caught exception while handling request: oracle.forms.jdapi.JdapiException: '' does not have an extension)
    :end fault message.
    Please help me in this issue.

    try as follows
    Invoking a one-way operation via Java API The procedure for invoking a one-way BPEL operation via the Java API is very similar, except that you will use the IDeliveryService.post() method (which is also overloaded). These methods invoke a one-way operation on a BPEL process and thus return void since a response is not expected (at least not a synchronous response). In the code example shown here, the post method used is exactly the same as the request() shown above, except that it returns void: From JavaDoc for com.oracle.bpel.client.dispatch.IDeliveryService <br><br>
    public void post(java.lang.String processId, java.lang.String operationName, NormalizedMessage message) throws java.rmi.RemoteException <br>
    <br><br>Selected JSP source:<br><br>
    <%@page import="com.oracle.bpel.client.Locator" %> <br>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %> <br>
    <%@page import="com.oracle.bpel.client.dispatch.IDeliveryService" %> ... <br>Locator locator = new Locator("default", "bpel", null); <br>
    ... NormalizedMessage nm = new NormalizedMessage( ); <br>
    nm.addPart("payload" , xml ); <br>
    deliveryService.post("HelloWorld", "initiate", nm); <br>
    out.println( "BPELProcess HelloWorld initiated!" ); %>

  • Using JDAPI to set the height of the Forms Canvas to it's default value

    Hi,
    I've been trying for a while to use the JDAPI to set the height of the Oracle Form Canvas to it's default value.
    Can anyone advice how to do this ?
    Can the currCanvas.inheritProperty(arg0) be used in this case ?
    Thanks in advance,
    regards

    Hi David,
    Note that I used a Footer Row in my Table. Headers and Footers have special properties. (A poster in the last couple of weeks asked for a summary of Header and Footer properties - somewhat frustrated that he couldn't find a succinct description in the User Guide. Well, there isn't one and the answer is so complicated that nobody has taken on the project. Now we have a new version of Numbers and the answer would need to change.)
    The way to avoid the error is to use a Footer Row and to use the shortcut cell reference notation: =SUMIF(C,TRUE,B). The columns are specified, but the row range is not. Footers are exempt in this notation, so no error is generated regarding a circular reference.
    Hope this clears it up.
    Jerry

  • How do i get the FormDumper.java from JDAPI working?

    Hi,
    I am a novice in Java and Forms Api (C). I am interested in a solution that would reduce the time for us to make some sweeping changes across applications and hence became interested in this. By trial and error, I got a couple of examples of the Forms Api (JDAPI) working. Now I would like to test the most important thing for us the FormDumper.java (available in online help of Form9i-JDAPI). However, I get an error like "import oracle.forms.jdapi.util.Getopt.*; "failed. There exists no classes, methods, packages called util in the f90jdapi.jar. Could somebody please help me here? You can also contact me on my private mail id [email protected]
    TIA!
    Cheers
    Pramodh

    Hi Duncan,
    Are the classes available on Technet or would you send me a copy of the zipped classes as well?
    Thanks
    Kenneth
    The Doc example is missing some utility classes which are simply used to parse the command line options - I'll send you a zip file containing the classes offline
    I also notices that a few typo's (capitalisation, extra brackets) have crept into that sample - I'll get the do corrected so it will be compilable - thanks for alerting us to this.

  • JDAPI DETACH()

    My purpose is to convert "windows-developed" .fmb files to run on an AIX box (ie case-sensitive issues).
    I was advised (by Oracle) to avoid using DETACH() with the iterator current, so I copied the details and then re-visted them. Although I am able to attach libraries, I am unable to detach some.
    I'm no C expert, but I was also lead to believe that this problem exist in the C API too. Nevertheless, a working API to workaround case-sensitive issues remains my gaol.
    I have documented out -> detachId.detach();
    With detach() put back in, I get the error :-
    Connecting to un/pwd@dbase_aliasConnected to un/pwd@dbase_alias
    Processing form form1.fmbForm Name module is FORM1
    Examining menuAttached Menu needs changing=FO_MENU
    Examining librariesAttached Library requires no change=d2kwutil
    Attached Library name to be changed=allpack
    Attached Library requires no change=allproc
    Attached Library name to be changed=allshare
    Attached Library requires no change=webutil
    Detachingd2kwutil
    ALLPACK
    allproc
    ALLSHARE
    Exception in thread main
    webutil
    Attachingoracle.forms.jdapi.JdapiIllegalStateException: Null d2fob pointer at oracle.forms.jdapi.BaseFormsObject.getStringProperty(Unknown Source)
         at oracle.forms.jdapi.AttachedLibrary.getName(Unknown Source)
         at fixForm.main(fixForm.java:146)
    Process exited with exit code 1.
    import java.io.*;
    import oracle.forms.jdapi.*;
    public class fixForm
    static FormModule fmb;
    public static void main(String[] args)
    String debug="";
    String formName="";
    String menuName="";
    String libName="";
    String connString="";
    String pad=" ";
    String line="------------------------------------------------------------------------------";
    boolean menuIsChanged = false;
    boolean libIsChanged = false;
    AttachedLibrary[] arrayOfLibs = new AttachedLibrary[15];
    AttachedLibrary attachId;
    AttachedLibrary detachId;
    int noOfLibs = 0;
    if (args.length != 3)
    System.out.println("");
    System.out.println(line);
    System.out.println("Usage: java fixForm <module name> <user/password@connectString> <Debug>");
    System.out.println(" eg java fixForm form1.fmb un/pwd@dbase_alias Y");
    System.out.println(line);
    //System.exit(0);
    formName = "form1.fmb";
    connString = "un/pwd@dbase_alias";
    debug = "Y";
    else
    formName = args[0];
    connString = args[1];
    debug = args[2];
    // Connect to the database
    if (debug.equals("Y")) {System.out.println(">>> Connecting to " + connString);}
    Jdapi.connectToDatabase(connString);
    if (debug.equals("Y")) {System.out.println(pad+"Connected to " + connString);}
    // Identify the form.
    if (debug.equals("Y")) {System.out.println(">>> Processing form " + formName);}
    fmb = FormModule.open(formName);
    if (debug.equals("Y")) {System.out.println(pad+"Form Name module is " + fmb.getName());}
    // Identify the menu, if applicable.
    if (debug.equals("Y")) {System.out.println(">>> Examining menu");}
    menuName = fmb.getMenuModule();
    // See if set.
    if ( (menuName.length() == 0) | (menuName.toUpperCase() == "DEFAULT") )
    if (debug.equals("Y")) {System.out.println(pad+"Menu is blank, or default");}
    else
    // Check case sensitivity is lower case.
    if (menuName == menuName.toLowerCase())
    if (debug.equals("Y")) {System.out.println(pad+"Attached Menu is fine=" + menuName);}
    // Otherwise, re-attach with correct case sensitivity.
    else
    if (debug.equals("Y")) {System.out.println(pad+"Attached Menu needs changing=" + menuName);}
    menuIsChanged = true;
    try
    fmb.setMenuModule(menuName.toLowerCase());
    catch(Exception e1)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not re-attach menu "
    + menuName.toLowerCase());
    System.out.println(line);
    System.exit(0);
    // Identify all associated libraries.
    JdapiIterator all_libs = fmb.getAttachedLibraries();
    // Process the above list of attached libraries
    if (debug.equals("Y")) {System.out.println(">>> Examining libraries");}
    while (all_libs.hasNext())
    noOfLibs++;
    // Identify each library name.
    AttachedLibrary lib = (AttachedLibrary)all_libs.next();
    arrayOfLibs[noOfLibs] = lib;
    libName = lib.getLibraryLocation();
    // See if it's not all lower case
    if (libName == libName.toLowerCase())
    if (debug.equals("Y")) {System.out.println(pad+"Attached Library requires no change=" + libName);}
    else
    libIsChanged = true;
    libName = libName.toLowerCase();
    if (debug.equals("Y")) {System.out.println(pad+"Attached Library name to be changed=" + libName);}
    // If their are case-sensitive libs, then re-build the attachments accordingly.
    if (libIsChanged = true)
    // Now we have the list, de-attach all libraries.
    if (debug.equals("Y")) {System.out.println(">>> Detaching");}
    for (int j = 1; j <= noOfLibs; j++)
    detachId = arrayOfLibs[j];
    libName = detachId.getLibraryLocation();
    if (debug.equals("Y")) {System.out.println(pad+libName);}
    try
    //detachId.detach();
    catch(Exception e2)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not detach library "
    + libName);
    System.out.println(line);
    System.exit(0);
    // Now that no libs are attached, re-attach, based on list.
    if (debug.equals("Y")) {System.out.println(">>> Attaching");}
    for (int k = 1; k <= noOfLibs; k++)
    attachId = arrayOfLibs[k];
    libName = attachId.getName().toLowerCase();
    if (debug.equals("Y")) {System.out.println(pad+libName);}
    try
    AttachedLibrary new_lib = new AttachedLibrary(fmb,libName);
    catch(Exception e3)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not attach library "
    + libName);
    System.out.println(line);
    System.exit(0);
    // If the form has been changed, then compile and save.
    if (menuIsChanged | libIsChanged)
    // Compile the form to create a fmx.
    if (debug.equals("Y")) {System.out.println(">>> Compiling");}
    try
    fmb.compile();
    catch(Exception e4)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not recompile");
    System.out.println(line);
    System.exit(0);
    // Save the form.
    if (debug.equals("Y")) {System.out.println(">>> Saving");}
    try
    fmb.save(formName);
    catch(Exception e5)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not save");
    System.out.println(line);
    // Free the underlying native object
    fmb.destroy();
    // Shutsdown the Jdapi instance
    Jdapi.shutdown();
    if (debug.equals("Y")) {System.out.println(">>> Quiting");}
    I would be very grateful if you are able to offer me some advice here.
    Rgds,
    Mark . Spooner @ Investmaster . Com

    My purpose is to convert "windows-developed" .fmb files to run on an AIX box (ie case-sensitive issues).
    I was advised (by Oracle) to avoid using DETACH() with the iterator current, so I copied the details and then re-visted them. Although I am able to attach libraries, I am unable to detach some.
    I'm no C expert, but I was also lead to believe that this problem exist in the C API too. Nevertheless, a working API to workaround case-sensitive issues remains my gaol.
    I have documented out -> detachId.detach();
    With detach() put back in, I get the error :-
    Connecting to un/pwd@dbase_aliasConnected to un/pwd@dbase_alias
    Processing form form1.fmbForm Name module is FORM1
    Examining menuAttached Menu needs changing=FO_MENU
    Examining librariesAttached Library requires no change=d2kwutil
    Attached Library name to be changed=allpack
    Attached Library requires no change=allproc
    Attached Library name to be changed=allshare
    Attached Library requires no change=webutil
    Detachingd2kwutil
    ALLPACK
    allproc
    ALLSHARE
    Exception in thread main
    webutil
    Attachingoracle.forms.jdapi.JdapiIllegalStateException: Null d2fob pointer at oracle.forms.jdapi.BaseFormsObject.getStringProperty(Unknown Source)
         at oracle.forms.jdapi.AttachedLibrary.getName(Unknown Source)
         at fixForm.main(fixForm.java:146)
    Process exited with exit code 1.
    import java.io.*;
    import oracle.forms.jdapi.*;
    public class fixForm
    static FormModule fmb;
    public static void main(String[] args)
    String debug="";
    String formName="";
    String menuName="";
    String libName="";
    String connString="";
    String pad=" ";
    String line="------------------------------------------------------------------------------";
    boolean menuIsChanged = false;
    boolean libIsChanged = false;
    AttachedLibrary[] arrayOfLibs = new AttachedLibrary[15];
    AttachedLibrary attachId;
    AttachedLibrary detachId;
    int noOfLibs = 0;
    if (args.length != 3)
    System.out.println("");
    System.out.println(line);
    System.out.println("Usage: java fixForm <module name> <user/password@connectString> <Debug>");
    System.out.println(" eg java fixForm form1.fmb un/pwd@dbase_alias Y");
    System.out.println(line);
    //System.exit(0);
    formName = "form1.fmb";
    connString = "un/pwd@dbase_alias";
    debug = "Y";
    else
    formName = args[0];
    connString = args[1];
    debug = args[2];
    // Connect to the database
    if (debug.equals("Y")) {System.out.println(">>> Connecting to " + connString);}
    Jdapi.connectToDatabase(connString);
    if (debug.equals("Y")) {System.out.println(pad+"Connected to " + connString);}
    // Identify the form.
    if (debug.equals("Y")) {System.out.println(">>> Processing form " + formName);}
    fmb = FormModule.open(formName);
    if (debug.equals("Y")) {System.out.println(pad+"Form Name module is " + fmb.getName());}
    // Identify the menu, if applicable.
    if (debug.equals("Y")) {System.out.println(">>> Examining menu");}
    menuName = fmb.getMenuModule();
    // See if set.
    if ( (menuName.length() == 0) | (menuName.toUpperCase() == "DEFAULT") )
    if (debug.equals("Y")) {System.out.println(pad+"Menu is blank, or default");}
    else
    // Check case sensitivity is lower case.
    if (menuName == menuName.toLowerCase())
    if (debug.equals("Y")) {System.out.println(pad+"Attached Menu is fine=" + menuName);}
    // Otherwise, re-attach with correct case sensitivity.
    else
    if (debug.equals("Y")) {System.out.println(pad+"Attached Menu needs changing=" + menuName);}
    menuIsChanged = true;
    try
    fmb.setMenuModule(menuName.toLowerCase());
    catch(Exception e1)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not re-attach menu "
    + menuName.toLowerCase());
    System.out.println(line);
    System.exit(0);
    // Identify all associated libraries.
    JdapiIterator all_libs = fmb.getAttachedLibraries();
    // Process the above list of attached libraries
    if (debug.equals("Y")) {System.out.println(">>> Examining libraries");}
    while (all_libs.hasNext())
    noOfLibs++;
    // Identify each library name.
    AttachedLibrary lib = (AttachedLibrary)all_libs.next();
    arrayOfLibs[noOfLibs] = lib;
    libName = lib.getLibraryLocation();
    // See if it's not all lower case
    if (libName == libName.toLowerCase())
    if (debug.equals("Y")) {System.out.println(pad+"Attached Library requires no change=" + libName);}
    else
    libIsChanged = true;
    libName = libName.toLowerCase();
    if (debug.equals("Y")) {System.out.println(pad+"Attached Library name to be changed=" + libName);}
    // If their are case-sensitive libs, then re-build the attachments accordingly.
    if (libIsChanged = true)
    // Now we have the list, de-attach all libraries.
    if (debug.equals("Y")) {System.out.println(">>> Detaching");}
    for (int j = 1; j <= noOfLibs; j++)
    detachId = arrayOfLibs[j];
    libName = detachId.getLibraryLocation();
    if (debug.equals("Y")) {System.out.println(pad+libName);}
    try
    //detachId.detach();
    catch(Exception e2)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not detach library "
    + libName);
    System.out.println(line);
    System.exit(0);
    // Now that no libs are attached, re-attach, based on list.
    if (debug.equals("Y")) {System.out.println(">>> Attaching");}
    for (int k = 1; k <= noOfLibs; k++)
    attachId = arrayOfLibs[k];
    libName = attachId.getName().toLowerCase();
    if (debug.equals("Y")) {System.out.println(pad+libName);}
    try
    AttachedLibrary new_lib = new AttachedLibrary(fmb,libName);
    catch(Exception e3)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not attach library "
    + libName);
    System.out.println(line);
    System.exit(0);
    // If the form has been changed, then compile and save.
    if (menuIsChanged | libIsChanged)
    // Compile the form to create a fmx.
    if (debug.equals("Y")) {System.out.println(">>> Compiling");}
    try
    fmb.compile();
    catch(Exception e4)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not recompile");
    System.out.println(line);
    System.exit(0);
    // Save the form.
    if (debug.equals("Y")) {System.out.println(">>> Saving");}
    try
    fmb.save(formName);
    catch(Exception e5)
    System.out.println(line);
    System.out.println("Error: "
    + formName
    + " could not save");
    System.out.println(line);
    // Free the underlying native object
    fmb.destroy();
    // Shutsdown the Jdapi instance
    Jdapi.shutdown();
    if (debug.equals("Y")) {System.out.println(">>> Quiting");}
    I would be very grateful if you are able to offer me some advice here.
    Rgds,
    Mark . Spooner @ Investmaster . Com

  • Using JDAPI to manipulate record group

    Hi.
    I am doing a migration from oracle forms 4.5 to 10g. For now I was able to manage/fix everyting using JDAPI interface. Now I am stuck with the following problem. In forms 4.5 it was perfectly legal to use a value of record group column larger than data length of that column. From forms 6+ there is a runtime error generated when this situation is met. What I wanted to do is to change/truncate record group value to the length of that column using JDAPI. No matter how I search I cant find proper metod to do the job. That is to change the value of record group column. Did anybody had a similar situation and was able to solve it.
    Best regards.

    Hi.
    I am doing a migration from oracle forms 4.5 to 10g. For now I was able to manage/fix everyting using JDAPI interface. Now I am stuck with the following problem. In forms 4.5 it was perfectly legal to use a value of record group column larger than data length of that column. From forms 6+ there is a runtime error generated when this situation is met. What I wanted to do is to change/truncate record group value to the length of that column using JDAPI. No matter how I search I cant find proper metod to do the job. That is to change the value of record group column. Did anybody had a similar situation and was able to solve it.
    Best regards.

  • Using JDAPI to reattach PLL Library/Libraries

    Hi
    I am attempting to change the libraries attached to some forms, to convert the names to lowercase as part of a Unix deployment project.
    I am using the standard code posted on Metalink. The Forms were Designer-generated as Forms 4.5 originally and have been upgraded to Forms 9.0.4.0.19. I am using the JDK in the Developer Suite Oracle Home. The Forms are in a different directory to the Libraries, but all the directories are in the FORMS90_PATH set both in the Registry and as a cmd.exe environment variable.
    I have two problems:
    1) If I attempt to just list the libraries attached to the Form, with something like:
         FormModule fmd;
         fmd=FormModule.open(args[0]);
         System.out.println("Processing module " + fmd.getName() + "...");
         JdapiIterator all_libs = fmd.getAttachedLibraries();
         while (all_libs.hasNext())
              AttachedLibrary lib = (AttachedLibrary)all_libs.next();
              System.out.println("Attached Library = " + lib.getName());
         fmd.destroy();
    This returns:
         Processing module MODULE...
         Attached Library = OFG4TEL
         Attached Library = OFG4MES
         Attached Library = OFG4BSL
         Attached Library = OFGMES
    Unfortunately, I know that there are more libraries than this. The Form is attached to a single module library (called MODULE.pll), which is attached to an application-level library, which is then attached to the Designer-libraries (OFG4*).
    Does anyone know why this code lists the Designer libraries, but not the others?
    If you convert the FMB to XML, it also has only the Designer-libraries, but opening the Form in Form Builder shows the full list.
    2) I attempted to remove all the libraries from the Form by adding a lib.destroy(); into the loop above and a fmd.save(args[0]); after it. When I run this the loop terminates after the first iteration. It doesn't report any errors, but it doesn't actually remove the module library either. It is doing something though, because if you reopen the Form in Form Builder the module and application library attachments have been lost and just the Designer ones remain?
    I don't really want to update all the modules by hand, and any assistance would be greatly appreciated.
    FWIW I also tried converting the FMBs to XML using the IFF2XML90 batch file, and then doing a search & replace on the XML file before converting back into a Form using IFXML2F90.bat. This doesn't work either because it also loses the module and application library attachments as described above, possibly because these batch files are using JDAPI internally and JDAPI doesn't like my Forms!
    Thanks
    Roger

    I sincerely hope that you have found a solution by now....
    It is a strange situation that you describe.
    I think you might have found that the OFG-libraries are actually in a different directory from where you expected them to be found by JDAPI. Have you used lib.getLibraryLocation()?
    The next step would have entail trying to find out where this different path was set, and why JDAPI uses that setting, instead of the settings in registry and batchfile.
    Just some thoughts.
    Greetings!
    Remco

Maybe you are looking for

  • External hard drives and MacBook

    Sorry, I don't know if this is posted in the right section. I have a MacBook connected with an external hard drive. I'm not sure what it takes for an external hard drive to crash, but I unplug it until I need to pull something from it or backup files

  • HT4711 Where can I buy iPhoto for Mac OS X 10.6.8?

    Where can I buy iPhoto for Mac OS X 10.6.8?

  • Shuffle shows up on laptop, but not desktop comp

    so my moms shuffle shows up on her laptop, but when plugged into the comp at home, it shows up on the computer until itunes pops up, it then asks if we want to do somethin with the library, we click no and then there is nothing.. i thought it was the

  • Dots are appearing on characters after created PDF through *.dwg file using AutoVue API

    Hi,    I created PDF's through *.dwg file using AutoVue API 20.2.2. I observed in more zoom of PDF, every character or line has dots. At the same time on second page of PDF drawing lines are thicker that first page of PDF.    Please kindly help on th

  • How to delete a photo from Device-Work/photos

    How to delete a photo from Device-Work/photosI saved a photo from my work email account (it's a picture of a golf green) and afterward, I noticed that I can't really do anything with it. How do you delete files from the "work" side of the phone? Also