Null pointer Exception with removeRowWithKey operation

Hii experts,,,
I am using JDevelepor 11.1.2.1.0 Version
I Am new in ADF ,
In My sample application i select row in iterator by findIterator() method
then get the specified row by getCurrentRow();
then i get the rowKey By row.getKey() method..
I put rowKey as parameter to removeRowWithKey operation
I have get null pointer Exception with removeRowWithKey operation
java.lang.NullPointerException
     at oracle.jbo.server.ViewRowSetImpl.prepKeyForFind(ViewRowSetImpl.java:5352)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5394)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5296)
     at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5290)
     at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:11536)
     at oracle.adf.model.binding.DCIteratorBinding.removeRowWithKey(DCIteratorBinding.java:3748)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1598)
how can solve this???

thanks Timo
through this URL i get possible deletion methods...
pls give more Information about the concept of removeRowWithKey, setCurrentRowWithKey, setCurrentRowWithKeyValue operation.... Just For Knowledge....
Edited by: NZL on Mar 2, 2012 9:37 AM
Edited by: NZL on Mar 2, 2012 9:42 AM

Similar Messages

  • Null pointer exception with ImageToBuffer.create(........)

    I'm trying to draw two lines on received video frames so I implemented an effect that takes a frame then :
    frame = Buffer -> Image -> BufferedImage -> draw lines -> Image -> Buffer ( Problem ).
    the problem is in converting the Image back to Buffer in order to assign it as the Effect outcome buffer ( which will be showed ), the process function code is as followed :
    BufferToImage bti;
    ImageToBuffer itb;
    public int process(Buffer inBuffer, Buffer outBuffer)
    Object data = inBuffer.getData();
    if (bti == null)
    bti = new BufferToImage( (VideoFormat) inBuffer.getFormat());
    Image image = bti.createImage(inBuffer);
    if (image != null)
    Graphics2D g = bImage.createGraphics();
    g.drawImage(image, null, null);
    g.drawLine(160, 0, 160, 240);
    g.drawLine(0, 120, 320, 120);
    if (itb == null)
    itb = new ImageToBuffer();
    Image i = Toolkit.getDefaultToolkit().createImage(bImage.getSource());
    if (b == null)
    b = new Buffer();
    b = itb.createBuffer(i, 15); ///causes null pointer exception
    if (b != null)
    inBuffer.setData(outBuffer.getData());
    outBuffer.setData(b.getData());
    else
    inBuffer.setData(outBuffer.getData());
    outBuffer.setData(data);
    // Copy the input attributes to the output
    outBuffer.setFormat(inBuffer.getFormat());
    outBuffer.setLength(inBuffer.getLength());
    outBuffer.setOffset(inBuffer.getOffset());
    return BUFFER_PROCESSED_OK;
    Any solutions for the problem.
    Thank you for replying in advance..

    thanks Timo
    through this URL i get possible deletion methods...
    pls give more Information about the concept of removeRowWithKey, setCurrentRowWithKey, setCurrentRowWithKeyValue operation.... Just For Knowledge....
    Edited by: NZL on Mar 2, 2012 9:37 AM
    Edited by: NZL on Mar 2, 2012 9:42 AM

  • Null pointer Exception with Float.parseFloat

    I need to assign a float value from a database to a variable recurrently throughout a while loop. but i am getting a null pointer exception error:
    while ( rs.next() )
         out.println("<TR>");
              float corr = Float.parseFloat((String) request.getParameter("echo"));
              out.println("<center><TD><b><font color = #990000>" + rs.getString("race_number") + "</b></TD>");
              out.println("<center><TD><b><font color = #990000>" + rs.getString("sail_number") + "</b></TD>");
              out.println("<center><TD><b><font color = #990000>" + rs.getString("finish_time_elapsed") + "</b></TD>");
              out.println("<center><TD><b><font color = #990000>" + rs.getString("echo") + "</b></TD>");
              out.println("</TR>");
    I've also tried:
    float corr = Float.parseFloat( String request.getParameter("echo"));
    float corr = 0;
    corr Float.parseFloat((String) request.getParameter("echo"));
    corr = echo;
    corr = request.getParameter("echo");
    corr = rs.getString("echo");
    corr = Float.parseFloat(request.getParameter("echo"));
    temp = rs.getFloat("Problem_Description");
    Any ideas Please!!!

    Null pointer exception means that the value you are trying to turn into a Float is null. Probably request.getParameter("echo") returns null.
    Is "echo" a request parameter, or a field you want to get from the database?
    request.getParameter() has nothing to do with a database query.
    That is your http request coming from the form submission. It won't change.
    If "echo" is meant to be a request parameter, then make sure the parameter is actually present.
    If its a database field (stored as a number) then
    float corr = rs.getFloat("echo");
    should do the trick.
    Can the value be null in the database?
    Cheers,
    evnafets

  • Null pointer exception with Lists

    Hi,
    I have got a problem with java.util.List. It is giving Null pointer exception whenever I try to add after extracting from my XML file.I have written the code like this:
    List year; //Global variable
    List loaddatas; //Global variable
    Element e1; //Global
    loaddatas=root.getChild("Load").getChildren("LoadData");
    int k=loaddatas.size();
    for(int i=0;i<loaddatas.size();i++)
    e1=(Element)loaddatas.get(i);
    year.add(i,Integer.valueOf(e1.getChildText("Year"))); // I am getting exception here.....
    root is root element in XML file.
    I am able to display "Integer.valueOf(e1.getChildText("Year"))" correctly.
    Anybody please tell me how to solve this.
    Thanks,
    Sai Ram

    Looks like somebody forgot to learn to program before starting to write code....
    List list = new ArrayList();

  • Null Pointer Exception with Oracle Transformer

    Hi all,
    I'm getting a NullPointerException after building a DOM tree and feeding it to a stream via the Oracle JAXP transformer. I am trying to convert the data in DOMSource to PDF file. The following code:
    TransformerFactory transFact = TransformerFactory.newInstance();
    Transformer transForm = transFact.newTransformer();
    ByteArrayOutputStream pdfOutStream = new ByteArrayOutputStream();
    DOMSource pdfInput = new DOMSource(doc);
    StreamResult pdfOutput = new StreamResult(pdfOutStream);
    transForm.transform(pdfInput,pdfOutput);
    int pdfByteSize = pdfOutStream.size();
    System.out.println("Size of pdfByteSize : "+ pdfByteSize);
    pdfByte = new byte[pdfByteSize];
    pdfByte = pdfOutStream.toByteArray();
    InputStream formInputStream = new ByteArrayInputStream(pdfByte);
    Iam getting error at "transForm.transform(pdfInput,pdfOutput);".
    Here the StackTrace :
    07/05/24 10:59:40 XML-22900: (Fatal Error) An internal error condition occurred.
    javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
    Caused by: java.lang.NullPointerException
         at oracle.xml.parser.v2.XMLText.reportSAXEvents(XMLText.java:402)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:2165)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:337)
    Environment we are using is Sun JDK 1.4.2_06 on Windows, running JDeveloper 10 g with OC4j as Application Server.
    Can any one please explain me in this regard?
    Thanks
    Manoj

    Thanks for the Reply.
    Before Null Pointer Exception I am getting another Fatal error:
    javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
    Please Help

  • Null pointer Exception with Custom EventQueue

    I created a simple class customEventQueue which is extended from EventQueue class and pushed it using
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(customEventQueue);
    Now, whenever there are three modal dialogs on top of a frame and if I click on top dialog that closes all three dialog boxes, I get nullpointer exception in console. The custom event class does not have any method in it. It just extends from EventQueue.
    I checked it in different JRE and it happens only in JRE1.3.1.
    Has anybody tried the same thing with custom event queue? Any help is most welcome. Thanks...
    java.lang.NullPointerException
    at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
    at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
    at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)

    Hi Chandel me having the same problem
    java.lang.NullPointerException
    at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
    at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
    at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown
    Source)
    at
    java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour
    ce)
    at
    java.awt.DefaultKeyboardFocusManager.pumpApprovedKeyEvents(Unknown So
    urce)
    at
    java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Sour
    ce)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown
    Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.SequencedEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Th bigger problem is that i don't know what is causing this exception, cause the stack trace doesn't mention the line of code where the exception occurred.
    In earlier version of java we had pData null pointer exception. This bug manifests when the pull down menu doesn't fit completely into the frame's bounds and swing has to create a seaprate window for the pull-down.
    The problem is that WInputMethod caches a reference to peer and that that reference becomes stale when peer is destroyed and recreated.
    In this bug cached peer reference becomes stale as the Window for the menu is hidden (and its peer is destroyed) and shown again (with new peer this time).
    WInputMethod have a cached reference to the old peer but that old peer is not connected to the underlying native window used to display the menu.
    But it's been fixed. I want to know if our problem is in some way related to this pData bug.
    Thanx.

  • Help please I get Null Pointer Exception with my SQL query

    The following statement gives me a null pointer exception when executed
    from the doPost of my servlet.
    rs=stmt.executeQuery(sqlQuery);
    The error message reads:
    java.lang.NullPointerException
         at stockserv.Servlet1.doPost(Servlet1.java:142)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    ===etc.
    when I execute the same statement and query (same DB and table) from a standard java
    program I do not get the error and get the propper result.
    Any obvious thing I should check?
    Thanks

    Yes line 142 is as follows
    rs=stmt.executeQuery(sqlQuery);
    I also tried it with the folowing literal statement and get the same error.
    rs=stmt.executeQuery("select * from table1 Where symbol= 'brt' ");
    Does null pointer mean I am sending a null query or something else?
    Again this same statment works from a regular java (non-server)program.
    Thanks Again

  • Null pointer exception with thread

    ok,
    When i try to start a thread i get a null pointer exception:
    Exception in thread "Thread-2" java.lang.NullPointerException
            at MainWindow$8.run(MainWindow.java:274)
            at java.lang.Thread.run(Thread.java:619)Here is the thread code:
    t = new Thread(new Runnable(){
             public void run(){
                 for (int i = 100; i > 0; i--){
                     blockArray = p.physicsPass(blockArray);
                     repaintCanvas();
        t.start();After stepping through it it would appear the exception is thrown before physicsPass() gets called...
    blockArray is not empty so im not sure what the null pointer is.
    Its probably something obvious im missing, any ideas?
    Cheers
    J

    JamesBarnes wrote:
    look for the dots?
    I dont understand, care to elaborate?In your code there was two dots:
    blockArray = p.physicsPass(blockArray);
    t.start();So either p was null or t was null.

  • Java Null Pointer Exception - with arraycopy method.

    Hi all,
    I have been trying to fix this for a while now, but I think I've been staring at the screen for too long to fix it!
    Basically I am trying to 'crossover' some arrays (evolutionary technique) but I keep getting a null pointer exception.
    Here is my customised class: class ChromosomeDetails {
         double[] chromosomePrices;
         int[] chromosomePoints;
         int[] chromosomePlayerIDs;
         int chromosomeFitness;
           ChromosomeDetails(double[] chromosomePrices, int[] chromosomePoints, int[] chromosomePlayerIDs, int chromosomeFitness) {
              this.chromosomePrices = chromosomePrices;
              this.chromosomePoints = chromosomePoints;
              this.chromosomePlayerIDs = chromosomePlayerIDs;
              this.chromosomeFitness = chromosomeFitness;     
           public ChromosomeDetails () {  
                chromosomePrices = null;
              chromosomePoints = null;
              chromosomePlayerIDs = null;
              chromosomeFitness = 0;
         public double[] getPrices() {
              return chromosomePrices;
         public int[] getPoints() {
              return chromosomePoints;
         public int[] getPlayerIDs() {
              return chromosomePlayerIDs;
         public int getFitness() {
              return chromosomeFitness;
    }  In my main method I create 2 instances of this class like so:ChromosomeDetails parentChromosomeADetails = new ChromosomeDetails();          
    ChromosomeDetails parentChromosomeBDetails = new ChromosomeDetails();...and 2 other instances that are left empty:ChromosomeDetails childChromosomeCDetails = new ChromosomeDetails();     
    ChromosomeDetails childChromosomeDDetails = new ChromosomeDetails();     I then try to 'crossover' the values in the arrays like so: int randomCrossoverPoint = new Random().nextInt(parentChromosomeADetails.chromosomePoints.length-1);
    System.arraycopy(parentChromosomeADetails.chromosomePrices, 0, childChromosomeCDetails.chromosomePrices, 0, randomCrossoverPoint);
    System.arraycopy(parentChromosomeBDetails.chromosomePrices, randomCrossoverPoint, childChromosomeCDetails.chromosomePrices, randomCrossoverPoint, (childChromosomeCDetails.chromosomePrices.length-randomCrossoverPoint));
    System.arraycopy(parentChromosomeADetails.chromosomePoints, 0, childChromosomeCDetails.chromosomePoints, 0, randomCrossoverPoint);
    System.arraycopy(parentChromosomeBDetails.chromosomePoints, randomCrossoverPoint, childChromosomeCDetails.chromosomePoints, randomCrossoverPoint, (childChromosomeCDetails.chromosomePoints.length-randomCrossoverPoint));
    System.arraycopy(parentChromosomeADetails.chromosomePlayerIDs, 0, childChromosomeCDetails.chromosomePlayerIDs, 0, randomCrossoverPoint);
    System.arraycopy(parentChromosomeBDetails.chromosomePlayerIDs, randomCrossoverPoint, childChromosomeCDetails.chromosomePlayerIDs, randomCrossoverPoint, (childChromosomeCDetails.chromosomePlayerIDs.length-randomCrossoverPoint));
                        However it gives me this error, relating to the first arraycopy method: Exception in thread "main" java.lang.NullPointerException
         at java.lang.System.arraycopy(Native Method)Please note that in this program, parentChromosomeADetails and parentChromosomeBDetails already hold data when I try to use the arraycopy method, whereas the childChromosomeCDetails and childChromosomeDDetails objects are empty, waiting for the data from the arraycopy methods. Any help would be immensely appreciated.

    it was learning very well yesterday, but that was before I introduced my customised class. I need my class as I need to be able to keep hold of all of the data, rather than just the chromosome points, so that I can see the exact strategy that the algorithm uses.
    It is indeed the child chromosome that is null, and I suppose that it because I had to initialise the int[] chromosomePoints, double[] chromosomePrices and int[] chromosomePlayerIDs as null. What is the best solution to this? using loops to initialise all values in the arrays as 0 before the arraycopy?!

  • Null pointer exception with inner class

    Hi everyone,
    I've written an applet that is an animation of a wheel turning. The animation is drawn on a customised JPanel which is an inner class called animateArea. The main class is called Rotary. It runs fine when I run it from JBuilder in the Applet Viewer. However when I try to open the html in internet explorer it gives me null pointer exceptions like the following:
    java.lang.NullPointerException      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2761)      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2722)      
    at Rotary$animateArea.paintComponent(Rotary.java:251)      
    at javax.swing.JComponent.paint(JComponent.java:808)      
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)      
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)      
    at javax.swing.JComponent._paintImmediately(JComponent.java:4668)      
    at javax.swing.JComponent.paintImmediately(JComponent.java:4477)      
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)      
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)      
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)      
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)      
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)      
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)      
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Do inner classes have to be compiled seperately or anything?
    Thanks a million for you time,
    CurtinR

    I think that I am using the Java plugin ( Its a computer in college so I'm not certain but I just tried running an applet from the Swing tutorial and it worked)
    Its an image of a rotating wheel and in each sector of the wheel is the name of a person - when you click on the sector it goes red and the email window should come up (that doesn't work yet though). The stop and play buttons stop or start the animation. It is started by default.
    This is the code for the applet:
    import java.applet.*;
    import javax.swing.JApplet;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.util.StringTokenizer;
    import java.net.*;
    public class Rotary extends JApplet implements ActionListener, MouseListener
    public boolean rotating;
    private Timer timer;
    private int delay = 1000;
    private AffineTransform transform;
    private JTextArea txtTest; //temp
    private Container c;
    private animateArea wheelPanel;
    private JButton btPlay, btStop;
    private BoxLayout layout;
    private JPanel btPanel;
    public Image wheel;
    public int currentSector;
    public String members[];
    public int [][]coordsX, coordsY; //stores sector no. and x or y coordinates for that point
    final int TOTAL_SECTORS= 48;
    //creates polygon array - each polygon represents a sector on wheel
    public Polygon polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
    polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
    polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
    polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
    polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48;
    public Polygon polySectors[]={polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
                      polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
                      polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
                      polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
                      polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48};
    public void init()
    members = new String[TOTAL_SECTORS];
    coordsX= new int[TOTAL_SECTORS][4];
    coordsY= new int[TOTAL_SECTORS][4];
    currentSector = -1;
    rotating = true;
    transform = new AffineTransform();
    //***********************************Create GUI**************************
    wheelPanel = new animateArea(); //create a canvas where the animation will be displayed
    wheelPanel.setSize(600,580);
    wheelPanel.setBackground(Color.yellow);
    btPanel = new JPanel(); //create a panel for the buttons
    btPanel.setLayout(new BoxLayout(btPanel,BoxLayout.Y_AXIS));
    btPanel.setBackground(Color.blue);
    btPanel.setMaximumSize(new Dimension(30,580));
    btPanel.setMinimumSize(new Dimension(30,580));
    btPlay = new JButton("Play");
    btStop = new JButton("Stop");
    //txtTest = new JTextArea(5,5); //temp
    btPanel.add(btPlay);
    btPanel.add(btStop);
    // btPanel.add(txtTest); //temp
    c = getContentPane();
    layout = new BoxLayout(c,layout.X_AXIS);
    c.setLayout(layout);
    c.add(wheelPanel); //add panel and animate canvas to the applet
    c.add(btPanel);
    wheel = getImage(getDocumentBase(),"rotary2.gif");
    getParameters();
    for(int k = 0; k <TOTAL_SECTORS; k++)
    polySectors[k] = new Polygon();
    for(int n= 0; n<4; n++)
    polySectors[k].addPoint(coordsX[k][n],coordsY[k][n]);
    btPlay.addActionListener(this);
    btStop.addActionListener(this);
    wheelPanel.addMouseListener(this);
    startAnimation();
    public void mouseClicked(MouseEvent e)
    if (rotating == false) //user can only hightlight a sector when wheel is not rotating
    for(int h= 0; h<TOTAL_SECTORS; h++)
    if(polySectors[h].contains(e.getX(),e.getY()))
    currentSector = h;
    wheelPanel.repaint();
    email();
    public void mouseExited(MouseEvent e){}
    public void mouseEntered(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}
    public void mousePressed(MouseEvent e){}
    public void email()
    try
    URL rotaryMail = new URL("mailto:[email protected]");
    getAppletContext().showDocument(rotaryMail);
    catch(MalformedURLException mue)
    System.out.println("bad url!");
    public void getParameters()
    StringTokenizer stSector;
    String parCoords;
    for(int i = 0; i <TOTAL_SECTORS; i++)
    {               //put member names in applet parameter list into an array
    members[i] = getParameter("member"+i);
    //separate coordinate string and store coordinates in 2 arrays
    parCoords=getParameter("sector"+i);
    stSector = new StringTokenizer(parCoords, ",");
    for(int j = 0; j<4; j++)
    coordsX[i][j] = Integer.parseInt(stSector.nextToken());
    coordsY[i][j] = Integer.parseInt(stSector.nextToken());
    public void actionPerformed(ActionEvent e)
    wheelPanel.repaint(); //repaint when timer event occurs
    if (e.getActionCommand()=="Stop")
    stopAnimation();
    else if(e.getActionCommand()=="Play")
    startAnimation();
    public void startAnimation()
    if(timer == null)
    timer = new Timer(delay,this);
    timer.start();
    else if(!timer.isRunning())
    timer.restart();
    Thanks so much for your help!

  • Null Pointer Exception with iterator

    Hi,
    I'm trying to use an iterator on a collection bound to a jsf page fragment through datacontrol (data is retrieved from a web service).
    Everything works fine except when this collection is null; I'm then getting a null pointer exception.
    Is there an equivalent of <af:table emptytext="">? Or maybe, is there somewhere where I can configure my datacontrol to always return an empty collection instead of null?
    Thanks.
    Edit: my mistake; I made an error in the binding, which was pointing to another iterator already used.
    Edited by: 965573 on 16 oct. 2012 02:17

    Hi,
    You can try not to render the table when the length of the Collection is zero. This can be done by a JSTL function "length" available at:
    http://java.sun.com/jsp/jstl/functions
    Ex:#{fn:length(bindings.Collection)>0}"
    Thanks,

  • Null pointer exception- with array of images

    Hi , i am having some problems with my program. I am trying to create an array of images( which i dont really know how to do) and i keep getting this error
    Exception in thread "main" java.lang.NullPointerException
    at DiceRoller.<init>(DiceRoller.java:35)
    at RollDice.main(RollDice.java:19)
    Here is my code, any help would be appreciated, i have switched things around and i still can't figure out what is wrong
    * @(#)RollDice.java
    * RollDice application
    * @author
    * @version 1.00 2009/3/23
    import java.util.Scanner;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class RollDice {
        public static void main(String[] args) {
             DiceRoller diceroller  = new DiceRoller();
             //Default Close operations
             diceroller.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
             //Size
            diceroller.setSize( 121, 121 ); // set frame size
            //Dont want anyone to mess with it
            diceroller.setResizable(false); // Cant resize
            diceroller.setVisible( true ); // display frame
    * Dice.java
    //Main dice Class
    import java.util.Random;
    import java.io.*;
    public class Dice
         public      Random r = new Random();
         private int sides;
         private int rolls;
         public int x;
         public Dice()
         Roll method
         public int roll()
              x=0;
              x = (r.nextInt(6)+1);
              return x;
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image = null ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
           die =new Dice();
           int rollVal = 0;
           rollVal = die.roll();     
           //Images     
           image = new ImageIcon[images.length];
          for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
    }//end for
    // setImage(rollVal);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    max_wallace wrote:
    Do you think you could please elaborate on your answer, and what does borked mean?One of my favourite words that; [b0rked|http://www.urbandictionary.com/define.php?term=b0rked] / borked

  • Null Pointer Exception with MDB

    Hi,
    I have a problem deploying a MDB which is connecting to a AQ. It works fine when the AQ is in single consumers mode, but with multiple consumers set to true, I get the following error:
    04/12/20 16:45:16 java.lang.NullPointerException
    04/12/20 16:45:16      at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:1091)
    04/12/20 16:45:16      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    04/12/20 16:45:16      at java.lang.Thread.run(Thread.java:534)
    Here are my configurations:
    orion-ejb-jar:
    <message-driven-deployment name="AQReceiver"
    destination-location="java:comp/resource/ojmsIZN/Topics/izn_inbound"
    connection-factory-location="java:comp/resource/ojmsIZN/TopicConnectionFactories/myQCF"
    subscription-name="SUB1">
    <resource-ref-mapping name="jms/demoTopic"
    location="java:comp/resource/ojmsIZN/Topics/izn_inbound"/>
    <resource-ref-mapping name="jms/TopicConnectionFactory"
    location="java:comp/resource/ojmsIZN/TopicConnectionFactories/myQCF"/>
    </message-driven-deployment>
    ejb-jar:
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    </message-driven-destination>
    <security-identity/>
    <resource-ref>
    <description>The log topic where log events are broadcasted...</description>
    <res-ref-name>jms/demoTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <description>The Factory used to produce connections to the log topic...</description>
    <res-ref-name>jms/TopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    Any help is very welcome!
    Regards
    Peter

    thanks Timo
    through this URL i get possible deletion methods...
    pls give more Information about the concept of removeRowWithKey, setCurrentRowWithKey, setCurrentRowWithKeyValue operation.... Just For Knowledge....
    Edited by: NZL on Mar 2, 2012 9:37 AM
    Edited by: NZL on Mar 2, 2012 9:42 AM

  • Null pointer exception with the Record working time iView

    I am facing a strange situation over here, I am testing with three user ids and with only one manager user id I am getting below java runtime error. Please help me out in finding a solution for this. When I log in with the other two test ids I am able to open the iView and submit my time sheet with out any exceptions but only with one user id I am getting this kind of error.
    Detailed Error Information Detailed Exception Chain java.lang.NullPointerException at com.sap.pcuigp.xssutils.pernr.FcEmployeeServicesInterface.getEmployeenumber(FcEmployeeServicesInterface.java:115) at com.sap.pcuigp.xssutils.pernr.wdp.InternalFcEmployeeServicesInterface.getEmployeenumber(InternalFcEmployeeServicesInterface.java:175) at com.sap.pcuigp.xssutils.pernr.wdp.InternalFcEmployeeServicesInterface$External.getEmployeenumber(InternalFcEmployeeServicesInterface.java:235) at com.sap.xss.hr.cat.record.blc.RfcManager.init(RfcManager.java:791) at com.sap.xss.hr.cat.record.blc.wdp.InternalRfcManager.init(InternalRfcManager.java:248) at com.sap.xss.hr.cat.record.blc.FcCatRecordInterface.onInit(FcCatRecordInterface.java:344) at com.sap.xss.hr.cat.record.blc.wdp.InternalFcCatRecordInterface.onInit(InternalFcCatRecordInterface.java:234) at com.sap.xss.hr.cat.record.blc.wdp.InternalFcCatRecordInterface$External.onInit(InternalFcCatRecordInterface.java:484) at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:922) at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:891) at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.attachComponentToUsage(FPMComponent.java:1084) at com.sap.xss.hr.cat.record.vac.calendar.VcCatCalendar.onInit(VcCatCalendar.java:251) at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendar.onInit(InternalVcCatCalendar.java:194) at com.sap.xss.hr.cat.record.vac.calendar.VcCatCalendarInterface.onInit(VcCatCalendarInterface.java:162) at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendarInterface.onInit(InternalVcCatCalendarInterface.java:146) at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendarInterface$External.onInit(InternalVcCatCalendarInterface.java:222) at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:564) at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438) at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196) at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110) at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108) at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215) at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200) at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430) at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:783) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:303) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)

    Hi,
    This runtime error occurs when the application fails to resolve the pernr of the logged in user in the backend. Could you please check if the user has correct assignment in IT0105. If you are using CE, kindly check if the CE settings are properly checked. Also check if the IT0105 is correctly shared across all the CE assignments.
    Hope this helps
    Regards,
    Roy

  • Null Pointer Exception with BufferedWriter

    Hi Guys,
    When I try to run this code I get a NullPointer Exception, and I can't work out why. At first I thought it was to do with scope, as it looks like it can't find the out object, but after fiddling with the code it didn't make any difference.
    Could please have a look and let me know what you think?
    Thanks
    import java.io.*;
    public class Storage {
        protected File file;
        protected String path = "C:/Users/Chicky/Documents/NetBeansProjects/Drive/Input";
        protected String filepath = "C:/Users/Chicky/Documents/NetBeansProjects/Drive/Input/Data.csv";
        protected FileWriter fw;
        protected BufferedWriter out;
        public void Storage(){
        protected void setup() throws IOException{
            file = new File(path);
            if(!file.isDirectory()){
                file.mkdir();
                fw = new FileWriter(filepath, true);
            else if(file.isDirectory() && file.exists()){
                //don't want to do anything here
            out = new BufferedWriter(fw);    //<----------line 34
    import java.io.*;
    public class Main {
        public static Storage store;
        public static void main(String[] args)throws IOException {
            store = new Storage();
            store.setup();        //<--------------line 30
            start();
        ...Exception in thread "main" java.lang.NullPointerException
    at java.io.Writer.<init>(Writer.java:71)
    at java.io.BufferedWriter.<init>(BufferedWriter.java:83)
    at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
    at drive.Storage.setup(Storage.java:34)
    at drive.Main.main(Main.java:30)

    Thanks to both camickr and pbrockway2, I've got it working. fw wasn't initialised if the directory already existed so this is my new code which works fine.
        protected void setup() throws IOException{
            file = new File(path);
            if(!file.isDirectory()){
                file.mkdir();
            else if(file.isDirectory() && file.exists()){
               //don't need to do anything here
            fw = new FileWriter(filepath, true);
            out = new BufferedWriter(fw);
        }

Maybe you are looking for

  • Syncing Addresses with iCloud and an older iPod Touch

    I've got my iMac set up to sync Address Book with iCloud.  I've also got a 2nd generation iPod Touch that cannot run iO5 so it cannot communicate with iCloud.  When I sync the iPod with the iMac if I don't turn off the "Sync Address Book Contacts" op

  • Query for database size

    I need a query which should display the current size of database and the size of the database one month back. I have tried with OEM but if the database goes down in between, it won't display the result.(OS-HP-Unix, Linux, Ver-8i,9i,10g)

  • Right-click "Open with" shows multiple options of the same app.

    Just bought this computer less than a month ago, everything is perfect except for this little bug that seems to be getting worse and worse. Any idea whats happening here? I'm completely stumped! MacBook Pro Retina, 15-inch, Late 2013 Processor  2.3 G

  • MC44 configuration for 'storage location exclusion'

    Hi all, I want to know if it is possible to exclude a certain storage location (1006 in my case) from the MC44 u2013 Inventory Turnover report. By default i can filter results by several parameters like ABC indicator or material type, but i want to e

  • Can't change log-in preference

    At one point I answered the query, "Do you want to save this log-in ID" with"Never". I want to save it now. Have gone through much in the discussions and went to the Keychain Access area to try and find this site to remove it and reset it. This site