Kff.where returns 'null'  and causes sql error - looking for a work around

Hello,
I am using BI 5.6.3 in EBS (11.5.10.2)
I have created a kff.where as follows:
<lexical
type="oracle.apps.fnd.flex.kff.where"
name="lp_location_where_clause"
comment="Comment"
application_short_name="OFA"
id_flex_code="LOC#"
id_flex_num=":lp_location_flex_structure"
code_combination_table_alias="loc"
segments="ALL"
operator="BETWEEN"
operand1=":p_location_low"
operand2=":p_location_high"/>
</lexicals>
Everything works fine, as long as I have a values for the p_location_low and p_location_high. However, this is a parameter that comes in from a concurrent program and is optional. When the user doesn't pick a value, :p_location_low is the concatenated delimiters for the location '..'.
When this runs, the kff.where is returning null which causes 'Invalid Relational Operation error' because 'AND null' is not valid.
Warning in the log is :[091910_025232517][][STATEMENT] !!Warning: FlexAPI returns null for 'x_where_expression' lexical definition...
Does anyone have a workaround for this since making the parameter required is not an option for my users?
Thanks for reading.

In your SQL*Plus session, make sure you
SQL> set define offbefore trying to create the Java stored procedure. SQL*Plus assumes that any string that begins with an & is a substitution variable unless you tell it that you have no substitution variables (via set define off).
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • HelpSet.findHelpSet() returns null, and trapping ID errors

    I was having a problem initializing JavaHelp. HelpSet.findHelpSet() was returning null. I searched the forum, and found it was a common problem, but the answers were unhelpful. The answers pointed to a problem with CLASSPATH, but offered little in the way of advice for a newbie like myself on how to deal with it.
    A second issue concerns HelpBroker.enableHelpOnButton(). If you feed it a bogus ID, it throws an exception, and there's no way to trap it and fail gracefully. JHUG doesn't provide much in the way of alternatives.
    Now, having done a bit of research and testing, I'm willing to share a cookbook formula for what worked for me.
    I'm working in a project directory that contains MyApp.jar and the Help subdirectory, including Help/Help.hs. My first step is to copy jh.jar to the project directory.
    Next, in the manifest file used to generate MyApp.jar, I add the line:
        Class-Path: jh.jar Help/I'm working with Eclipse, so in Eclipse, I use Project - Properties - Java Build Path - Libraries to add JAR file jh.jar, and Class Folder Tony/Help
    I define the following convenience class:
    public class HelpAction extends AbstractAction
        private static HelpBroker helpBroker = null;
        private String label = null;
        public HelpAction( String name, String label )
            super( name );
            this.label = label;
        public void actionPerformed( ActionEvent event )
            displayHelp( label );
        public static boolean displayHelp( String label )
            if ( helpBroker == null )
                Utils.reportError( "Help package not initialized!" );
                return false;
            try
                helpBroker.setCurrentID( label );
                helpBroker.setDisplayed( true );
                return true;
            catch ( Exception e )
                Utils.reportError( e, "Help for " + label + " not found" );
                return false;
        public static boolean initialize( String hsName )
            URL hsURL = HelpSet.findHelpSet( null, hsName );
            if ( hsURL == null )
                Utils.reportError( "Can't find helpset " + hsName );
                return false;
            try
                HelpSet helpSet = new HelpSet( null, hsURL );
                helpBroker = helpSet.createHelpBroker();
            catch ( HelpSetException e )
                Utils.reportError( e, "Can't open helpset " + hsName );
                return false;
            return true;
    }If you use this class in your own code, you'll want to replace Utils.reportError() with something of your own devising.
    Finally, in my GUI class, I use the following:
        JPanel panel = ...
        JMenu menu = ...
        JToolbar toolbar = ...
        HelpAction.initialize( "Help.hs" )
        Action gsAction = new HelpAction( "Getting Started Guide", "gs.top" );
        menu.add( gsAction );
        JButton helpButton = new HelpAction( "Help", "man.top" );
        toolbar.add( helpButton );
        InputMap imap = panel.getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
        imap.put( KeyStroke.getKeyStroke( "F1" ), "F1help" );
        ActionMap amap = panel.getActionMap();
        amap.put( "F1help", new HelpAction( null, "man.top" ) );

    Sorry, the sixth-from-last line of my example should read,
        JButton helpButton = new JButton( new HelpAction( "Help", "man.top" ) );

  • Apostrophes returned from getText() causing SQL errors

    I have a seemingly elementary problem, but I can't seem to come up with a simple solution. Look at the following line of code:
    s.execute("insert into Requests values ('"+field5.getText().trim()+"','"+tempTime+"','"+tempTime+":  PROBLEM OPENED\n\n"+tempTime+":  "+area.getText()+"','','Open');");I am using this to add a record to my SQL table. However, whenever there is an apostrophe (') read from the area.getText(), that causes the SQL statement to be improperly executed. I understand why it's causing a problem, but I was wondering if there was a simple solution for it. Or is my only recourse to have my application check every single character in the JTextArea area for apostrophes and insert backslashes before the SQL statement is executed? Thanks for the help!

    Well I decided to go with the PreparedStatement route, but I still seem to be having the same problem. Here is my code now:
         private static PreparedStatement s;
         private static Connection con;
         private String tempTime;
         try
                      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                      String dataSourceName = "Mail_List";
                      String dbURL = "jdbc:odbc:" + dataSourceName;
                      con = DriverManager.getConnection(dbURL,"","");
                   Calendar cal = Calendar.getInstance();
                   tempTime = cal.getTime().toString().trim();
                   String query = "INSERT INTO Requests VALUES ('?','?','?','','Open')";
                   s = con.prepareStatement(query);
                   s.setString(1, field5.getText().trim());
                   s.setString(2, tempTime);
                   s.setString(3, tempTime+":  PROBLEM OPENED\n\n"+tempTime+":  "+area.getText());
                   s.executeQuery();
                   s.close();
                   con.close();
              }Do you guys see anything wrong?

  • Every time i try to start itunes it trys to backup my ipad and says an error stopped the program working and closes down??

    Every time i try to start itunes it trys to backup my ipad and says an error stopped the program working and closes down??

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • Sometimes get error "looking for something on MobileMe?" after publishing via ftp server

    I published a website I created on iWeb via an ftp server.  Sometimes it works, but sometimes I get the error "Looking for something on MobileMe?"  My web host says all my settings are correct, so the problem is likely to be in iWeb.  How can I fix this?

    I use FatCow as both my domain registrar and my web host, a similar service to GoDaddy.  The FatCow tech support said all my settings were correct.  Here's a pic of the iWeb Site Publishing Settings page:
    When I try "Test Connection," it succeeds.
    I originally published using MobileMe, then switched to ftp using FatCow.  The ftp publishing worked at first, then I started getting the error message intermittently, now get it all the time.  The FatCow tech thought that something is likely to be imbedded in the code that is taking it to MobileMe.
    Thanks again for your help!

  • Error R32762: # Error: Error looking for resource specification.  Need 'resource' or 'type'

    I have succesfully ported some of my developments to CS5. I have used the following procedure:
    - create new project by using dollyX
    - add source code
    - fix the errors
    But now I have encountered an error I can't figure out.
    Error 1 error R32762: # Error: Error looking for resource specification.  Need 'resource' or 'type'. C:\Program Files\Adobe\CS5\InDesign Product SDK\source\public\interfaces\architecture\IPMUnknown.h 47
    Any suggestions?
    Im running a windows7 machine, visual studio 2008

    Pectora:
       First of all, I'm assuming that you are receiving this error on a Win box.  If on a Mac, then your problems may stem from something else altogether.
       It's a bit complex to cover in an email.  My recommendation is that you open up a couple of the sample plugins and look at them.  Pay close attention to the Properties page of the project.  Look at the Resources field and command line, and also pay attention to the Pre-Link and Post-build fields.  Once they are looking right, highlight your .FR file and click the Properties icon.  Be sure that all four lines have something in them. Model their input after what you see in the sample plugins.
       Finally, are you getting this error when the ODFRC compiler is running, or when the project is getting linked?  The former could indicate a problem with your .FR file, the latter is more likely to be solved by my first suggestion.
    R,
    John

  • How do i find a recent backup from on icloud. i don't want to restore on my iphone, just view on my Pc and keep as file. looking for pics and video i recorded thanks

    How do i find a recent backup from on icloud. i don't want to restore on my iphone, just view on my Pc and keep as file. looking for pics and video i recorded thanks

    The password is set on the WiFi router providing the service, by the owner of the network to prevent unwanted "guests" accessing the network.  The only way to know it is to ask the owner permission to use the network.  Otherwise, you  have to find a free WiFi hotspot that doesn't require a password.

  • When I try to open a file I created in Pages, I get this: "The required index.xml file is missing."  This has happened many times and I have forgotten how I've worked around it.

    When I try to open a file I created in Pages, I get this: "The required index.xml file is missing."
    This has happened many times and I have forgotten how I've worked around it.

    That is wrong advice and you appear to have repeated it all over the forum.
    All Pages files no matter what version have the same file extension, .pages, despite being radically different formats and that is the problem. The System does not distinguish between them when you double click on the file, it opens the first version of Pages it encounters.
    You need to right click on the file and choose the correct App version for the file. Unfortunately there are no clues to tell you which is which.
    If you are unhappy with this and the removal of over 100 features plus the problems with transmitting files across devices, servers and different versions of OS X, rate/review Pages 5.5.2 in the App Store.
    Peter

  • I am looking for software to store photos with.  I am not a fancy photographer, and really am just looking for the digital version of a photo album. iPhoto is not cutting it, mainly because it does not back up and restore easily on an external HD.

    I am looking for software to store photos with.  I am not a fancy photographer, and really am just looking for the digital version of a photo album. iPhoto is not cutting it, mainly because it does not back up and restore easily on an external HD.

    That's how Time Machine and iPhoto now work.  Restore the library to one of the external HDs, check it for the photos you want, export them to the boot drive and delete the restored library.
    If you know the file name of the photo you're looking for you can search for them in the TM backup using Find Any File.
    My workflow allows me to do that:
    1 - upload new photos to a folder on the Desktop.
    2 - name the folder to represent the contents and date: 01/03/10-Toads Bday
    3 - use a file renaming app to sequentially rename the photos in the folder to: 2010-01-03-Toads Bday-001.JPG,  -002,JPG, -003.JPG,  etc.
    4 - import the folder into iPhoto creating an Event with the same title as the folder.
    Now I can search for those file by file name with any app of my choosing.

  • When we starting IR and ID, it will look for java web start platform? why?

    When we starting IR and ID, it will look for java web start platform? why?

    hi praveen,
    Java web start is platform to launch the java application.
    All the file from the central server are copied to the local machine
    check the below blog
    Java Web Start                                   
    Have some more Fun.......                         
    regards
    kummari

  • I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    Whether or not you are able to recover the data off the drive yourself will depend on if the drive suffered any impact damage in the crash. You can buy USB SATA or IDE adapters (Intel and almost all G5 use SATA) that will let you connect your hard drive to a computer (like a flash drive) to see if you can recover the data. If the drive has suffered physical damage if may not mount.
    If you know someone who has one of these adapters you could try using theirs, otherwise you could buy one but you take the risk of the data on the drive being non recoverable. Regardless, both are much cheaper than $1699!
    (Alternatively, if you know of someone with a Mac Pro or PowerMac G5 they may be able to install the drive in their machine and try to boot from or mount it and copy the data off.)

  • Backed Up Iphone to itunes and when restoring its looking for a password to restore! None requested or set at original backup. Can anyone help?

    Backed Up Iphone to itunes and when restoring its looking for a password to restore! None requested or set at original backup. Can anyone help?

    I have not restored device so have all my data on it still. Am not pluggin it in for first time, did this originally when setting up phone. I have an option to restore to original backup as well as 'set up as new'. What happens if I chose the 'restore from backup' option.' how do I go about backing it up first - if i right click 'iphone'' option on left hand side under devices the only option is'eject' or 'restore'. I'm not sure that my iphone is being recognised by itunes - should it not give the name of my iphone under devices? 

  • What application does an iMac come with that lets you see the core of its system, and what would you look for to determine if malware was on it?

    What application does an iMac come with that lets you see the core of its system, and what would you look for to determine if malware was on it?

    This extension?
    *FireBug: https://addons.mozilla.org/firefox/addon/firebug/
    Firefox 4 also has a build in inspector: Firefox > Web Developer > Inspect

  • NULL and dynamic SQL

    If table testrh2 has the following columns and data
    col1 --> NULL
    col2 --> 2
    and table testrh has the following columsn and data
    col1 --> NULL
    How could I write a dynamic SQL statement to join on the nulls? I've written the following block as a starting point.
    declare
    cursor c1 is select col1 from isis.testrh;
    lval varchar2(1000);
    lval2 varchar2(1000);
    begin
    for r1 in c1 loop
    lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
    execute immediate lval into lval2;
    dbms_output.put_line(lval2);
    end loop;
    end;

    You can't compare null values with '=' in Oracle SQL.
    Null can only be compared with <column> is null .
    You can see it when you try these two queries:
    select * from dual where null is null;  -- you will see one row
    select * from dual where null=null;  -- you will see no rowsThat's why you have to write something like
    (<column1>=<column1>   or   (<column1> is null and <column2> is null))This should also work with null:
    decode(<column1>,<column2>,1,0)=1By the way, why do you use dynamic sql?
    lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
    I think you could replace your two lines ( lval:= ... AND execute immediate) by this:
    begin
      select col2
      into lval
      from isis.testrh2
      where decode(col1,r1.col1,1,0)=1;
      dbms_output.put_line('lval='||lval);
    exception
    when no_data_found then
      dbms_output.put_line('no data found'); -- or whatever you want
    end;Edited by: hartmutm on 02.10.2010 23:54

  • ObjectInputStream() returning null and EOFException - need help

    I have been working on this little snippet of code all day and I cannot understand why I get null values when I run a display application. The code is posted below for 3 file. PhoneList.java is for serialization. CreatePhoneList is to populate a saved file with phone numbers and names of contacts. DisplaySavedPhoneList.java is to display the saved names and numbers. I'm not looking for the correct code, put for someone to point me in the right direction on why I'm getting these results so I can find a solution.
    Here is the PhoneList class:
    import java.io.*;
    public class PhoneList implements Serializable
        private String name;
        private String num;
        private String phName;
        private String phNum;
        PhoneList(String phNum, String phName)
            setName(phName);
            setNum(phNum);
        public String getName()
            return phName;
        public String getNum()
            return phNum;
        public void setName(String phName)
            name = phName;
        public void setNum(String phNum)
            num = phNum;
    }Here is the CreatePhoneList class
    import java.io.*;
    import java.util.*;
    public class CreatePhoneList
        public static void main(String[] args) throws IOException
            ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream("PhoneList.txt"));
            PhoneList list;
            String phName;
            String phNum;
            final String QUIT = "QUIT";
            Scanner in = new Scanner(System.in);
            System.out.println("Enter a phone number or " + QUIT + " to quit.");
            phNum = in.next();
            while(!phNum.equals(QUIT))
                System.out.println("Enter the contact name.");
                phName = in.next();
                list = new PhoneList(phNum, phName);
                output.writeObject(list);
                System.out.println("Enter a phone number or " + QUIT + " to quit.");
                phNum = in.next();
            output.close();
    }and this is the DisplaySavedPhoneList class:
    import java.io.*;
    import java.util.*;
    public class DisplaySavedPhoneList
        public static void main(String[] args) throws IOException, ClassNotFoundException
            ObjectInputStream input = new ObjectInputStream(new FileInputStream("PhoneList.txt"));
            PhoneList list;
            final int SHOW = 1;
            int showList;
            int count = 0;
            Scanner in = new Scanner(System.in);
            try
                System.out.print("To display Phone List enter " + SHOW);
                showList = in.nextInt();
                while(showList == SHOW)
                    list = (PhoneList)input.readObject();
                    System.out.println("Name: " + list.getName() + " Phone Number: " + list.getNum());
                    count++;
            catch(EOFException e)
                System.out.println("Oops, something broke!");
                input.close();
    }This is the result from running the DisplaySavedPhoneList application:
    To display Phone List enter 1
    1
    Name: null Phone Number: null
    Name: null Phone Number: null
    Oops, something broke!

    ok, I did that, and its pointing me to the line commented below. I did a practical exercise where the code was almost identical and it worked fine. The only difference are the variables.
    try
                System.out.print("To display Phone List enter " + SHOW);
                showList = in.nextInt();
                while(showList == SHOW)
                    list = (PhoneList)input.readObject(); //this is the line that was identified in the stacktrace
                    System.out.println("Name: " + list.getName() + " Phone Number: " + list.getNum());
                    count++;
            catch(EOFException e)
                System.out.println("Stack Trace");
                e.printStackTrace();
                input.close();
            }here is the total stack trace, in case you were wondering...
    To display Phone List enter 1
    1
    Name: null Phone Number: null
    java.io.EOFException
    Name: null Phone Number: null
    Stack Trace
            at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
            at DisplaySavedPhoneList.main(DisplaySavedPhoneList.java:21)I'm still not quite sure what this is telling me though.

Maybe you are looking for