Still null . Uuuuh

Hello!
The following program gives null for Integer.getInteger(System property name) but on the other hand System.getProperty("os.name") (say) is giving the correct result. . Why null for Integer.getInteger(spn) instead of an Integer object.
import java.util.Properties ;
class IntegerMethods {
public static void main(String args[]) {
  int  n1 = -1 , n2 = 500 ;  //Change and Check equivalent conversions.
  int ir = 8  ;              //ir = integer radix
  Integer  i1 = new Integer(n1);                
  Integer  i2 = new Integer(n2);
  Integer  is = new Integer("200");
  String sg = new String("10000000");   //Decode range -2147683648  ---   2147483647
  //Properties p = new Properties();
  System.out.println("Integer i1 = " + i1 + " i2 = "+i2+" Radix = "+ir+" radix can be set to values other than 2,8,10,16");
  System.out.println("Integer                            Integer.MIN_VALUE : " + Integer.MIN_VALUE);
  System.out.println("Integer                            Integer.MAX_VALUE : " + Integer.MAX_VALUE);
  System.out.println("Integer                                  i.hashCode(): " + i2.hashCode());
  System.out.println("Integer                            byte i.byteValue(): " + i1.byteValue());
  System.out.println("Integer                              int i.intValue(): " + i1.intValue());
  System.out.println("Integer                          short i.shortValue(): " + i1.shortValue());
  System.out.println("Integer                            long i.longValue(): " + i1.longValue());
  System.out.println("Integer                          float i.floatValue(): " + i1.floatValue());
  System.out.println("Integer                        double i.doubleValue(): " + i1.doubleValue());
  System.out.println("Integer                         boolean I1.equals(I2): " + i1.equals(i2));
  System.out.println("Integer                          int I1.compareTo(I2): " + i1.compareTo(i2));
  try {
  System.out.println("Integer                           int I1.compareTo(O): " + i1.compareTo(i2));
  System.out.println("Integer                      static Integer decode(s): " + Integer.decode(sg));    //Decodable Strings :See JDK1.4 Help
  System.out.println("Integer                        static int parseInt(s): " + Integer.parseInt(sg));
  System.out.println("Integer                      static int parseInt(s,"+ir+"): " + Integer.parseInt(sg,ir));
  System.out.println("Integer                     static Integer valueOf(s): " + Integer.valueOf(sg));
  System.out.println("Integer                   static Integer valueOf(s,"+ir+"): " + Integer.valueOf(sg,ir)); 
  }catch(ClassCastException e) {
   System.out.println("Exception Condition:" + e);
  }catch(NumberFormatException e) {
   System.out.println("Exception Condition:" + e);
  System.out.println("Integer                           String I.toString(): " + i1.toString());
  System.out.println("Integer                 static String I.toString("+ n2 + "): " + Integer.toString(n2));
  System.out.println("Integer               static String I.toString("+n2+","+ir+"): " + Integer.toString(n2,ir));
  System.out.println("Integer             static String toBinaryString("+ n2 + "): " + Integer.toBinaryString(n2));
  System.out.println("Integer              static String toOctalString("+ n2 + "): " + Integer.toOctalString(n2));
  System.out.println("Integer                static String toHexString("+ n2 + "): " + Integer.toHexString(n2));
  System.out.println("Integer        static Integer getInteger(Sys propName): " + Integer.getInteger("os.version"));
  System.out.println("Integer      static Integer getInteger(Sys propName,i): " + Integer.getInteger("os.version",n1));
  System.out.println("Integer      static Integer getInteger(Sys propName,I): " + Integer.getInteger("os.version",i1));
  System.out.println("Integer static Integer getInteger(sun.arch.data.model): " + Integer.getInteger("sun.arch.data.model"));
  System.out.println("Integer             static Integer getInteger(os.arch): " + Integer.getInteger("os.arch"));
  System.out.println("Integer             static Integer getInteger(os.name): " + Integer.getInteger("os.name"));  
  System.out.println("Integer          static Integer getInteger(os.version): " + Integer.getInteger("os.version"));
  System.out.println("Integer            static Integer getInteger(user.dir): " + Integer.getInteger("user.dir")); 
  System.out.println("Integer           static Integer getInteger(user.home): " + Integer.getInteger("user.home"));
  System.out.println("Integer           static Integer getInteger(user.name): " + Integer.getInteger("user.name"));  
  System.out.println("Integer           static Integer getInteger(java.home): " + Integer.getInteger("java.home")); 
  System.out.println("Integer         static Integer getInteger(java.vendor): " + Integer.getInteger("java.vendor"));
  System.out.println("Integer      static Integer getInteger(file.separator): " + Integer.getInteger("file.separator"));
  System.out.println("Integer      static Integer getInteger(path.separator): " + Integer.getInteger("path.separator"));
  System.out.println("Integer      static Integer getInteger(line.separator): " + Integer.getInteger("line.separator"));
  System.out.println("System         static Integer.getInteger(java.vm.name): " + Integer.getInteger("java.vm.name"));
  System.out.println("Integer     static Integer getInteger(java.vendor.url): " + Integer.getInteger("java.vendor.url"));
  System.out.println("Integer     static Integer getInteger(java.class.path): " + Integer.getInteger("java.class.path"));
  System.out.println("Integer  static Integer getInteger(java.class.version): " + Integer.getInteger("java.class.version"));
  System.out.println("System                     System.getProperty(os.name): " + System.getProperty("os.name"));
  System.out.println("System                     System.getProperty(os.arch): " + System.getProperty("os.arch"));
  System.out.println("System                  System.getProperty(os.version): " + System.getProperty("os.version"));
  System.out.println("System                   System.getProperty(user.name): " + System.getProperty("user.name"));
  System.out.println("System                    System.getProperty(user.dir): " + System.getProperty("user.dir"));
  System.out.println("System                   System.getProperty(user.home): " + System.getProperty("user.home"));
  System.out.println("System             System.getProperty(java.class.path): " + System.getProperty("java.class.path"));
  System.out.println("System          System.getProperty(java.class.version): " + System.getProperty("java.class.version"));
  System.out.println("System                   System.getProperty(java.home): " + System.getProperty("java.home"));
  System.out.println("System                System.getProperty(java.vm.name): " + System.getProperty("java.vm.name"));
  System.out.println("System              System.getProperty(java.vm.vendor): " + System.getProperty("java.vm.vendor"));
  System.out.println("System                 System.getProperty(java.vendor): " + System.getProperty("java.vendor"));
  System.out.println("System             System.getProperty(java.vendor.url): " + System.getProperty("java.vendor.url"));
  System.out.println("System                  System.setProperty(os.name,XP): " + System.setProperty("os.name","Windows XP"));
  System.out.println("System                     System.getProperty(os.name): " + System.getProperty("os.name"));
}

Thanks for reply to all of you.
See the first line , giving an Integer value 32 for "sun.arch.data.model". Similarly I expect to get an Integer value for the rest of the properties that can easily be
checked through
System.getProperty(property name) ;
class GetInteger {
public static void main(String args[]) {
  System.out.println("Integer static Integer getInteger(sun.arch.data.model): " + Integer.getInteger("sun.arch.data.model"));
  System.out.println("Integer             static Integer getInteger(os.arch): " + Integer.getInteger("os.arch"));
  System.out.println("System                     System.getProperty(os.arch): " + System.getProperty("os.arch"));
  System.out.println("Integer             static Integer getInteger(os.name): " + Integer.getInteger("os.name"));
  System.out.println("System                     System.getProperty(os.name): " + System.getProperty("os.name"));
  System.out.println("Integer          static Integer getInteger(os.version): " + Integer.getInteger("os.version"));
  System.out.println("System                  System.getProperty(os.version): " + System.getProperty("os.version"));
  System.out.println("Integer           static Integer getInteger(java.home): " + Integer.getInteger("java.home")); 
  System.out.println("System                   System.getProperty(java.home): " + System.getProperty("java.home"));
}

Similar Messages

  • Receiving null and [Receiving text] SMS

    Hi,
    Strange things on some SMS: I receive one correctly but a the end there is the text "[Receiving text]"
    Then I receive a second SMS only containing null
    Why is that ?
    Thanks.

    You coded:
    if (line == null)
    eof = true;
    else
    do something else;
    // then, regardless of the above,
    st1 = new StringTokenizer(line,","); // line is still null here
    So there's the problem.

  • Receiving null pointer exception

    Created the following program to read and output a file:
    import java.io.*;
    import java.util.StringTokenizer;
    public class ReadSource {
    public static void main(String[] arguments) {
         StringTokenizer st1;
         try {
              FileReader file = new
                        FileReader("C:/upload/DS121002.csv");
                        BufferedReader buff = new BufferedReader(file);
                        boolean eof = false;
                        while (!eof) {
                        String line = buff.readLine();
                             if (line == null)
                             eof = true;
                             else
                             System.out.println(line);
                                  st1 = new StringTokenizer(line,",");
                                  System.out.println("Token 1: " + st1.nextToken());
                                  System.out.println("Token 2: " + st1.nextToken());
                        buff.close();
              } catch (IOException e) {
              System.out.println("Error -- " + e.toString());
    I am receiving the following error message when the program completes:
    Exception in thread "main" java.lang.NullPointerException
    at java.util.StringTokenizer.<init>(StringTokenizer.java:122)
    at java.util.StringTokenizer.<init>(StringTokenizer.java:138)
    at ReadSource.main(ReadSource.java:18)
    What do I need to change to prevent this error?

    You coded:
    if (line == null)
    eof = true;
    else
    do something else;
    // then, regardless of the above,
    st1 = new StringTokenizer(line,","); // line is still null here
    So there's the problem.

  • Method returns null in main

    i have a class and a main inside the main
    i call the method getProperties.
    but why is this still null???
    System.out.println(odprops);
    can someone suggest what i am doing wrong?
    thanks in advance
    annie
    public class Launcher
         private static Properties odprops;
         public static void main(String args[])throws IOException, FileNotFoundException, Exception
              getProperties(odprops);
              System.out.println(odprops); //how come this is null
         public static Properties getProperties(Properties props) throws IOException
              FileInputStream fi = new FileInputStream("Loader.properties");
              Properties odprops = new Properties();
              odprops.load(fi);
              System.out.println(odprops);     //this is not null - it shows me my properties     
              return odprops;
    }

    public static void main(String args[])throws
    s IOException, FileNotFoundException, Exception
              getProperties(odprops);change to
    odprops = getProperties(null);

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table?

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks in advance...
    Best Regards,
    R.Devarasu

    Hi Amith,
    I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
    Measure colmns is : Nom_SGD
    IFNULL(Nom_SGD,0.00)
    Movment : dynamic date calc by using $2-$1 oracle formula's
    Actually i am doing below things only,
    31/12/2011 31/03/2011 Movment
    Country
    India 100 -50 -150
    Singapore 200 200
    UK 1200 -1200
    USA 0.00 0.00 0.00 (here changed null as 0)
    Helpmeon this...

  • Stored procedure call returns null result set when using temp table in sp!

    Here's a really odd problem...
    SQL Server stored procedure called sp_Test takes 1 input INT. Here is the code I call it with
    cStmt = connection.prepareCall("{call sp_Test(?)}");
    cStmt.setInt(1, 44);
    cStmt.execute();
    rs = cStmt.getResultSet();When the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      SELECT node_id FROM tbl_NavTree
    END
    GOthe query works and I get all node_id back in rs
    BUT when the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      CREATE TABLE #Descendants(
        descendant_id INT
      SELECT node_id FROM tbl_NavTree
      DROP TABLE #Descendants
    END
    GOThe rs comes back as NULL. Really really weird if you ask me. I also tried removing the DROP TABLE line just in case the SELECT had to be the last statement but still NULL.
    Final note is that BOTH the above stored proc bodies work when executed within SQL Server query analyser.
    Must be JDBC .. what can it be!??

    DROP TABLE #DescendantsMS SQL Server - right?
    Then don't drop the table.
    From the MS docs for "create table"
    Local temporary tables are visible only in the current session;
    A local temporary table created in a stored procedure is dropped automatically when the stored procedure completes. The table can be referenced by any nested stored procedures executed by the stored procedure that created the table. The table cannot be referenced by the process which called the stored procedure that created the table.

  • Q: NULL return REF CURSOR from a PL/SQL function

    I was told that PL/SQL does not handle properly NULL REF CURSORS.
    Here's my implementation in a PL/SQL package
    PACKAGE SPEC:
    TYPE z_rec IS RECORD (
    TYPE z_cur IS REF CUR RETURN z_rec;
    FUNCTION some_function(
    p_msg OUT VARCHAR2)
    RETURN z_cur;
    PACKAGE BODY:
    FUNCTION some_function(
    p_msg OUT VARCHAR2)
    RETURN z_cur
    IS
    retval z_cur;
    OPEN retval FOR
    SELECT ...
    -- Successfull data retrieval
    p_msg := NULL;
    RETURN retval;
    EXCEPTION
    WHEN OTHERS THEN
    p_msg := SUBSTR( SQLERRM, 1, 255 );
    RETURN NULL;
    END some_function;
    I am expecting that a user of this function would call it and test p_msg (output parameter)
    1. IS NULL p_msg it means there were no errors encounetered. The returned cursor can be NULL though (i.e. no records retrieved)
    2. IS NOT NULL p_msg, it means that there were errors and the returned cursor is not usable.
    My question is:
    what are the pitfalls of this approach?
    Thanks a lot.

    user10817976 wrote:
    I asked and still waiting for the answer.
    retval z_cur;
    What I am afraid for is that
    OPEN retval FOR
    SELECT ...
    EXCEPTION
    retval := NULL;
    tries to open the cursor. What happens in case of error? Well, I imagine retval is still NULL. Do I need to (try) to close the cursor in the EXCEPTION section (in order not to misuse the number of cursors in the pool?) That's my worry.No.
    If there is an error opening the cursor the cursor will not be open and will not need closing.
    The code should simply be
    function some_function
        return z_cur
    is
        retval z_cur;
    begin
        open retval for
            select ...
        return retval;
    end some_function;        It is bad practice for a function to have output parameters.
    It is bad practice to turn exceptions into return codes.
    http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html
    Remember everyone, everyone remember, keep in mind:
    When others not followed by RAISE or RAISE_APPLICATION_ERROR is almost certainly, with 99.999999999% degree of accuracy, a bug in your developed code. Just say "no" to when others not followed by raise or raise_application_error!Read the links, it leads to problems over and over again.

  • GetCurrentRow() giving a null when trying to save poplist value

    Hi
    I have a requirement to develop a custom page with a field XX - which is a poplist.
    The functionality should be as follows:
    1. When the page renders the poplist should highlight the latest value from the person's uses_tobacco_flag from per_all_people_f.
    2. The poplist should show the other values available also.
    3. when a change is made and clicked on next button, the changed value if any should be saved in DB and get this value from the DB next time when the page renders.
    all the above steps work for someone who has already a value in the table for uses_tobacco_flag. suppose a user A has value as PIPE. The page rendering will bring this value adn any change made will be saved to DB.
    However for user B, if he has null value for uses_tobacco_flag in the DB, then the page renders as such, But when I select a new value and try to insert it in the database via API it gives me getCurrentRow null pointer exception.
    I am pasting the CO.java and AMImpl.java code below. am always getting DffRow as null
    Please help.
    **CO.java**
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    int empid = pageContext.getEmployeeId();//get the person id from the page context
    Integer pers_id = new Integer (empid);
    String personid = pers_id.toString();
    Serializable[] parameters = { personid };
    //am.invokeMethod("initDetails", parameters);//pass the parameter to the AM initDetails method to call initQuery of VO
    am.invokeMethod("init", parameters); //initializes VO
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if ("benenrollpage".equals(pageContext.getParameter(EVENT_PARAM)) || "persinfopage".equals(pageContext.getParameter(EVENT_PARAM)))
    OAApplicationModule xam = pageContext.getApplicationModule(webBean);
    OAViewObjectImpl DffVO = (OAViewObjectImpl)xam.findViewObject("XXOMPeopleVO1");
    OAViewRowImpl DffRow = (OAViewRowImpl)DffVO.getCurrentRow();
    if (DffRow == null)
    //pageContext.putDialogMessage(new OAException("BEN", "XXOM_BEN_TOBACCO_USAGE", null, OAException.ERROR, null));
         //throw new OAException("The DffRow is null");
         throw new OAException("The DffRow is still null");
         /*else if (((String)DffVO.getCurrentRow().getAttribute("UsesTobaccoFlag") == null)||((String)DffVO.getCurrentRow().getAttribute("UsesTobaccoFlag") == "")||(((String)DffVO.getCurrentRow().getAttribute("UsesTobaccoFlag")).length() == 0))
              throw new OAException("Please enter the tobacco usage 2");
         else
    String tobusage = (String)DffRow.getAttribute("UsesTobaccoFlag");
    // pageContext.putDialogMessage(new OAException("This is tob" + " * " + tobusage));
    int p_person_id = pageContext.getEmployeeId();
    /*if (tobusage == null)
    pageContext.putDialogMessage(new OAException("BEN", "XXOM_BEN_TOBACCO_USAGE", null, OAException.ERROR, null));
    else
              String tobusechkq = "BEGIN XXOM_BEN_UPD_TOBACCO_USAGE.XXOM_UPDATE_TOBACCO_USAGE(:1,:2);EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-6501,'error 3');END;";
              OADBTransactionImpl oadbtrans = (OADBTransactionImpl)xam.getOADBTransaction();
              OracleCallableStatement oacallstmt = (OracleCallableStatement)oadbtrans.createCallableStatement(tobusechkq, 1);
              try
                   oacallstmt.setInt(1, p_person_id);
                   oacallstmt.setString(2, tobusage);
                   oacallstmt.execute();
                   xam.invokeMethod("apply"); // call the transaction.commit from AM
              catch (Exception e)
                   throw OAException.wrapperException(e);
              finally
                   if(oacallstmt != null)
                   try
                        oacallstmt.close();
                   catch(Exception exception2)
                        throw OAException.wrapperException(exception2);
                   if ("benenrollpage".equals(pageContext.getParameter(EVENT_PARAM)))
                        pageContext.setForwardURL("OA.jsp?akRegionCode=BEN_EFFECTIVE_DATE_PAGE&akRegionApplicationId=805",
                                                      null,
                                                      OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                      null,
                                                      null,
                                                      false, // Retain AM
                                                      OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
                                                      OAWebBeanConstants.IGNORE_MESSAGES);
                   else if ("persinfopage".equals(pageContext.getParameter(EVENT_PARAM)))
                        pageContext.setForwardURL("OA.jsp?akRegionCode=HR_CREATE_PROCESS_TOP_SS&akRegionApplicationId=800&OAFunc=HR_PERINFO_SS",
                                                      null,
                                                      OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                      null,
                                                      null,
                                                      false, // Retain AM
                                                      OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
                                                      OAWebBeanConstants.IGNORE_MESSAGES);
              }//else
    } //main if
    }//processFormRequest
    }//main class
    ==================================================================
    AMImpl.java
    public void initDetails(String personid)
    XXOMPeopleVOImpl vo = getXXOMPeopleVO1();
    if (vo == null)
    MessageToken[] errTokens = { new MessageToken("OBJECT_NAME", "XXOMPeopleVO1")};
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
    vo.initQuery(personid);
    public void init(String personid)
         OAViewObject vo = (OAViewObject)getXXOMPeopleVO1();
    // Per the coding standards, this is the proper way to initialize a
    // VO that is used for both inserts and queries. See View Objects
    // in Detail in the Developer's Guide for additional information.
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(Row.STATUS_INITIALIZED);
    initDetails(personid);
    }

    Seems you are saving data using API (not using EO), so remove/comment the below code lines(which are required when you want to insert data)
    Row row = vo.createRow();
    vo.insertRow(row);
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(Row.STATUS_INITIALIZED);-Anand

  • Module - adding to display list, container null?

    So I'm working on a module inside one of our applications and when the module is loaded it is passed a VO.  I have found that I need to fire all of my other logic for the nested classes inside this module on the Set method of this VO because if I wait for the creationComplete, the nested logic in the other classes never gets executed.  The only problem is, when I fire off all of my logic on the Set, it all gets executed but when it goes to draw these components and add them to the display list, the container they're being added to is still null, I assume because it hasn't been created yet.  I also tried to add my components in the MXML and just bind their data value to the VO, but even when I do that, the inner logic never gets executed, I assume for the same reason.
    Has anyone else had this issue before or have any ideas on a way to solve this issue?  It almost feels like waiting for CreationComplete is too late, yet the Set method is too early.
    Thanks,
    BK

    Not sure I understand.  You can hook other lifecycle methods in the module
    like commitProperties.  That's where we recommend custom components resolve
    new properties.

  • Buttons null; losing stage instance names

    Hello, I apologize if this question has already been asked but as the title states I'm having problems with the instance names of my buttons. I am using Actionscript 3 with Flash CS5. I apologize in advance for being verbose but it'd be best if I explained my problem in detail.
    I have my project set up so that everything occurs in one MovieClip and buttons within the MovieClip are clicked to navigate through the MovieClip. The MovieClip contains several frames which are all unique and contain a variety of textboxes, MovieClips, buttons, classes and other custom classes. All of these components are created directly in Flash Professional by dragging them from the library onto the stage inside of the MovieClip.
    I then name these components using Flash Professional and use these instance names to work with the components. Usually this works without a problem. However, now that I am using a nested MovieClip for my project many problems are occuring. I have it so that when buttons are clicked, the MovieClip goes to a certain frame via the gotoAndStop(x); command. This works fine but I am having problems accessing the buttons that I have named earlier. It gives a null object reference error and when I trace the button it traces as "null".
    Originally I thought that this problem was because the MovieClip had not yet initialized but I had used the ADDED and RENDER event listeners, Timeline scripting, and other methods but the button was still null, leading me to believe that the problem was more than that.
    So I used a click event listener that traced the instance names of the components that I was clicking (trace(e.target.name)). I have a total of 8 buttons on the specific frame of my MovieClip so I clicked on them all. 6/8 of the buttons traced the correct instance name that I had given them whereas the other two buttons traced "instance 169" and "instance 177" instead of the instance name.
    With all this strangeness, I commented out the code for these 2 specific buttons to see if it would work without them. Sure enough it did.
    I believe that my buttons have lost their stage instance names and I do not know how to fix this problem. I have tried deleting the buttons and creating them again but to no avail. It does work, however, if I use the Button component that Flash has but I do not want to do that because I'd like to use my own custom buttons (I know the Button component is customizeable, but I'd like to use my own anyways).
    If anyone could help, please how can I fix this problem? If my .fla or specific code needs to be provided, I can do so.

    Without looking at your code I can't say 100% what is going on. However, I suspect what is happening is that you're doing the following:
    Your button is on stage in frame 1
    You add an event listener to that button
    At some point, you go to a frame where the button does not exist.
    When you come back to frame 1, your listener doesn't work anymore
    Or some variation of above, where an instance was on the stage, is removed, and even though it appears to have been added back you can't reference it anymore.  I've discussed fixes for this issue in depth in this article, but it all boils down to the fact that when the object is removed from the stage the variable that contained the instance the first time will go to null, and then when you go back to the frame with the instance on it, the variable will be populated with an instance which is probably not the same as the first one.
    If the problem is what Ned Murphy speculated, you can easily fix it by setting mouseChildren to false on the buttons.

  • How to sort Nulls Last

    Hi:
    I would like to sort data desc and Nulls Last. However, in NQSconfig.ini, I already set NULL_VALUES_SORT_FIRST = OFF; and in the Administrator Tool, Features tab of Database properties, I also uncheck NULL_VALUES_SORT_FIRST. Still, nulls were sort at the top. How can I make nulls last? (I am using Oracle 11 + BIEE 10.1.3.4).
    Thanks

    Hi:
    I ready restart the server and purge all cache, I even reboot my computer. But still cannot fix it. Now I have to convert Nulls to something else, however, I dont think it's a good idea. Any other hints?
    Thanks
    Larry

  • Painting, null error

    Hello, I want to paint something on a JPanel, but the image seems to be null and I don't know why.
    The wierd thing is that if ImageIO.read() fails, the error should be caught.
    But it seems like that it does reads but afbeelding is still null.
    What's wrong?
    By the way, I'm getting a nullpointerexception at line 41
    This is the code:
    /* Klassen importeren */
    import javax.swing.*; //GUI
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import javax.imageio.*;
    /* Deze klasse is een uitbreiding van JPanel, deze heeft een achtergrond afbeelding */
    public class ImgPaneel extends JPanel {
         /* Constructor, als het object word gemaakt word zijn layout naar null gezet */
         public ImgPaneel() {
              this.setLayout(null);
         /* Methode paintComponent overschrijven,
          * in de methode word de opdracht gegeven om een afbeelding te tekenen
          * Deze methode word automatisch aangeroepen als het paneel getekend word */
         @Override
         public void paintComponent(Graphics g) {
              /* Paneel word getekend, aangeven dat dit gebeurd */
              System.out.println("Drawing panel..");
              /* Object aanmaken voor het bestand.
               * path bevat de filename */
              String path = "img/background.gif";
              /* afbeelding, hierin kom de afbeelding */
              BufferedImage afbeelding = null;
              /* Afbeelding in een bufferedimage object proberen op te slaan */
              try {
                   afbeelding = ImageIO.read(new File(path));
              } catch (IOException e) {
                   System.out.println("NO FUNCTION!");
              /* Afbeelding tekenen en de afmeting van het paneel instellen */
              g.drawImage(afbeelding, afbeelding.getWidth(), afbeelding.getHeight(), this);
              this.setSize(afbeelding.getWidth(), afbeelding.getHeight());
    }

    I changed the class.
    The image gets loaded when a new instance is created.
    I'm still getting the null points exception.
    Message
    Exception in thread "main" java.lang.NullPointerException
         at ImgPaneel.<init>(ImgPaneel.java:30)
         at MainTest.main(MainTest.java:10)The class:
    /* Klassen importeren */
    import javax.swing.*; //GUI
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import javax.imageio.*;
    /* Deze klasse is een uitbreiding van JPanel, deze heeft een achtergrond afbeelding */
    public class ImgPaneel extends JPanel {
         private BufferedImage afbeelding;
         /* Constructor, als het object word gemaakt word zijn layout naar null gezet */
         public ImgPaneel() {
              this.setLayout(null);
              this.afbeelding = null;
              /* Object aanmaken voor het bestand.
               * path bevat de filename */
              String path = "img/background.gif";
              /* Afbeelding in een bufferedimage object proberen op te slaan */
              try {
                   this.afbeelding = ImageIO.read(new File(path));
              } catch (IOException e) {
                   System.out.println("NO FUNCTION!");
              this.setSize(afbeelding.getWidth(), afbeelding.getHeight());
         /* Methode paintComponent overschrijven,
          * in de methode word de opdracht gegeven om een afbeelding te tekenen
          * Deze methode word automatisch aangeroepen als het paneel getekend word */
         @Override
         public void paintComponent(Graphics g) {
              /* Paneel word getekend, aangeven dat dit gebeurd */
              System.out.println("Drawing panel..");
              /* Afbeelding tekenen en de afmeting van het paneel instellen */
              g.drawImage(afbeelding, afbeelding.getWidth(), afbeelding.getHeight(), this);
    }

  • Xp20:format-dateTime('060111','[Y01][M01][D01]') returns null...

    As part of my tranformation I need to convert a date string into a datetime type. This operation kept returning null so I decided to hard code the value and the result is still null. Can anyone provide any insight?
    XSL TRANFORMATION:
    <order:OrderHdrAction>
    <xsl:text disable-output-escaping="no">ADD
    </xsl:text>
    </order:OrderHdrAction>
    <order:OrderHdrReqdt>
    <xsl:value-of select="xp20:format-dateTime('060111','[Y01][M01][D01]')"/>
    </order:OrderHdrReqdt>
    <order:OrderHdrPonum>
    <xsl:value-of select="/client:adage_orderentry_qdb_processorProcessRequest/client:flat_order/imp1:instruction/imp1:po_num"/>
    </order:OrderHdrPonum>
    RESULTANT XML:
    <order:OrderHdrAction xmlns:order="http://www.shamrockfoods.com/adage/orderentry">ADD</order:OrderHdrAction>
    <order:OrderHdrReqdt xmlns:order="http://www.shamrockfoods.com/adage/orderentry" />
    <order:OrderHdrPonum xmlns:order="http://www.shamrockfoods.com/adage/orderentry">00001234</order:OrderHdrPonum>

    i think this function is for formatting dates, and not parsing them as you are attempting. Try using substring instead.

  • WebEngine goes in State SUCCEEDED but DOM in null

    I'm trying to develop a JavaFX web page loader. I want to explore the DOM tree after page loading, so I load the DOM after I receive a Worker State SUCCEEDED, but the problem in that when I test my code on the url: www.repubblica.it, I got SUCCEEDED but the DOM is still null.
    It seems to be that the page is not completely loaded although I got the SUCCEEDED event.
    This is the peace of code that fails:
    webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
         @Override
         public void changed(ObservableValue ov, Worker.State oldState, Worker.State newState) {
    if (newState == Worker.State.SUCCEEDED) {
    webEngine.getDocument(); // On www.repubblica.it dom is still null
    I also tried to reload the page when the DOM is null and it seems to work but completely random (sometimes I have to reload two times, sometimes three and so on).
    This problem is driving me crazy. Any help wiill be greatly appreciated!
    Thanks in advance.

    I see an exception occurring there which likely ruins the document. Filed as https://javafx-jira.kenai.com/browse/RT-30835

  • Help in null pointer exception

    I have a null pointer exception and i cant figure out which variable is null,
    This is my servlet code.
    ArrayList pmArray = pDAO.getPlacemarkByRegion(northEastLong, northEastLat, southWestLat, southWestLat);
                //loop through the placemark
                for ( int i=0; i< pmArray.size();i++) {
                    Placemark pm = (Placemark)pmArray.get(i);
                    // parse string
                    String pmId = pm.getPlacemarkid()+"";
                    String pmLat = pm.getLatitude()+"";
                    String pmLong = pm.getLongtitude()+"";
                    String s = "{\"markers\":[ " +
                            "{\"placemarkid\" : + pmId , \"latitude\" :  + pLat , \"longtitude\": + pmLong} + ]}";
                     System.out.println(s);This is my DAO class
    public ArrayList getPlacemarkByRegion(double northEastLong, double northEastLat, double southWestLong, double southWestLat)When i get the placemark andNullPointerException appear. I think that my Arraylist is incorrect, I have also try-catch exception in the servlet but it still show me null pointer. Can anyone please kindly guide me?
    Message was edited by:
    peebu

    hmm, i have solved my sql syntext already, but i still manage to get pmArray null.
    I have check through my codes but pmArray is still null.
    try{
            pDAO = new PlacemarkDAO();
            ArrayList pmArray = pDAO.getPlacemarkByRegion(northEastLong,northEastLat,southWestLong, southWestLat);
            if(pmArray!=null && pmArray.size()>0){ //Check if the method pDao.getPlacemarkByRegion return a null to pmArray
                for ( int i=0; i< pmArray.size();i++) {
                    Placemark pm = (Placemark)pmArray.get(i);
                    if(pm!=null){ //check if the instance pm is null
                        String pmId = pm.getPlacemarkid()+"";
                        String pmLat = pm.getLatitude()+"";
                        String pmLong = pm.getLongtitude()+"";
                       out.println("{\"markers\" : [ {\"placemarkid\":, \"latitude\" :, \"longtitude\" :}," +
                                        "{\"placemarkid\" :, \"latitude\":, \"longtitude\" :}," +
                                        "{\"placemarkid\" :, \"latitude\" :, \"longtitude\" :}" +
                    }else{
                       System.out.println("Error in: "+i + " element"); //if pm instance is null then return the element position of the pmArray
            }else{
                System.out.println("pmArray is null");
           catch(Exception e)
               e.printStackTrace();
            out.close();
        }Hmm, anyone can tell me why is it still null ? is it still related to my DAO class? Or i have lacked out something?Can anyone please give me pointers and guide me along?

Maybe you are looking for

  • Can't listen to more than one song itunes freezes on second song

    I want to listen to samples of songs prior to purchasing them. I can only listen to one sample. When I choose a second sample Itunes stops working and I can't close it.

  • Windows doesn't recognise my reset iPod

    A couple of days ago my iPod started flicking through songs of it's own accord, as though I was pressing on the "Forwards" button repeatedly. I Reset it and now I get Three graphics appearing on the screen: The Apple Logo, A Sad iPod and a Battery (l

  • Why dose iTunes keep crashing?

    I open up iTunes and it stays open for about 10 secounds and then it says "iTunes has stoped working". I have tried uninstaling and reinstaling but that has not fixed anything.  Below is the problem details, Problem signature:   Problem Event Name:  

  • Problem in Data updation with multiple windows in JSF

    Hi, I am facing a problem whitle working in JSF. As per my project scenario I have a list page which shows list of entities. I can click on the id of the entity and open a new window containing the details of that particular entity. In that perticula

  • Can't move iPhone pages' tables

    iPhone Pages won't let me add a table so I can move it freely (using the little circle in the upper left corner that appears after selecting the table). I've tried clicking elsewhere, but I have to double click for that to deselect a text insertion p