Using ExecuteWithParams and getting a null pointer error

I'm new to Webcenter and have a question about using ExecuteWithParams. I want to know if anyone experienced a null pointer exception when using it. I was using the example from the followng page to create a parameter form to filter an adf table.
http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/threesearchpages/threesearchforms_partthree.html?_template=/ocom/technology/content/print
I created the named bind variable in the View Object editor, changed the query and dragged the ExecuteWithParams Operation onto my page. However, when I go to run the page I get the following error:
javax.faces.el.EvaluationException: java.lang.NullPointerException     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)     at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.getLabel(LabelAndMessageRenderer.java:618)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:157)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:246)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeColumnChild(PanelFormRenderer.java:275)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:251)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:545)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:153)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:69)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)     at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderNamedChild(BaseRenderer.java:384)     at oracle.adfinternal.view.faces.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent(PageHeaderLayoutRenderer.java:259)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)     at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.PageLayoutRenderer.render(PageLayoutRenderer.java:76)     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:242)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:265)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:645)     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:568)     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)     at mdssys.viewcontroller._public__html._SoluminaOrderStatus_jspx._jspService(_SoluminaOrderStatus_jspx.java:943)     [SRC:/mdssys/ViewController/public_html/SoluminaOrderStatus.jspx:4]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.mds.jsp.MDSJSPFilter.doFilter(Unknown Source)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)     at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.NullPointerException     at oracle.adf.model.binding.DCVariableImpl.resolveSourceVariable(DCVariableImpl.java:64)     at oracle.adf.model.binding.DCVariableImpl.resolveResourceProperty(DCVariableImpl.java:142)     at oracle.jbo.common.VariableImpl.getLabel(VariableImpl.java:800)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.getLabel(JUCtrlValueBinding.java:1384)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:1726)     at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:156)     at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:649)     at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)     at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)     at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)     at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)     at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)     ... 97 more
Can anyone help me with this?

Please, post your question on JDeveloper forum (JDeveloper and ADF

Similar Messages

  • Null pointer error if not started with 1st in string

    hi, this little pratice is about building a simple shopping cart. the TOAD.JSP will display the item list and quantity, user could check item and input the quantity that they want. if the user input larger quantity than database, servlet will sent the back to TOAD.jsp and show message. now it works if selected from 1 item, but if selected 2nd or 3rd, it will have null pointer error over here:
    for(int i=0; i<ItemList.size(); i++)
    newit = (ItemBean)ItemList.get(i);
    if (item != null && item.equals(newit.getItem()) )
    %>
    <tr>
    <td ><input type="checkbox" name = "item" value="<%= newit.getItem() %>"><b><%= newit.getItem() %> </b><br></td>
    <td><input type=text name="<%= newit.getItem() %>Qty" value="<%= orderQty%>"></td>
    </tr>
    <tr><td colspan = 2>
    <font size="3" color="red">
    The item <%= newit.getItem() %> is NOT available in stock</font>
    </td>
    </tr>
    <%
    } else {
    %>
    <tr>
    <td ><input type="checkbox" name = "item" value="<%= newit.getItem() %>"><b><%= newit.getItem() %> </b><br></td>
    <td><b><input type=text name="<%= newit.getItem() %>Qty" value="<%= newit.getQty()%>"></b> </td>
    </tr>
    <%
    %>
    thanks for your time!

    You have prvided unsufficent information and poorly formatted code and as such no meaningful answer can given you at present.
    But here is the best that one can guess at.
    You have a null somewhere.
    Is it coming from this code? I am going to say no.
    Where does it come from? I don't know.
    Where should you look? In the code that does processing to see what happens when yuo have more than one item.
    What should you do next? Start putting in some debugging and tracing statements to see where you are heading off into the null abyss.

  • Simple question re: Avoiding null pointer errors

    In my program, I ask the user to enter a 3-letter code, then try to determine whether that code belongs to one of a list of objects.
    I keep getting null-pointer errors. I understand why, but don't know how to get around it. I don't know how to format my loop.
    (Simple, I know. But I'm just starting out!)
    Any help would be appreciated.

    This may not come through clearly; my first day using this system.
    The format I'm trying to use is this:
    if (chosenCode.compareTo(airport[counter].getCode()) != 0)
    counter++;
    } while ((chosenCode.compareTo(airport[counter].getCode()) != 0) && (counter != size));
    Trying to go through list until I find chosenCode.
    Any suggestions?

  • When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message 'An error as occurred. Please try again later'. It has been this way for some weeks. I don't have this problem using Safari or Opera.

    When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message ‘An error as occurred. Please try again later’. It has been this way for some weeks. I don’t have this problem using Safari or Opera.

    I believe that our “Werbung problem” adds an additional second hyperlink to the pop-up window. This second link is activated whenever you trigger a saved hyperlink to a Mail.com site.
    I had the same problem and eliminated it by deleting all bookmarks, hyperlinks and automatic links that take firefox to a mail.com address. So I just deleted all bookmarks I had saved for mail.com. I also changed my home page link because it also went to my email at mail.com. I then did a warm boot, opened firefox and re-saved my bookmarks and homepage to the desired addresses. Good luck.

  • I can't figure out why I'm getting a Null Pointer Exception

    I'm writing a program that calls Bingo numbers. I got that part of the program to work but when I started adding Swing I kept getting a Null Pointer Exception and I don't know how to fix it. The Exception happens on line 15 of class Panel (g = image.getGraphics();). Here is the code for my classes. I'm still not finished with the program and I can't finish it until I know that this issue is resolved.
    package Graphics;
    import java.awt.Graphics;
    import javax.swing.JFrame;
    public class DrawFrame extends JFrame{
         public Panel panel;
         public DrawFrame(int x, int y, String s) {
              super(s);
              this.setBounds(0, 0, x, y);
              this.setResizable(false);
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setPreferredSize(getSize());
              panel = this.getPanel();
              this.getContentPane().add(panel);
              panel.init();
              this.setVisible(true);
         public Graphics getGraphicsEnvironment(){
              return panel.getGraphicsEnvironment();
         Panel getPanel(){
              return new Panel();
    package Graphics;
    import javax.swing.JPanel;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Image;
    public class Panel extends JPanel{
         Graphics g;
         Image image;
         public void init() {
              image = this.createImage(this.getWidth(), this.getHeight());
              g = image.getGraphics();
              g.setColor(Color.white);
              g.fillRect(0, 0, this.getWidth(), this.getHeight());
         Graphics getGraphicsEnvironment() {
              return g;
         public void paint(Graphics graph) {
              if (graph == null)
                   return;
              if (image == null) {
                   return;
              graph.drawImage(image, 0, 0, this);
    package Graphics;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    public class Keys extends KeyAdapter{
    public int keyPressed; //creates a variable keyPressed that stores an integer
    public void keyPressed(KeyEvent e) { //creates a KeyEvent from a KeyListner
              keyPressed = e.getKeyCode(); //gets the key from the keyboard
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.event.KeyEvent;
    import Graphics.*;
    public class Bingo {
         static Ball balls[][] = new Ball[5][15]; //creates a 2D 5 by 15 array
         public static void main(String[] args) {
              DrawFrame frame = new DrawFrame(1500, 500, "Welcome to the automated Bingo Caller."); //creates instance of DrawFrame that is 1000 pixels wide and 500 pixels high
              Graphics g = frame.getGraphicsEnvironment(); //calls the getGraphicsEnvironment method in the DrawFrame class
              Keys key = new Keys(); //creates instance of the Key class
              frame.addKeyListener(key); //adds a KeyListener called Key
              for (int x = 0; x < 5; x++) { //fills rows
                   for (int y = 0; y < 15; y++) { //fills columns
                        balls[x][y] = new Ball(x, y+1); //fills array
              frame.pack(); //adjusts the size of the frame so everything fits
              g.setColor(Color.black); //sets the font color to black
              g.setFont(new Font("MonoSpace", Font.PLAIN, 20)); //creates new font
              for(int y=0;y<balls.length;y++){ //draws all possible balls
                   g.drawString(balls[y][0].s, 0, y*100); //draws numbers
                   for(int x=0;x<balls[y].length;x++){ //draws all possible balls
                        g.drawString(balls[y][x].toString(), (x+1)*100, y*100); //draws letters
              do {
                   frame.repaint(); //repaints the balls when one is called
                   int x, y; //sets variables x and y as integers
                   boolean exit; //sets a boolean to the exit variable
                   do {
                        exit = false; //exit is set to false
                        x = (int)(Math.random() * 5); //picks a random number between 0 and 4 and stores it as x
                        y = (int)(Math.random() * 15); //picks a random number between 0 and 14 stores it as y
                        if (!balls[x][y].called) { //checks to see if a value is called
                             exit = true; //changes exit to true if it wasn't called
                             balls[x][y].called = true; //sets called in the Ball class to true if it wasn't called
                             System.out.println(balls[x][y]); //prints value
                   } while (!exit); //if exit is false, returns to top of loop
                   int count = 0; //sets a count for the number of balls called
                   for(int z=0;z<balls.length;z++){ //looks at balls
                        g.setColor(Color.black); //displays in black
                        g.drawString(balls[z][0].s, 0, z*100); //draws balls as a string
                        for(int a=0;a<balls[z].length;a++){ //looks at all balls
                             if (balls[z][a].called){ //if a ball is called
                                  g.setColor(Color.red); //change color to red
                                  count++; //increments count
                             } else {
                                  g.setColor(Color.black); //if it isn't called stay black
                             g.drawString(balls[z][a].toString(), (a+1)*100, y*100); //draws balls as string
                   do {
                        if (key.keyPressed == KeyEvent.VK_R||count==5*15) { //if R is pressed or count = 5*15
                             count=5*15; //changes count to 5*15
                             for(int z=0;z<balls.length;z++){ //recreates rows
                                  g.setColor(Color.black); //sets color to black
                                  g.drawString(balls[z][0].s, 0, z*100); //redraws rows
                                  for(int a=0;a<balls[z].length;a++){ //recreates columns
                                       balls[z][a] = new Ball(z, a+1); //fills array
                                       g.drawString(balls[z][a].toString(), (a+1)*100, z*100); //redraws columns
                   } while (key.keyPressed!=KeyEvent.VK_ENTER || count == 5 * 15); //determines if the key was pressed or counter is 5*15s
              } while (key.keyPressed == KeyEvent.VK_ENTER);
    public class Ball {
         String s; //initiates s that can store data type String
         int i; //initiates i that can store data as type integer
         boolean called = false; //initiates called as a boolean value and sets it to false
         public Ball(int x, int y) {
              i = (x * 15) + y; //stores number as i to be passed to be printed
              switch (x) { //based on x value chooses letter
              case 0:
                   s = "B";
                   break;
              case 1:
                   s = "I";
                   break;
              case 2:
                   s = "N";
                   break;
              case 3:
                   s = "G";
                   break;
              case 4:
                   s = "O";
         public String toString() { //overrides toString method, converts answer to String
              return s + " " + i; //returns to class bingo s and i
    }

    The javadoc of createImage() states that "The return value may be null if the component is not displayable."
    Not sure, but it may be that you need to call init() after this.setVisible(true).

  • Why do i get a null pointer exception

    import javax.swing.*;
    class Rental
         public static void main (String [] args)
            int custCounter = 0;                              // counts the customers created so far
                Customer[] customers = new Customer[100];          // creates an array of 100 customers
            DomesticAssistant[] assistants = new DomesticAssistant[3];          // creates an array of [3] domestic assistants
            assistants[0] = new DomesticAssistant("Lazy", 20, 100, 90, 300);     // creates the domestic assistant and stores it in the array at position [0]
            assistants[0].setReservedFrom(0, 0, 0);          // sets the reserved from date to zero
            assistants[0].setReservedTo(0, 0, 0);          // sets the reserved to date to zero
            assistants[1] = new DomesticAssistant("Average", 30, 150, 135, 400);     // creates the domestic assistant and stores it in the array at position [1]
            assistants[1].setReservedFrom(0, 0, 0);          // sets the reserved from date to zero
            assistants[1].setReservedTo(0, 0, 0);          // sets the reserved to date to zero
            assistants[2] = new DomesticAssistant("Excellent", 50, 250, 220, 750);     // creates the domestic assistant and stores it in the array at position [2]
            assistants[2].setReservedFrom(0, 0, 0);          // sets the reserved from date to zero
            assistants[2].setReservedTo(0, 0, 0);          // sets the reserved to date to zero
              String firstChoice = JOptionPane.showInputDialog("MAIN MENU\n--------------------\n\nPlease enter a number based on the following: \n[1] Add New Customer\n[2] Login\n[3] Exit");     // the main menu
            if(firstChoice.equals("1"))          // if the user enteres "1" in the main menu (add a new customer)
                String custName = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nName: ");     // asks for name and stores in variable custName
                   String custAddress = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nAddress: ");     // asks for sddress and stores in variable custAddress
                String custPostCode = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nPost Code: ");          // asks for post code and stores in variable custPostCode
                String custPhoneNo = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nTelephone Number: ");     // asks for phone number and stores in variable custPhoneNo
                String custEmail = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nEmail: ");          // asks for email and stores in variable custEmail
                String startingBalance = JOptionPane.showInputDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nStarting Credit: ");     // asks for credit to start account with and stores in variable startingBalance
                int sBalance = Integer.parseInt(startingBalance);          // converts startingBalance from a string into an integer
                customers[custCounter] = new Customer(custName, custAddress, custPostCode, custPhoneNo, custEmail, sBalance);     // creates a customer with the variables/details entered above
                JOptionPane.showMessageDialog(null, "NEW CUSTOMER MENU\n--------------------\n\nWelcome" + custName + ".\nYour details were sucessfully added to the system.\nYour ID number is: " + customers[custCounter].getIdNumber() + "\nYour password is: " + customers[custCounter].getPassword());     // greets the new customer as well as giving them their id number and password
                custCounter++;          // increments the customer sounter by 1
            else if(firstChoice.equals("2"))          // if the user enters "2" in the main menu (login)
                String checkIdNo = JOptionPane.showInputDialog(null, "LOGIN\n--------------------\n\nPlease enter your ID Number: ");
                int checkIdNum = Integer.parseInt(checkIdNo);// asks user to enter their id number
                int position = 0;          //variable to store where we are in the array of customers so we know which customer we are dealing with
                for(int i = 0; i < customers.length; i++)          // loops through the array of customers
    ----->      if(customers.getIdNumber() == checkIdNum)          // when the id number entered is found
                             position = i;                              // set the position variable to that customer (the position in the customers array)
    else                                             // if the id number is not found
    JOptionPane.showMessageDialog(null, "LOGIN\n--------------------\n\nThat ID Number does not exist. ");     // tell the user that the id number wasnt found
    System.exit(0);                                                                           // then exit the system
    [\code]
    Can anyone help. when i run the program i get a null pointer exception
    can you tell me why, and possibly tell me how i can search through the array of customers searching for an id number
    am i doing it a way that will work (not the best way) but just so it works
    thanks in advance
    D_H

    Nevertheless, when you get to the loop where your exception occurs, you may have created any number of customers, but probably not 100.
    The loop tries to go through all 100 spaces in the array, and as soon as it gets to a space you haven't assigned a Customer too, you'll get the exception.
    Either make sure the loop doesn't go higher than you cutomercounter - 1 (to compensate for 0-based index of array), or check if the customer[i] == null before you try to call a method on it.
    Does that make sense?
    /D

  • In windows cmd lueo used \ \ server and get to the pc but mac as done

    in windows cmd lueo used \ \ server
    and get to the pc but mac as done

    Your question (if it is one) makes no sense whatever.
    Please describe your problem in greater detail, and include details of what Mac you have and what version of OS X.

  • I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    plzzz reply to this question as soon as possible

  • When going through the download process with social monkee and getting to the point of adding it to firefox I get the following message: 'Social Monkee could not be installed because firefox cannot modify the needed file'. How can this be fixed?

    When going through the download process with social monkee and getting to the point of adding it to firefox I get the following message: 'Social Monkee could not be installed because firefox cannot modify the needed file'. How can this be fixed?

    That is usually caused by a missing unpack directive (&lt;em:unpack&gt;true&lt;/em:unpack&gt;) in the file install.rdf of that extension.
    See https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking
    -----

  • HT204266 My $25 gift card has been used once. I have tried to use it and get a message it has been redeemed. It shows I have $23.71 left. "What is the problem?

    My $25 gift card has been used once. I hav tried to use it and get a message it has been redeemed. It shows I have $23.71 left. "What is the problem"?

    What is the problem? You only redeem it once.
    If it shows $23.71, then you still have credit.  Just buy something.
    Not sure what your issue is.

  • Assets transfer using ABUMN and getting error already retired.

    Hi AA Gurus
    I have two assets and want to move to sub assets of another asset.e.g asset 201,202 to be transfered to 203-1,203-2.
    I created sub asset using AS11.I am transferring to sub assets using ABUMN. I get ever time error as "Transaction on asset 123 203-1 not possible, retirement already in document ". This asset is not retired. So I created 2 assets fresh ( doc date ,acqusition date of today to experiment ) and then created a sub asset using As11. When I tried ABUMN for transferring it came up with
    same message retirement not possible ,retirement already in doc. What is happening here ? I have checked the asset using as03 and don't see as retired ( i just created the asset ). Kindly give me some idea how to transfer two assets to sub assets of another asset.
    I have checked other similar question on forum but solution did not work for me.Kindly give me some idea why this error keep coming even though asset is not retired and created today itself to test ABUMN.
    Thanks in advance
    Satya

    Bernhard
    Here are my observation and question in itlaic .Kindly suggest me what should be done.
    Please go to Financial Accounting -> Asset Accounting -> Master data -> Specific Time-Independent Management of Organizational Units
    Not checked for any co code.
    If you set this indicator, the system manages the organizational units 'business area' and 'cost center' (and thereby 'profit center') as not time dependent in the asset master records in this company code.
    Any change to these organizational units during master data maintenance then automatically generates a transfer posting document.
    If the indicator is not set, you have to create a new asset master record, and manually transfer the entire asset, when the business area changes (and you are using business area balance sheets).
    I am doing it manually only.I don't think that there is organizationla units change is invloved.I have two assets and I am transferring it as two sub assets of a new asset ( created for this purpose only ).All the assets are of same class.
    Also, please go to Asset accounting -> Integration with GL -> Post depreciation to General Ledger -> ... -> Activate account assignment objects
    Please check if assignment object KOSTL has field "BalSh" ticked.
    No it is not ticked. Other two active and agreement are ticked.
    Account assignment objects that are relevant to the balance sheet can no longer be changed directly in the asset master record once the asset has been capitalized. Instead, such assets have to be transferred to a new asset master record to make this change.

  • Uploading CSV using browse item ( getting no data found error )

    Hi,
    i am using below procedure to upload CSV into my table.
    CSV is having null values in some places ex: 1,
    2,0.999
    3,
    4,0.696
    below procedure working fine when i am uploading CSV like : 1,0
    2,0.999
    3,0
    4,0.696.
    My table is having only two columns, and i am getting no data found error when uploading null values CSV file.
    I went through Import data in excel to database table but no use..
    Please help me on this.
    Procedure
    ===========
    DECLARE
    v_blob_data       BLOB;
    v_blob_len        NUMBER;
    v_position        NUMBER;
    v_raw_chunk       RAW(10000);
    v_char   CHAR(1);
    c_chunk_len  number := 1;
    v_line  VARCHAR2 (32767) := NULL;
    v_data_array  wwv_flow_global.vc_arr2;
    BEGIN
    -- Read data from wwv_flow_files
    select blob_content into v_blob_data  from wwv_flow_files
    where UPDATED_BY = (select max(UPDATED_BY) from wwv_flow_files where UPDATED_BY = :APP_USER)
    AND id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char :=  chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities
      v_line := substr(v_line, 1, length(v_line)-2);
       v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data
       v_data_array := wwv_flow_utilities.STRING_to_table (v_line);
    -- Insert data into target table
       EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2)
        values (:1,:2)'
        USING
          v_data_array(1),
          v_data_array(2);
          -- Clear out
       v_line := NULL;
      END IF;
    END LOOP;
    END;regards
    Chandran
    Edited by: Chandran on Sep 26, 2012 10:52 AM
    Edited by: Chandran on Sep 26, 2012 10:25 PM
    Edited by: Chandran on Sep 27, 2012 1:58 AM

    Chandran,
    You can use wwv_flow_utilities.array_element to avoid no_data_found error. The function does not raise errors. So, for the line which only have one array value when you expect 2, it may be useful.
    EXECUTE IMMEDIATE 'insert into table_name@Schema1 (col1,col2)
        values (:1,:2)'
        USING
          wwv_flow_utilities.array_element(v_data_array,1),
          wwv_flow_utilities.array_element(v_data_array,2);Regards,
    Christina

  • Example of using SAPJco and getting an IDOC

    Hello,
    I would very pleased if someone could give or point me to an example of using SAPJco to get an IDOC from SAP. (regular Java application)
    Best Regards
    4 Integration

    Hi Mike
    You could save the workflow as an application and then write a simple script that tells the application to launch multiple times.
    But you'll find it many times faster to do it the other way round, and run a looping AppleScript from a single Automator action.
    (Your iPod must be set up in disk mode.)
    set ipod_name to "Name of your iPod goes here" -- edit this line and put the name of your pod in inverted commas
    tell application "Finder" to set ipod_ready to exists disk ipod_name
    if ipod_ready then
    set text_folder to (choose folder with prompt "Choose the folder containing notes for your iPod.")
    set file_names to list folder text_folder without invisibles
    repeat with file_name in file_names
    set file_path to text_folder & file_name as string
    if file type of (info for file_path) is "TEXT" then
    tell application "Finder"
    move file file_path to folder "Notes" of disk ipod_name
    end tell
    end if
    else -- ipod not mounted
    display dialog "Mount your iPod first!" buttons {"OK"} default button 1 with icon caution giving up after 5
    end if
    Copy and paste this into a Run AppleScript action, edit to supply the name of your own ipod, and see how it goes.
    Hope this helps,
    H

  • Default sales org on selection screen using set and get parameter!!

    Hi,
    I need to default value on selection screen using SET n GET parameter...logic to be used should be:
    Sales Organisation:
    This field should be filled by default using the user parameter id VKO. (using sentence GET PARAMETER and SET PARAMETER)...
    Hope i need to write the code in initialisation and what shud b the content?
    Regards
    Gunjan

    hi,
    TABLES <table name>.
      SET PARAMETER ID VKO FIELD <tablename-fieldname>.
    call transaction 'zxx'.
    try this sample program,
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    regards,
    siva
    Message was edited by:
            Shan

  • How to use  SET and GET parameter commands ?

    Explain these two giving an example?As which is used for what?

    Hi Albert,
             SAP allows you to make use of SPA/GPA technique to fill the input fields of a called transaction with data from the calling program.SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    If you want to set SPA/GPA parameters before a program call, you need to know which parameters are linked to which fields on the initial screen. A simple way of doing this is to start the program that you want to call, place the cursor on the input fields, and choose F1 followed by Technical info. The Parameter ID field contains the name of the corresponding SPA/GPA parameter. Alternatively, you can look at the screen definition in the Screen Painter.
    The SPA/GPA parameter for the input field Company has the ID CAR. Use this method to find the IDs CON, DAY, and BOK for the other input fields.
    The following executable program is connected to the logical database F1S and calls an update transaction:
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    The basic list of the program shows fields from the database table SBOOK according to the user entries on the selection screen. These data are also stored in the HIDE areas of each line.
    Cheers
    Nishanth

Maybe you are looking for