Forms jdapi and attached libraries

using Jdapi to manipulate forms is an exciting experience, especially, when misterious things happen
i wrote a simple code to list all the attached libraries (the reason for that is i want to migrate Forms application from Windows env to Unix and i wanted to change all attached libraries to lower case)
JdapiModule.openModule("c:\\MODULE2.FMB");
JdapiIterator fmbs = Jdapi.getModules();
FormModule fmb = (FormModule)fmbs.next();
//FormModule fmb = new FormModule("myform.fmb");
JdapiIterator libs = fmb.getAttachedLibraries();
while (libs.hasNext())
AttachedLibrary lib = (AttachedLibrary)libs.next();
// System.out.println(lib);
System.out.println(lib.getLibraryLocation());
// System.out.println(lib.getLibrarySource());
System.out.println(lib.getName());
This works only if the libarary is attached with library path included!
When i run the same code against a form where the library is attached with path removed, the code above does not detect the attached library at all?
ie libs.hasNext() return false
Ammar Sajdi
www.e-ammar.com
www.palco-me.com
founder and managing partner

I created another form with an attached library on another PC.
I ran the same program, and the program runs perfectly!!!!!!!
i really do not understand this behaviour!
The forms i am using is 9.0.4.19
Glad it works on other pc's
Ammar Sajdi

Similar Messages

  • Forms debugger with attached libraries

    Hi
    Is it possible to use the forms debugger with attached libraries ? ( 9I 10g )
    And how to do that if it is possible ?
    thanks

    In fact there is no problem, I had a procedure with a "procedure spec" in my attached library and that caused a PL/SQL problem when I tried to call my procedure. The code in the procedure was never executed and I got no result with the debugger.
    I don't understand why Forms allows me to create a "procedure spec" for an alone procedure in the library ( not in a package ). I got no compilation error for it and the library was generated as well. But there is an error at runtime.
    sorry.

  • Attached Libraries and Performance issues on the AS

    We are moving toward Forms 9i and 9iAS.
    I have common SQL code that should be accessed from many Forms and considering
    between creating Database Packages and Oracle Forms Packages as Attached
    Libraries.
    Have been told that they both operate differently with the Forms PL/SQL packages
    loaded 'thinly' (only the components being called and also in 4k memory size).
    So there is an argument to go for Forms Package as opposed to Database packages
    this way!.
    Obviously the Forms package will be loaded somewhere in a Run Forms session, but
    does this means other Oracle Forms programs can access the loaded program unit.
    Let me say user A running Forms A has an attached library which is also accessed
    by user B running Forms B but trying to access the same program unit in the same
    attached library.
    Would the 9iAS recognise this and load only one copy, assuming user A started
    first and hasnt closed his/her session while user B starts Forms B soon after?

    Ravi,
    as far as I know the answer is yes, Forms only loads the library only once and shares it in memory.
    Frank

  • Application Server and performance with Attached Libraries

    We are moving toward Forms 9i and 9iAS.
    I have common SQL code that should be accessed from many Forms and considering
    between creating Database Packages and Oracle Forms Packages as Attached
    Libraries.
    Have been told that they both operate differently with the Forms PL/SQL packages
    loaded 'thinly' (only the components being called and also in 4k memory size).
    So there is an argument to go for Forms Package as opposed to Database packages
    this way!.
    Obviously the Forms package will be loaded somewhere in a Run Forms session, but
    does this means other Oracle Forms programs can access the loaded program unit.
    Let me say user A running Forms A has an attached library which is also accessed
    by user B running Forms B but trying to access the same program unit in the same
    attached library.
    Would the 9iAS recognise this and load only one copy, assuming user A started
    first and hasnt closed his/her session while user B starts Forms B soon after?

    You should probably ask this on the Forms discussion forum.
    http://www.oracle.com/technology/discussionforums/forms.html
    But in general Forms on the Web share objects in the memory on the application server - including plls.

  • JDAPI - method getAttachedLibraries does not get all attached libraries

    Hello,
    i've a strange behavior while using JDAPI to list all Libraries attached to forms.
    I've the following code:
    Jdapi.startup(true, true, true);
    String startModule = new String("c:\\test.fmb");
    FormModule fmd = FormModule.open(startModule);
    System.out.println(formPath+"\\"+form);
    JdapiIterator libs = fmd.getAttachedLibraries();
    while ( libs.hasNext())
    AttachedLibrary currLib = (AttachedLibrary) libs.next();
    System.out.println("Lib="+currLib.getName());
    if (currLib.getName().equalsIgnoreCase("WEBUTIL") || currLib.getName().equalsIgnoreCase("WEBUTIL_LIB")) {
    System.out.println("->"+startModule);
    Jdapi.shutdown();
    This code is very simple and the idea is to check form for Attached Libraries named WEBUTIL or WEBUTIL_LIB.
    However i'm getting an annoying behavior, because i see that it is not reading all Libraries attached to the form, but only some of them ... is there anything i'm doing wrong?
    Thanks,
    Pedro Ribeiro
    Edited by: pribeiro on Sep 23, 2009 11:36 AM

    Hi Ruslim,
    you get the below mentioned error due to following:
    1: for payment method T = "ACH" street, bank address is a required filed in FBZP configuration. so vendor master data needs to have street, city & bank inforamtion filled.
    2: vendor line items should have payment method as T = "ACH"
    3: delete all the previous open proposal for same vendor
    Hope this helps
    Pls assing points as way to say thanks

  • Delete and attach library without forms builder using java api

    Hi all,
    I am not at all familiar with JAVA. Appreciate if somebody can help me out.
    We have a lot of forms and we are moving them to aix server. To standardize we have renamed all the files as FILENAME.ext i.e filename is upper case and extension is lower. After doing this we get errors while compiling the fmbs as the filename has been modified after it was attached in the forms.
    I need the java api and the procedure to run the api to delete the existing attached libraries and attach the renamed libraries.
    Appreciate your help in this regards.
    Regards,

    hello,
    There are severail ways for you to solve this problem.
    1) Use the jdapi utility you can find at Francois degrelle's javabean depot. Quite easy to use and should solve your problem. You can find it here:
    http://forms.pjc.bean.over-blog.com/article-13596554.html
    2) Use the following two java methods as the basis for your java converter.
    <blockquote>
    private boolean findJdapiObject(JdapiObject object,String objName){
         boolean matchFlag=false;
         // get Iterator with all ownedObjects
    JdapiIterator ownedObjects = object.getOwnedObjects();
    // loop all ownedObjects
    while (ownedObjects.hasNext()) {
    JdapiObject ownedObject = (JdapiObject)ownedObjects.next();
    if (ownedObject.getName().equalsIgnoreCase(objName)){
         matchFlag=true;
         message_verbose = "Librairie PLL est déjà attachée !! " ;
    this.addOutputLine(message_verbose,0);
         return matchFlag;
    // check child objects of this child using recursion
    findJdapiObject(ownedObject, objName);
    return matchFlag;
    private void addJdapiObject(JdapiModule object,String objName){
         boolean matchFlag=false;
         //check if PLL exists
         matchFlag=findJdapiObject((JdapiObject)object, objName);
         if (!matchFlag){
              //add PLL
              numOcc++;
              AttachedLibrary newLib =
    new AttachedLibrary((FormModule)object,objName.toLowerCase());
    </blockquote>
    You need to check that your object does not exist before adding it. You can also modify the addJdapiObject method to remove objects.
    Hafed

  • Oracle Forms - Compilation error due to attached libraries

    Hi,
    I am builing forms using Oracle Forms 10g and almost everytime I recompile the form, I have to delete some attached libraries and add them again. This happens a lot of times and I don't know why. These attached libraires have not been changed.
    Can anyone help me with this issue please? It's very anoying :(
    Thanks.
    Regards,
    Amado
    Edited by: 973539 on 27/Nov/2012 20:09

    That should be correct. If you attached the libraries without a path, modified your FORMS_PATH to include the path that the libraries are sitting in, then the form should pick them up.
    I would:
    1. Verify that FORMS_PATH has the correct path. Make sure the '\' are pointing in the right direction and that the path is separated from the other paths by a semicolon.
    2. Make sure you changed the correct FORMS_PATH. You might have multiple ORACLE_HOMEs so you need to make sure the ORACLE_HOME you are using is the one that has FORMS_PATH set up in it.
    3. After FORMS_PATH is correct you shouldn't have to reattach the libraries, but try it again without including the path.
    I read CraigBs reply below and it made me think of something else you might want to look at:
    4. Check all the directories that are listed in your FORMS_PATH and see if there are older versions of the libraries in one of the paths that shouldn't be there and remove the unneccessary ones. For example, if your FORMS_PATH is set to "C:\Work\11g;C:\Oracle11g\Middleware\as_1\forms;C:\Oracle11g\Middleware\asinst_1\FormsComponent\forms;" then there are three directories that forms looks through everytime it runs. In this case, you would check all three directories and see if there were older libraries in there that needed to be removed because they are overwriting the one that you want to be picked up.
    Edited by: MLBrown on Nov 28, 2012 7:37 AM

  • Forms to XML Misses Some Attached Libraries

    Trying both iff2xml90 and frmf2xml to generate a 6i Form to XML only a few Attached Libraries get included in the output. Are there other requirements/tricks/gotchas in getting them to be included?
    keywords: iff2xml90.bat frmf2xml.bat "forms to xml" "AttachedLibrary"

    OK, this is a flagrant bump, I admit it :)
    Anybody got any ideas? Any clues on some additional configuration I can do either for frmf2xml, my Oracle environment, or maybe even my Java environment itself?
    Even guesses would be appreciated.
    Dave

  • Forms/Designer 10g - problem with attached libraries

    I've problem with forms with attached libraries. All of libraries have removed paths. I can run all forms without any problem on my local application server from Forms Builder 9i or Designer 9i. I added all paths in registry FORMS90_PATH. WORKINGDIRECTORY in formsweb.cfg is blank.
    Unfortunately I can't do it with Developer 10g on second workstation. I added all paths in registry FORMS_PATH. WORKINGDIRECTORY in formsweb.cfg is blank too. When form is running I get ORA-06508. I can't store all files (fmb, fmx, pll, plx etc.) in one folder because I've to use CVS. In this case I can't set any folder in WORKINGDIRECTORY.

    Assuming Forms 10.1.2.x, FMX, MMX, PLX, and OLB files are found based on the value of FORMS_PATH which is set in default.env and not the Registry. This applies to runtime only. The Builder uses the Registry.
    Understand that "runtime" refers to any time a form is displayed in a browser, regardless of whether is was started from the Builder or Application Server.
    Also, be aware that if you have FMX, MMX, or PLX files which were created in older versions they must be recompiled using the 10.1.2 compiler.

  • I have created a form in InDesign, exported to a pdf, created an editable form and saved.  When I open the form and make changes and save, the reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is alway

    I have created a form in InDesign, exported to a pdf, then created an editable form and saved.  When I open the form and make changes and save, then reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is always minus the edits.   ????

    Hi chuck,
    If you ave created the form and then filling it yourself and saving the form, the filled data should be there when you reopen the same form.
    Can you please send the form to me at [email protected]  so that I can have a look.
    Regards,
    Rave

  • Is it possible to create a standard form that can be emailed to anyone and once filled out by the receiver, have a button that the receiver clicks and the form is encrypted and attached an email back to the sender and a preset admin password would open it

    Is it possible to create a standard form that can be emailed to anyone and once filled out by the receiver, have a button that the receiver clicks and the form is encrypted and attached to an email back to the sender and a preset admin password would open it?

    Hello Graphicsguy123,
    You would need to first create the form ( or Widget in EchoSign) first to generate a url which you can paste it in the email being sent to customers. You would need to make sure you have a Document Cloud Enterprise Premium account in order to create a Widget. If you don't have the account, you can use the trial version to test it. Here is the link:
    Global Trial Registration | eSign services from Adobe
    -Rijul

  • Multipart/form-data and file attachment

    Hi ,
    This question has probably been asked before, but if not then here it is. Any replies will be appreciated:
    Q. When using "Enctype=Multipart/form-data", with file attachment alongwith other form fields, is it mandatory to attach a file ? What if user selects no file to attach?
    Q. If no, then how can it be possible that a form can be submitted without attaching a file since when I try to submit a form with no file attached to it, it gives me error message saying :java.lang.NullPointerException
    Q. Does it mean that I can't have a form with a blank "File" input field, if the form's Enctype is "multipart/form-data"? Since users may not select a file to attach to the form, in other words it is an optional.
    I hope I was clear enough in explaining my questions.
    Thanks in advance.

    I am using Orielly's file attachement pacakge.
    Here's what I am doing in my JSP page: It does the following:
    int maxFileSize = 10 * 1024 * 1024; // 5MB max
    String uploadDir = "/direct/files/upload/";
    String FormResults = "";
    String FileResults = "";
    String fileName = "";
    String fileName2 = "";
    String paramName="";
    String paramValue="";     
    File f;
    int filecounter=1;
    first get the form fields using following code:
    MultipartRequest multi = new MultipartRequest(request, uploadDir, maxFileSize);
    Enumeration params = multi.getParameterNames();
    //Get the form information
    while (params.hasMoreElements())
         paramName = (String) params.nextElement();     
         paramValue = multi.getParameter(paramName);
         if (paramName.equals("emailconfirm"))
              emailconfirmation = paramValue;
         else if (paramName.equals("Requester"))
              Requester = paramValue;
         else if (paramName.equals("TodaysDate"))
              TodaysDate = paramValue;
         else if (paramName.equals("Extension"))
    }//end while
    Then it gets the file information using the following code: I have two file fields in my form so that's why I am using a filecounter to find out if user has attached two files or just one:
    Enumeration files = multi.getFileNames();
    while (files.hasMoreElements())
         String formName = (String) files.nextElement();
         if (filecounter == 2)
    fileName2 = multi.getFilesystemName(formName);
         String fileType = multi.getContentType(formName);
              f = multi.getFile(formName);
         FileResults += "<BR>" + formName + "=" + fileName2 + ": Type= " + fileType + ":
    Size= " + f.length();
         else
         {     fileName = multi.getFilesystemName(formName);
              String fileType = multi.getContentType(formName);
              f = multi.getFile(formName);
              FileResults += "<BR>" + formName + "=" + fileName + ": Type= " + fileType + ":
    Size= " + f.length();
         filecounter=filecounter+1;
    Then after composing the mail message I send email with the form fields and file attachments using following code:
    Properties props = new Properties();
    MimeBodyPart mbp1 = new MimeBodyPart();
    MimeBodyPart mbp2 = new MimeBodyPart();
    MimeBodyPart mbp3 = new MimeBodyPart();
    URLDecoder urlDecoder = new URLDecoder();
    String to1 = urlDecoder.decode(toemail);
    String from1 = urlDecoder.decode(fromemail);
    String cc1 = urlDecoder.decode(ccemail);
    props.put( "mail.host", host );
    Session session1 = Session.getDefaultInstance(props, null);
    // Construct the message
    Message msg = new MimeMessage( session1 );
    msg.setFrom( new InternetAddress( from1 ) );
    msg.setRecipients( Message.RecipientType.TO, InternetAddress.parse( to1, false ) );
    msg.setRecipients( Message.RecipientType.CC, InternetAddress.parse( cc1, false ) );
    msg.setSubject( subject );
    msg.setHeader( "X-Mailer", "ExceptionErrorMail" );
    msg.setSentDate( new Date() );
    mbp1.setText(mail_message);
    mbp1.setContent(mail_message, "text/html");
    // Send the email message
    FileDataSource fds = new FileDataSource(uploadDir + fileName);
    FileDataSource fds2 = new FileDataSource(uploadDir + fileName2);
    mbp2.setDataHandler(new DataHandler(fds));
    mbp3.setDataHandler(new DataHandler(fds2));
    mbp2.setFileName(fileName);
    mbp3.setFileName(fileName2);
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    mp.addBodyPart(mbp3);
    msg.setContent(mp);
    Transport.send( msg );
    //email sent...
    //delete the two files from the server..
    File f2 =new File(uploadDir + fileName);
    f2.delete();
    File f3 =new File(uploadDir + fileName2);
    f3.delete();     
    //End of code
    So when I don't attach a file and submit my form , I get the error message that I mentioned in my previous post.
    Any more ideas?

  • Attached libraries not executing on generated forms

    Version 6.0 designer. I am using CG$STARTUP_MODE for form that can be called from a parent form. The OFGNAVL library is attached to the form after it is generated. CGNV$.INITIALISE AND CGNV$.TIDYUP do not execute with error ORA-06508 could not find program unit being called. If designer is not resolving the path for the library haw can this be remedied?

    Hi,
    I have faced such a problem.The solution that i would suggest is to remove all the PLL's attached to your form(FMB) and then attach it once again.Try to run the form and check if it works fine.
    If not please check your registry settings.See if oracle's home path is present in your FORMS60_PATH registry.Check if the specified PLL exists in ur oracle home directory.
    Venkatesh

  • Oracle9iDS Forms Developer JDAPI and XMLTOOLS Javadoc Missing

    Oracle9iDS Forms Developer JDAPI and XMLTOOLS Javadoc ZIP file is missing. When you click on http://otn.oracle.com/documentation/9i_forms.html and scroll down to to Javadoc section, click on zip link moves you to http://otn.oracle.com/documentation/index.html which is wrong. Please take action and fix it!
    Cheers,
    Andrej Zabkar

    Hi Andrej,
    Thankyou for the feedback.
    I have fixed the link, please try once again.
    Regards,
    Les

  • How to use adadmin options to recompile all forms, packages and libraries.

    Dear gurus
    How we can use adadmin, and which options to recompile all forms, packages and libraries.??
    thanks in advance.
    cheers

    Dear Hsawwan
    is the following correct......
    =========================
    Enter your choice [6] : 1
    Generate Applications Files
    1. Generate message files
    2. Generate form files
    3. Generate report files
    4. Generate product JAR files
    5. Return to Main Menu
    Enter your choice [5] : 2
    AD utilities can support a maximum of 999 workers. Your
    current database configuration supports a maximum of 18 workers.
    Oracle recommends that you use between 64 and 128 workers.
    Enter the number of workers [64] :
    Please enter a number between 1 and 18.
    Enter the number of workers [64] : 5
    Your current character set is "AL32UTF8".
    Do you want to generate Oracle Forms objects
    using this character set [Yes] ?
    Do you want to regenerate Oracle Forms PL/SQL library files [Yes] ?
    Do you want to regenerate Oracle Forms menu files [Yes] ?
    Do you want to regenerate Oracle Forms executable files [Yes] ?
    Enter list of products ('all' for all products) [all] :
    ===========

Maybe you are looking for

  • Deployment aborted while deploying a webdynpro application

    Hi SDNers, While deploying a webdynpro application deployment aborted and shown the following error. Aug 8, 2006 4:51:38 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR: [010]Deployment

  • Just got this Laptop and the audio is not working for videos

    My operating system is Windows 8.1 with Bing. I just got this laptop computer for my college work and love it, but my audio does not work when I watch Videos.  The laptop makes a weird tappign noise often. I need my audio to work for my course work o

  • How to implement this in Smartforms

    Hello, I have been given this information for what is wanted in a proforma invoice: Print a field for bankcode. Field name = tempBANKL. Logic: Select BANKS BANKL into tempBANKS tempBANKL from T012 where BUKRS = ls_bil_invoice-HD_ORG-COMP_CODE and HBK

  • HT1689 Settings General Siri was there now it's not?

    The Settings > General > Siri was there to start with but now It's not. The Siri microphone (hold the Home button) no longer works. The Keyboard microphone is no longer there. How do I get Siri working again?

  • Nokia Messaging, 3 Days Hardcoded!!!

    Hi all,  I'm trying to change the 3 days limit in Nokia messaging -> "What to sync" -> "Inbox" -> "Remove older than" option, but I always get: Settings can not be changed! Now, I tried offline mode, and almost every other combinations but with no su