Null pointer exception in toString!

Hi all,
i am getting null pointer exception in toString method.Might be due to threads.Can i synchronize toString?
The code snippent is as follows :
@Override
public String toString ()
if (mSourceInfo != null)
return "Source [Name=" + mSourceInfo.name + ", Description=" + mSourceInfo.description + ", Type=" + mSourceInfo.type + ", Path="
                    + ", Online=" + mSourceInfo.online + ", Acknowledged=" + mSourceInfo.acknowledged + ", Tags=" + mSourceInfo.tags
                    + ", Dimension:width=" + mSourceInfo.width + ", height=" + mSourceInfo.height + "SourceId=" + mSourceInfo.sourceId;
else
return "Source [Id=" + mObjectId + "]";
}

Sourav-Sipani wrote:
Make the following change:No! Don't! Sorry to say that, but this suggestion is bullshit.
1. there is no String constructor that takes any object.
2. sourceInfo definitely is not a String!
3. there is almost never a reason to use the String constructor that takes only a String (if you where trying to do that).
The correct solution would look something like this:
public String toString ()
     // Get a local copy of this object so that the
     // entire method is isolated from any changes
     // in the global object
     TypeOfSourceInfo tempSource = mSourceInfo;
     if (tempSource != null)
          return "Source [Name=" + tempSource.name + ", Description=" + tempSource.description + ", Type=" + tempSource.type + ", Path="
          + ", Online=" + tempSource.online + ", Acknowledged=" + tempSource.acknowledged + ", Tags=" + tempSource.tags
          + ", Dimension:width=" + tempSource.width + ", height=" + tempSource.height + "SourceId=" + tempSource.sourceId;
     else
          return "Source [Id=" + mObjectId + "]";
}Btw, it seems that the type of mSourceInfo should have a toString, which you could simply call here. Your code seems to do stuff that that Class should be doing instead.

Similar Messages

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • Null pointer exception while inserting a new row in ADF with jdev

    Hi,
    In ADF, I have retrieved some user information from LDAP server and I want to insert those values in to my table. But when I do this, I am getting a null pointer exception when I get the view object (ViewObject vo=getCRUIP002_1();). I am not sure why this happens.
    Here is my code. It is urgent.
    and please some one help me in fixing the issue.
    ViewObject vo=getCRUIP002_1();
    vo.clearCache();
    vo.setMaxFetchSize(0);
    vo.executeQuery();
    Row newRow=vo.createRow();
    vo.insertRow(newRow);
    SearchResult res = (SearchResult)results.next();
    Attributes attrs = res.getAttributes();
    // Row newRow = vo.getCurrentRow();
    newRow.setAttribute("LOGINNAME",(Object)attrs.get("sn").get().toString());
    newRow.setAttribute("PASSWORDVALUE","x");
    newRow.setAttribute("FIRSTNAME",(Object)attrs.get("sn").get().toString());
    newRow.setAttribute("LASTNAME",(Object)attrs.get("sn").get().toString());
    newRow.setAttribute("EMAIL",(Object)attrs.get("mail").get().toString());
    Thanks,
    Priya.S

    assuming ur jdev version is 10.1.2
    ViewObject vo=getCRUIP002_1();i dont think ur getting the view object hence null pointer expception.
    ViewObject vo = findViewObject("MyView1");
    if u r in the object class then first get the root application module and then access the View obejct from there.
    In ADF if u assign a null value, u will always get the null pointer exception coz of java. Run the app in debug mode and check the values step by step, by the way there is not exception handling in ur code either, Do u know how to debug in Jdev ?
    zaibi.

  • 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).

  • Java Null Pointer Exception- Business Validation In AM

    Hi, I have been tried cracking this validation issue, tried several combinations. But does not work and throw java null pointer exception. I would appreciate if somebody can point where I am going wrong on the code. Thanks ahead.
    Below is the issue:-
    I have a page with PO (blanket purchase order) header info, and a PO line info with additional empty columns (related to Blanket Release). When the user fills in one of the columns (release amount, rls_amt_i), then I need to validate this against remaining blanket amount ie.{ PO_amt - (po_rls_amt1 + po_rls_amt2+..)}. If rls_amt_i is <= remaining amount, then the release needs to get created, otherwise shouldn't. I know, this is a pretty normal requirement. Please check my code to see where I could be wrong.
    ReleaseCO (in PFR):-
    if (pageContext.getParameter("Apply") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("CxPoReleaseVO1");
    Number poHeaderId = (Number)vo.getCurrentRow().getAttribute("PoHeaderId");
    String poNumber = (String)vo.getCurrentRow().getAttribute("PoNumber");
    OAViewObject linesVO = (OAViewObject)am.findViewObject("CxPoReleaseLinesVO1");
    Number lineAmt = (Number)linesVO.getCurrentRow().getAttribute("Amount");
    Serializable [] params = {poHeaderId.toString(), poNumber, lineAmt.toString()};
    am.invokeMethod("apply", params);
    ReleaseAM:-
    public void apply(String poheaderId, String poNumber, String lineAmt)
    Number blanketAmt, totalreleasesAmt, lineRlsAmt;
    try
    { lineRlsAmt = new Number(lineAmt.trim());}
    catch(Exception e) { throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER"); }
    totalreleasesAmt = getReleasesAmt(poheaderId);
    blanketAmt = getBlanketAmt(poNumber);
    if ((lineRlsAmt.intValue() - (blanketAmt.intValue()-totalreleasesAmt.intValue())) <= 0)
    getTransaction().commit();
    approve();
    throw new OAException("The amount is less than the remaining release amt", OAException.INFORMATION);
    } // end apply()
    public Number getReleasesAmt (String poHeaderId)
    CxTotalReleaseQuantityVVOImpl totalreleaseqtyVO = getCxTotalReleaseQuantityVVO1(); //vo to get TotalReleased Amount
    Number poHeadNum = null;
    Number totalqty;
    try { poHeadNum = new Number(poHeaderId); }
    catch (Exception e) { throw OAException.wrapperException(e); }
    totalreleaseqtyVO.initQuery(poHeadNum);
    CxTotalReleaseQuantityVVORowImpl row = null;
    row = (CxTotalReleaseQuantityVVORowImpl)totalreleaseqtyVO.getCurrentRow();
    try { totalqty = (Number)row.getQuantityReleased();}
    catch (Exception e) { throw new OAException(e.getMessage()); }
    if(totalqty != null)
    { return totalqty;  }
    else
    { throw new OAException ("exception occurred", OAException.ERROR);  }
    public Number getBlanketAmt (String poNumber)
    Number blanketAmt;
    CxBlanketAmtVOImpl blanketVO = (CxBlanketAmtVOImpl) getCxBlanketAmtVO1(); //VO to get total amount on the BlanketPO.
    blanketVO.initQuery(poNumber);
    Row row = blanketVO.getCurrentRow();
    blanketAmt = (Number)row.getAttribute("Quantity"); //gets the blanket amt
    if( blanketAmt != null ) {
    return blanketAmt ; }
    else { throw new OAException ("exception occurred", OAException.ERROR);   }
    ---------The code breaks at the line where I try to get "totalqty" or "blanketAmt" .. It throws a java nullpointer exception.
    Thanks for helping me out.
    -Vikram

    Hi Sumit,
    Thanks for replying. Here is the error stack.
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:749)
         at netflix.oracle.apps.nflix.p2p.po.webui.NfCreateReleaseCO.processFormRequest(NfCreateReleaseCO.java:115)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at OA.jspService(OA.jsp:34)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.NullPointerException
         at netflix.oracle.apps.nflix.p2p.po.server.NfReleaseCreateAMImpl.getReleasesAmt(NfReleaseCreateAMImpl.java:642)
         at netflix.oracle.apps.nflix.p2p.po.server.NfReleaseCreateAMImpl.apply(NfReleaseCreateAMImpl.java:302)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:749)
         at netflix.oracle.apps.nflix.p2p.po.webui.NfCreateReleaseCO.processFormRequest(NfCreateReleaseCO.java:115)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at OA.jspService(OA.jsp:34)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.NullPointerException
         at netflix.oracle.apps.nflix.p2p.po.server.NfReleaseCreateAMImpl.getReleasesAmt(NfReleaseCreateAMImpl.java:642)
         at netflix.oracle.apps.nflix.p2p.po.server.NfReleaseCreateAMImpl.apply(NfReleaseCreateAMImpl.java:302)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:749)
         at netflix.oracle.apps.nflix.p2p.po.webui.NfCreateReleaseCO.processFormRequest(NfCreateReleaseCO.java:115)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at OA.jspService(OA.jsp:34)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    The code breaks at the line 642: totalqty = (Number)row.getQuantityReleased();
    I had already taken care of the null value in the VO sql query by using nvl(sum(release_amount), 0).. .so it should return atleast 0, if its null. But it returns "null" all the time.
    I dont understand why its doing that. When I run the sql backend the query works fine and returns 0,even when there are no prior releases on the PO.
    Thanks,
    Vikram

  • Java null pointer exception

    Hey guys,
    Im having a problem with the following code:
        public void testVariable(Object a, Object b)
            if(a!=null || b!=null)
                Object reta = null;
                Object retb = null;
                String tempa = null;
                String tempb = null;
                if(a.toString() !=null && b.toString() !=null)    <---- Null pointer exception
                    tempa = a.toString();
                    tempb = b.toString();
                    tempa = tempa.toLowerCase();
                    tempb = tempb.toLowerCase();
                }Im getting a null pointer exception when i do that if statement, ive narrowed it down and found that that was the problem but I have no idea why?
    any suggestions ?

    if (a!=null || b!=null)...If a is not null, OR b is not null, do the following statements.
    if( a.toString() !=null && b.toString() !=null ) ...Perform an operation on a, converting it to a string. This will throw a null pointer exception if a is null. If we survive that, see if the resulting string is null (toString methods should never return null here in fact).
    Perform an operation b, converting it to a a string. This will throw a null pointer exception if b is null. If we survive that, see if the resulting string is null (toString methods should never return null here in fact).
    So if either a or b is null, but the other one isn't, you will get a null pointer exception.
    Edited by: dcminter on 27-Apr-2008 17:51

  • Module Null pointer exception

    Hi,
    I am having a problem with my module written for Enhancing functionality of file adapter.My module validates a input file for a particular record presence and if that record is present it would be processed normally by XI system.
    But in case, if the input file doesn't contain the particular record the module is supposed to throw an exception and process shuld terminate.In this case XI shuldn't process the input file.
    But in second case(File not containing the record) I am getting Null pointer exception in adapter monitor.Unable to see any message in auditlog since input file is not being read by file adapter.
    My code is like this:
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
              throws ModuleException {
              // TODO Auto-generated method stub
              //Declarations
              Message mes = null;
              XMLPayload xmlData = null;
              DocumentBuilderFactory docBuilderFactory = null;
              DocumentBuilder docBuilder = null;
              Document doc = null;
              AuditMessageKey amk = null;
              boolean flag = false;
              // Fetch the Message Data from Module Data
              mes = (Message) inputModuleData.getPrincipalData();
              // For Audit Log Fetch the Audit Message key from the message.
              amk = new AuditMessageKey(mes.getMessageId(), AuditDirection.OUTBOUND);
              Audit.addAuditLogEntry(amk,     AuditLogStatus.SUCCESS, "Amex Validation Module called");
              xmlData = mes.getDocument();
              InputStream instr = xmlData.getInputStream();
              docBuilderFactory = DocumentBuilderFactory.newInstance();
              try {
                   docBuilder = docBuilderFactory.newDocumentBuilder();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   Audit.addAuditLogEntry(amk,     AuditLogStatus.ERROR, "Document Builder Factory not generated Properly");
              try {
                   doc = docBuilder.parse(instr);
              } catch (SAXException e1) {
                   // TODO Auto-generated catch block
                   Audit.addAuditLogEntry(amk,     AuditLogStatus.ERROR, "Document Not generated Properly, SAX Exception called, May Data contains Error");
              } catch (IOException e1) {
                   // TODO Auto-generated catch block
                   Audit.addAuditLogEntry(amk,     AuditLogStatus.ERROR, "Document Not generated Properly, Input/Output Error");
              NodeList record = doc.getElementsByTagName("Recordset");
              for (int k = 0; k < record.getLength(); k++) {
                   Node recordnode = record.item(k);
                   NodeList list_rec = recordnode.getChildNodes();
                   for (int l = 0; l < list_rec.getLength(); l++) {
                        String headnodename =
                             list_rec.item(l).getNodeName().toString();
                        if (headnodename.equals("itemType9"))  {
                               flag = true;
              if (flag == true)
                   Audit.addAuditLogEntry(amk,     AuditLogStatus.SUCCESS, "Record Type 9 present in the file, Successfully Processed");
              else{
                   Audit.addAuditLogEntry(amk,     AuditLogStatus.ERROR, "Record Type 9 not present in the file, Not process further");
                   //throw exception
                   ModuleException e = new ModuleException();
                   throw(e);               
              return inputModuleData;

    Are you sure the following statement is going to work always ?
    NodeList record = doc.getElementsByTagName("Recordset");
    In case there are no nodes by the name <b>Recordset</b>, the very next block of code will throw a NullPointerException at the line
    for (int k = 0; k < record.getLength(); k++) {
    because, if record is null, record.getLength() would not work and throw NLP.

  • Custom Schedule Task ( Null Pointer Exception)

    Hi All,
    I had written Custom Schedule task: Below is the code
    When i run the Schedule task it is failing throwing Null Pointer Exception. the code is not able to fetch userId ,passwordex and passwordwar values in execute method. please help me
    package oracle.iam.sample.notification;
    import java.sql.Date;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import oracle.iam.identity.exception.NoSuchUserException;
    import oracle.iam.identity.exception.UserLookupException;
    import oracle.iam.identity.usermgmt.api.UserManager;
    import oracle.iam.identity.usermgmt.vo.User;
    import oracle.iam.notification.api.NotificationService;
    import oracle.iam.notification.exception.EventException;
    import oracle.iam.notification.exception.MultipleTemplateException;
    import oracle.iam.notification.exception.NotificationException;
    import oracle.iam.notification.exception.NotificationResolverNotFoundException;
    import oracle.iam.notification.exception.TemplateNotFoundException;
    import oracle.iam.notification.exception.UnresolvedNotificationDataException;
    import oracle.iam.notification.exception.UserDetailsNotFoundException;
    import oracle.iam.notification.vo.NotificationEvent;
    import oracle.iam.platform.Platform;
    import oracle.iam.platform.authz.exception.AccessDeniedException;
    import oracle.iam.scheduler.vo.TaskSupport;
    import static oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName.MANAGER_KEY;
    import static oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName.USER_LOGIN;
    import oracle.iam.platform.kernel.vo.Orchestration;
    public class PasswordExpiry extends TaskSupport {
    public PasswordExpiry() {
    super();
    public void execute(HashMap taskParameters) {
    System.out.println("inside the Execute methode");
    System.out.println("Schedule task Arguments "+taskParameters);
    String userId = (String)taskParameters.get("User Login");
    System.out.println("===========input=============== "+userId);
    String passwordex=taskParameters.get("usr_pwd_expire_date").toString();
    System.out.println("===========input=============== "+passwordex);
    String passwordwar=taskParameters.get("usr_pwd_warn_date").toString();
    System.out.println("===========input=============== "+passwordwar);
    try {
    System.out.println("inside the Try block");
    NotificationService notService = Platform.getService(NotificationService.class);
    NotificationEvent eventToSend = this.createNotificationEvent(userId, passwordex,passwordwar);
    notService.notify(eventToSend);
    } catch (Exception e) {
    e.printStackTrace();
    private NotificationEvent createNotificationEvent(String userKey, String passwordex,
    String passwordwar) throws NoSuchUserException, UserLookupException,
    AccessDeniedException {
    NotificationEvent event = new NotificationEvent();
    //get user IDs to whom notification is to be sent and set it in the
    //event object being created
    String[] receiverUserIds= getRecipientUserIds(userKey);
    event.setUserIds(receiverUserIds);
    //Set template name to be used to send notification for this event
    event.setTemplateName("PasswordWarningNotificationTemplate");
    //Setting senderId as null here and hence default sender ID would
    //get picked up
    event.setSender(null);
    //Create a map with key value pair for the parameters declared at time
    //of configuring notification event
    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("usr_key", userKey);
    map.put("usr_pwd_warn_date", passwordex);
    map.put("usr_pwd_expire_date",passwordwar);
    event.setParams(map);
    return event;
    private String[] getRecipientUserIds(String userKey) throws NoSuchUserException,
    UserLookupException, AccessDeniedException {
    UserManager usrMgr = Platform.getService(UserManager.class);
    User user = null;
    String userId = null;
    Set<String> userRetAttrs = new HashSet<String>();
    //Sending notification to both the user and his/her manager
    userRetAttrs.add(MANAGER_KEY.getId());
    userRetAttrs.add(USER_LOGIN.getId());
    User manager = null;
    String managerId = null;
    String managerKey = null;
    Set<String> managerRetAttrs = new HashSet<String>();
    managerRetAttrs.add(USER_LOGIN.getId());
    //Retrieving User ID
    user = usrMgr.getDetails(userKey, userRetAttrs, false);
    userId = user.getAttribute(USER_LOGIN.getId()).toString();
    List<String> userIds = new ArrayList<String>();
    userIds.add(userId);
    if (user.getAttribute(MANAGER_KEY.getId()) != null) {
    managerKey = user.getAttribute(MANAGER_KEY.getId()).toString();
    manager = usrMgr.getDetails(managerKey, managerRetAttrs, false);
    //Retrieving User's Manager ID
    managerId = manager.getAttribute(USER_LOGIN.getId()).toString();
    userIds.add(managerId);
    //To return String[] than an Object array
    String[] recipientIDs = userIds.toArray(new String[0]);
    return recipientIDs;
    * Call notification Engine passing an event object to it
    * @param event
    * @throws NotificationException
    private void sendNotification(NotificationEvent event) throws NotificationException {
    try {
    //Call notify method of NotificationService to pass on the event
    //to notification engine
    NotificationService notificationService = Platform.getService(
    NotificationService.class);
    notificationService.notify(event);
    } catch (EventException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (UnresolvedNotificationDataException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (TemplateNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (MultipleTemplateException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (NotificationResolverNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (UserDetailsNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (NotificationException e){
    throw e;
    public HashMap getAttributes() {
    return null;
    public void setAttributes() {}
    Thank you

    The task parameters passed into a scheduled job are the parameters defined for the scheduled task definition in the metadata xml and configured in the scheduled job. They are not the data of an individual user as you seem to be trying to get. In a scheduled task I would expect some sort of search for users to operate on.

  • Null Pointer Exception while reading inbox

    Hi Experts
    I am getting the Null Pointer Exception when I execute the following code. Can anybody please suggest where i am going wrong.
      public void readInbox( )
        //@@begin readInbox()
         while (! wdContext.nodeEmail().isEmpty()) {
              wdContext.nodeEmail().removeElement(wdContext.nodeEmail().getElementAt(0) );
         wdContext.nodeEmail().invalidate();   
         Message[] message = new Message[1000];
         IPublicEmailInteractiveFormComp.IEmailElement newEmailNodeElement;
         //Set properties
         // @TODO Enter your email server address here by replacing the text in angle brackets.
         String host = "otemail.otegroup.com";
         // @TODO Enter your email account here by replacing the text in angle brackets.
         String username = "[email protected]";
         // @TODO Enter your email account password here by replacing the text in angle brackets.
         String password = "password";
         Properties props = new Properties();     
         props.put("mail.smtp.host", host);
         //Set Session
         Session session = Session.getInstance(props, null);
         //Set the store
         try {
              Store store = session.getStore("imap");
              store.connect(host,username,password);
              //Get folder
              Folder folder = store.getFolder("INBOX");
              folder.open(Folder.READ_ONLY);
              //Get Mails
              message = folder.getMessages();
              //Fill table with mails
              for (int i = 0; i < message.length; i++)
                   if (message<i>.isSet(Flags.Flag.SEEN) == false)
                        if (message<i>.getSubject().equals("Travel Request Form"))
                             newEmailNodeElement = wdContext.createEmailElement();                 
                             newEmailNodeElement.setFrom(message<i>.getFrom()[0].toString());
                             newEmailNodeElement.setSubject(message<i>.getSubject());
                             newEmailNodeElement.setSentDate(message<i>.getSentDate().toString());
                             //Check for right Attachment
                             Object content = message<i>.getContent();
                             if ( content != null  && content instanceof Multipart)
                                  for (int j = 0 , n = ((Multipart)content).getCount(); j < n; j++)
                                       Part part = ((Multipart)content).getBodyPart(j);
                                       String disposition = part.getDisposition();
                                       if ( disposition != null && (disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE)))
                                            if (part.getFileName().equals("TravelRequest.pdf"))
                                                 newEmailNodeElement.setAttachment(true);
                                                 newEmailNodeElement.setContentType(part.getContentType().toString());
                                                 InputStream is = part.getInputStream();
                                                 ByteArrayOutputStream bo = new ByteArrayOutputStream();                                                                                
                                                 int c;
                                                 while ((c = is.read()) > -1) bo.write(c);
                                                 byte[] pdfSource = bo.toByteArray();
                                                 newEmailNodeElement.setPdfSource(pdfSource);
                                                 break;     
                                            else
                                                 newEmailNodeElement.setAttachment(false);     
                             wdContext.nodeEmail().addElement(newEmailNodeElement);
              //Close connection
              folder.close(true);
              store.close();          
         catch (MessagingException e)
              wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
              e.printStackTrace();
         catch (IOException e)
              wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
              e.printStackTrace();
         catch (NullPointerException e)
              wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
              e.printStackTrace();
        //@@end
    Regards
    Abdullah

    The error was caused when the subject used to return null

  • Select Many choice list gives null pointer exception in the value listener method

    I have a Select Many Choice component in my page and  I have a method assigned as a value change listener. When ever I select a single value or multiple values I am getting a null pointer exception.
    <MessageFactory> <getMessage>
    java.lang.NullPointerException
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findIndexFromObject(FacesCtrlListBinding.java:390)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.setInputValue(FacesCtrlListBinding.java:449)
        at oracle.jbo.uicli.binding.JUCtrlValueBinding.put(JUCtrlValueBinding.java:2546)
        at oracle.jbo.uicli.binding.JUCtrlListBinding.put(JUCtrlListBinding.java:3437)
        at javax.el.MapELResolver.setValue(MapELResolver.java:229)
        at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:255)
        at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:281)
        at com.sun.el.parser.AstValue.setValue(Unknown Source)
        at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
        at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:361)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:311)
        at Reportview.backing.Report_v1.onRegionSelect(Report_v1.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(Unknown Source)
        at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:144)
        at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:243)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:405)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Can someone tell me why this error occurs.My method is like this -
    public void onSelect(ValueChangeEvent event) {
    event.getComponent().processUpdates(FacesContext.getCurrentInstance());
    String[] s = (String[])event.getNewValue();
    System.out.println("Value changed value change ==>> "+s.length+"===>>"+Arrays.toString(s));

    Do you get the same results if you try queuing the event to happen after the model update?
    // Requeue the event so that it happens after the model update
        if (!PhaseId.INVOKE_APPLICATION.equals(valueChangeEvent.getPhaseId())) {
    valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
    valueChangeEvent.queue();
        } else {     
         String[] s = (String[])event.getNewValue();
        System.out.println("Value changed value change ==>> "+s.length+"===>>"+Arrays.toString(s));

  • Null pointer Exception in Standard Controller Extension

    Hi All,
    I extend the controller, The controller is related to two Standard pages.
    My code is working fine for one controller, but where as for the other page it throws an error null pointer exception.
    Please help me as this is very urgent issue.
    My code is as follows:
    // This Controller is used to display Item Description and manufacturer name, which is extended from Standard Controller EgoItemDetailPageLayoutCO
    package oracle.apps.eng.changemgmt.webui;
    import com.sun.java.util.collections.ArrayList;
    import com.sun.java.util.collections.HashMap;
    import java.io.IOException;
    import java.io.Serializable;
    import java.net.URLEncoder;
    import java.util.Dictionary;
    import java.util.Vector;
    import oracle.apps.eng.changemgmt.nir.util.DisplayUtils;
    import oracle.apps.eng.changemgmt.util.*;
    import oracle.apps.eng.changemgmt.util.server.ActionServerUtil;
    import oracle.apps.eng.changemgmt.util.webui.ChangeRouteUIUtil;
    import oracle.apps.eng.changemgmt.util.webui.EngChangeUtil;
    import oracle.apps.eng.util.server.WorkflowUtil;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.OAImageBean;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OAFormValueBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.layout.*;
    import oracle.apps.fnd.framework.webui.beans.message.*;
    import oracle.apps.fnd.framework.webui.beans.nav.*;
    import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
    import oracle.apps.fnd.framework.webui.beans.OAFormattedTextBean;
    import oracle.cabo.ui.BaseMutableUINode;
    import oracle.cabo.ui.UIConstants;
    import oracle.cabo.ui.beans.*;
    import oracle.cabo.ui.beans.form.SubmitButtonBean;
    import oracle.cabo.ui.beans.form.TextInputBean;
    import oracle.cabo.ui.beans.layout.*;
    import oracle.cabo.ui.beans.message.MessageBoxBean;
    import oracle.cabo.ui.beans.message.MessageStyledTextBean;
    import oracle.cabo.ui.beans.nav.LinkBean;
    import oracle.jbo.*;
    import oracle.jbo.domain.Number;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import oracle.apps.ego.item.eu.util.EgoItemContext;
    import oracle.apps.ego.item.eu.util.EgoOrganizationContext;
    import oracle.apps.fnd.framework.OAApplicationModule;
                   public class XXNRChangeDetailPageEXTCO extends ChangeDetailPageCO
                        public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
                             super.processRequest(oapagecontext, oawebbean);
                             XXNRchangeDetailIncontext(oapagecontext,oawebbean);
                   public void XXNRchangeDetailIncontext(OAPageContext oapagecontext,OAWebBean oawebbean)
                             int x=2;
                   int y=3;
                                  EgoItemContext egoitemcontext = EgoItemContext.getItemContextObject(oapagecontext);
                                  OAApplicationModule am=oapagecontext.getApplicationModule(oawebbean);
                             EgoOrganizationContext egoorganizationcontext = EgoOrganizationContext.getOrganizationContextObject(oapagecontext);
                                  int invitemid=egoitemcontext.getItemId();
                             int organizationid=egoorganizationcontext.getOrganizationId();
                             StringBuffer stringbuffer = new StringBuffer();
                             String s = EngChangeUtil.getItemPageContextFlag(oapagecontext);
                             OAPageLayoutBean oapagelayoutbean = oapagecontext.getPageLayoutBean();
                                  String manufacturer=XXNRgetManufactuer(am,invitemid,organizationid);
                   String s1 = null;
                   String s2 = "";
                   String s3 = EngChangeUtil.getChangeNumber(oapagecontext) != null ? EngChangeUtil.getChangeNumber(oapagecontext) : "";
                             if(EngChangeUtil.getChangeName(oapagecontext) != null)
                                  EngChangeUtil.getChangeName(oapagecontext);
                             if(EngChangeUtil.getItemNumber(oapagecontext) != null)
                                  EngChangeUtil.getItemNumber(oapagecontext);
                   String s4 = EngChangeUtil.getOrgCodeContext(oapagecontext) != null ? EngChangeUtil.getOrgCodeContext(oapagecontext) : "";
                   String s5 = EngChangeUtil.getOrgNameContext(oapagecontext) != null ? EngChangeUtil.getOrgNameContext(oapagecontext) : "";
                   String s6 = EngChangeUtil.getOrgIdContext(oapagecontext) != null ? EngChangeUtil.getOrgIdContext(oapagecontext) : "";
                             if(!"Y".equals(s))
                                  if(s3 != null && !s3.trim().equals(""))
                                            s1 = "NORMAL";
                                            s2 = "<b>" + EngChangeUtil.getOriginalChangeMgmtTypeName(oapagecontext) + ": " + s3 + "</b>";
                                       } else
                                                 s1 = "CREATE";
                   String s7 = "<b>" + oapagecontext.getMessage("ENG", "ENG_ORGANIZATION_TEXT", null) + ": " + s5 + " (" + s4 + ")</b>";
                   if(!"-1".equals(s6) && !"".equals(s4) && !"Y".equals(s))
    //StringBuffer stringbuffer = new StringBuffer();
                   if(s1 != null && !s1.equals("CREATE"))
                             stringbuffer.append(s2 + "<br>");
                             if(egoitemcontext != null)
                             stringbuffer.append("<b>");
                             stringbuffer.append(oapagecontext.getMessage("EGO", "EGO_ITEM", null));
                             stringbuffer.append(": ");
                             stringbuffer.append(egoitemcontext.getItemNumber());
                             stringbuffer.append("  ");
                             stringbuffer.append(oapagecontext.getMessage("EGO", "EGO_REVISION_CODE", null));
                             stringbuffer.append(": ");
                             stringbuffer.append(egoitemcontext.getRevisionLabel());
                             stringbuffer.append("</b><br>");          
                             if(x==2)
                                            stringbuffer.append(oapagecontext.getMessage("EGO", "EGO_ITEM_DESC", null));
                                  stringbuffer.append(": ");
                                  stringbuffer.append(egoitemcontext.getItemDescription());
                                  stringbuffer.append("</b><br>");
                             if(y==3)
                             stringbuffer.append("<b>");
                             stringbuffer.append(oapagecontext.getMessage("EGO", "EGO_MANUFACTURER", null));
                             stringbuffer.append(": ");
                             stringbuffer.append(manufacturer);
                             stringbuffer.append("</b><br>");
                                  stringbuffer.append(s7+"<br>");
              OAFormattedTextBean oaformattedtextbean = (OAFormattedTextBean)createWebBean(oapagecontext, "FORMATTED_TEXT_BEAN");
              oaformattedtextbean.setCSSClass("OraTipLabel");
              oaformattedtextbean.setText(stringbuffer.toString());
              oapagelayoutbean.setInContextBranding(oaformattedtextbean);
              return;     
                        OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
                        if(oaapplicationmodule.getOADBTransaction().getResponsibilityApplicationId() == 242 && s2 != null && !"".equals(s2))
                             OAFormattedTextBean oaformattedtextbean1 = (OAFormattedTextBean)createWebBean(oapagecontext, "FORMATTED_TEXT_BEAN");
                             oaformattedtextbean1.setStyleUsage("inContextBranding");
                             oaformattedtextbean1.setText(s2);
                             oapagelayoutbean.setInContextBranding(oaformattedtextbean1);
                   public String XXNRgetManufactuer(OAApplicationModule am,int invitemid ,int organizationid)
                        String manufacturer=null;
                             try
                                  PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement("Select XXNRgetManufacturer(?,?) from dual");
                                  ps.setInt(1,invitemid);
                                  ps.setInt(2,organizationid);
                                  ResultSet rs=ps.executeQuery();
                                  while (rs.next())
                             manufacturer=rs.getString(1);
              catch(SQLException e)
                   e.printStackTrace();
    return manufacturer;
    My Error is as follows:
    java.lang.NullPointerException
         at oracle.apps.eng.changemgmt.webui.XXNRChangeDetailPageEXTCO.XXNRchangeDetailIncontext(XXNRChangeDetailPageEXTCO.java:65)
         at oracle.apps.eng.changemgmt.webui.XXNRChangeDetailPageEXTCO.processRequest(XXNRChangeDetailPageEXTCO.java:55)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:389)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
         at oa_html._OA._jspService(_OA.java:82)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175)
         at oa_html._OA._jspService(_OA.java:92)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
         at oracle.jsp.JspServlet.service(JspServlet.java:148)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:595)
    Thanks and Regards
    Zaheer

    Hi,
    Can you paster your error log here, also during which execution flow are you getting the error.
    Thanks,
    Ankul

  • JTextArea, getText, and Null pointer exception

    Hi, I am having trouble figuring out why i get a null pointer exception when i call
    ta = theGUI.AbName_TA;
    ta.getText();does anyone have any ideas as to what the problem is?
    (NOTE: i am somewhat new to java, and am DEFINITELY new to swing. so, if there is a better way to go about the stuff that i'm trying to accomplish, PLEASE feel free to offer suggestions.)
    Thanks, Kim
    Code for GUI_CreateAntibody
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.*;
    public class GUI_CreateAntibody implements ActionListener
         private String AntibodyName;
         private TheDBInterface3 TheInterface2 = new TheDBInterface3();
         private JTextArea ta;
         GUI_CreateAntibody_Sketcher theGUI = new GUI_CreateAntibody_Sketcher();
         public static void main (String[] args) {
              System.out.println("In Main");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              atry.init();
         protected void init () {
              System.out.println("In init");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              theGUI.init();
              theGUI.button1.addActionListener(atry);
              System.out.println("added the actionlistener");
              System.out.println(theGUI.button1.toString());
         public void CloseWindow() {
              theGUI.window.dispose();
         public void actionPerformed(ActionEvent e) {
              System.out.println("In actionPerformed");
              Object source = e.getSource();
              System.out.println(source.toString());
              System.out.println("");
         //     System.out.println(theGUI.button1.toString());
         //     if (source == theGUI.button1) {
                   System.out.println("BUTTON1 WAS PRESSED");
                   ta = theGUI.AbName_TA;
                   ta.getText();
                   // String name = theGUI.AbName_TA.getText();
                   System.out.println("hi");
                   //TheInterface2.CreateAb(name);
                   //GUI_AddingAntibody AddingAb = new GUI_AddingAntibody();
                   //AddingAb.init();
                   //CloseWindow();
    Code for GUI_CreateAntibody_Sketcher
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class GUI_CreateAntibody_Sketcher implements WindowListener
         public JTextArea AbName_TA;          
         public JButton button1;
         String currentPattern;
         String[] patternExamples = {
                     "Yes",
                     "No",
         JComboBox patternList;
         JLabel result;
         JComboBox AbList;
         public void init ()
              window  = new SketchFrame("GUI_CreateAntibody_Sketcher");     // create the application window
              Toolkit theKit = window.getToolkit();     // get the window toolkit
              Dimension wndSize = theKit.getScreenSize();     //     get screen size
              double xPosition = 200;
              double yPosition = 200;
              double xSize = 200;
              double ySize = 200;
              window.setBounds((int) xPosition, (int) yPosition,
                                   (int) xSize, (int) ySize);
              theApp.window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              GridBagLayout gridbag = new GridBagLayout();     // create a layout manager
              GridBagConstraints constraints = new GridBagConstraints();
              JPanel contentPane  = new JPanel();
              theApp.window.getContentPane().setLayout(gridbag); // set the container layout mgr
              contentPane.setBorder(BorderFactory.createCompoundBorder(
                                  BorderFactory.createMatteBorder(
                                                  1,1,2,2,Color.black),
                                  BorderFactory.createEmptyBorder(5,5,5,5)));
            constraints.fill = GridBagConstraints.BOTH;
            constraints.gridy = 0;
            constraints.gridx = 1;
            constraints.insets = new Insets(10,0,10,10);
            JLabel l = null;
            l = new JLabel("Add Antibody");
            l.setFont(new Font("Serif", Font.BOLD + Font.ITALIC, 18));
            gridbag.setConstraints(l, constraints);
            contentPane.add(l);
              window.getContentPane().add(l);
         /////// Antibody Name
            constraints.gridy = 2;
            JLabel AbLabel = null;
            AbLabel = new JLabel("Antibody Name:");
            AbLabel.setFont(new Font("Serif", Font.BOLD, 12));
             AbName_TA = new JTextArea();
            AbName_TA.setEditable(true);
            JScrollPane AbName_ScrollPane = new JScrollPane(AbName_TA);
            JPanel AbPanel = new JPanel();
            gridbag.setConstraints(AbPanel, constraints);
            AbPanel.setLayout(new BoxLayout(AbPanel, BoxLayout.Y_AXIS));
            AbPanel.add(AbLabel);
            AbPanel.add(AbName_ScrollPane);
            window.getContentPane().add(AbPanel);
         /////// SET CONSTRAINTS AND ADD BUTTON
         /////// Pressing button will indicate that you have
         /////// entered the Ab name
              // set constraints and add button     
              constraints.gridy = 7;          
              String label = "Enter the Antibody";     
              button1 = new JButton(label);
              addButton(button1, constraints, gridbag);
              window.setVisible(true);      
         public void windowClosing(WindowEvent e)
              window.dispose();
              System.exit(1);
         public void windowOpened(WindowEvent e) { }
         public void windowClosed(WindowEvent e) { }
         static void addButton(JButton button, GridBagConstraints constraints, GridBagLayout layout)
              // create a border object using a BorderFactory method
              // Border edge = BorderFactory.createRaisedBevelBorder();
              Border edge = BorderFactory.createRaisedBevelBorder();
              Color LightBlue = new Color(180,180,255);
              button.setBorder(edge);
              button.setFont(new Font("Times", Font.ITALIC + Font.BOLD, 14));
              button.setBackground(LightBlue);
              layout.setConstraints(button, constraints);
              window.getContentPane().add(button);           
         public void windowIconified(WindowEvent e) {}
         public void windowDeiconified(WindowEvent e) {}
         public void windowActivated(WindowEvent e) {}
         public void windowDeactivated(WindowEvent e) {}
         public static SketchFrame window;
         public static GUI_CreateAntibody_Sketcher theApp;
    }

    I changed my "actionPerformed" function a bit.
    Thanks for your comments - I hadn't realized some mistakes I had made while trying to fix my code.
    I'm still getting a null pointer exception, though.
    Also, in the main function of GUI_CreateAntibody, I call init for GUI_CreateAntibody. Within THIS init function I call init for GUI_CreateAntibody_Sketcher. I don't understand what is wrong with this (except that I suppose I should be using constructors as opposed to init functions.)
    Thanks,
    Kim
    Code for GUI_CreateAntibody
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.*;
    public class GUI_CreateAntibody implements ActionListener
         private String AntibodyName;
         private TheDBInterface3 TheInterface2 = new TheDBInterface3();
         private JTextArea ta;
         GUI_CreateAntibody_Sketcher theGUI = new GUI_CreateAntibody_Sketcher();
         public static void main (String[] args) {
              System.out.println("In Main");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              atry.init();
         public void init () {
              System.out.println("In init");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              theGUI.init();
              theGUI.button1.addActionListener(atry);
              System.out.println("added the actionlistener");
              System.out.println(theGUI.button1.toString());
         public void CloseWindow() {
              theGUI.window.dispose();
         public void actionPerformed(ActionEvent e) {
              System.out.println("In actionPerformed");
              Object source = e.getSource();
              System.out.println(source.toString());
              System.out.println("");
         //     System.out.println(theGUI.button1.toString());
         //     if (source == theGUI.button1) {
                   System.out.println("BUTTON1 WAS PRESSED");
                   String name = theGUI.AbName_TA.getText();
                   // String name = theGUI.AbName_TA.getText();
                   System.out.println("hi");
                   //TheInterface2.CreateAb(name);
                   //GUI_AddingAntibody AddingAb = new GUI_AddingAntibody();
                   //AddingAb.init();
                   //CloseWindow();
    }

  • Adding a new UDF throws a null pointer exception and modifying user.xml

    Hello,
    I have a two part question.
    i. I am trying to add a UDF (using Advanced>User Configuration..Attributes) to a fully configured OIM i.e. oim with reconciliation and provisioning from and to resources but it throws a null pointer exception. Look at the log, I see
    ===============Excerpt form the log file==========
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [[
    ---Stack Trace Begins[[This is not an exception. For debugging purposes]]---
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.doCheckAccess(OESAuthzServiceImpl.java:210)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:188)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:180)
    oracle.iam.platform.authz.impl.AuthorizationServiceImpl.hasAccess(AuthorizationServiceImpl.java:173)
    oracle.iam.configservice.impl.ConfigManagerImpl.checkAuthorization(ConfigManagerImpl.java:1899)
    oracle.iam.configservice.impl.ConfigManagerImpl.addAttribute(ConfigManagerImpl.java:177)
    oracle.iam.configservice.api.ConfigManagerEJB.addAttributex(Unknown Source)
    ... 21 lines skipped..
    oracle.iam.configservice.api.ConfigManager_5u0nrx_ConfigManagerRemoteImpl.addAttributex(ConfigManager_5u0nrx_ConfigManagerRemoteImpl.java:864)
    ... 13 lines skipped..
    oracle.iam.configservice.api.ConfigManagerDelegate.addAttribute(Unknown Source)
    oracle.iam.configservice.agentry.config.CreateAttributeActor.perform(CreateAttributeActor.java:266)
    oracle.iam.consoles.faces.mvc.canonic.Model.perform(Model.java:547)
    oracle.iam.consoles.faces.mvc.admin.Model.perform(Model.java:324)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doPerform(Controller.java:255)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doSelectAction(Controller.java:178)
    oracle.iam.consoles.faces.event.NavigationListener.processAction(NavigationListener.java:97)
    ... 24 lines skipped..
    oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:115)
    ... weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:100)
    ... 15 lines skipped..
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ---Stack Tracefor this call Ends---
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: 1] [arg: null] [arg: USER_MANAGEMENT_CONFIG] [arg: CREATE_ATTRIBUTE] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = USER_MANAGEMENT_CONFIG, Action = CREATE_ATTRIBUTE **********
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: Decision :PERMIT\nObligations from policy: ] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    =============Excerpt ends==============
    Is there a reason why this is and how do I get by it.
    ii. Can I just add the field directly within the MDS>file/user.xml? Would there be an issue with changing an existing attribute metadata using the user.xml?

    Pradeep thank you for your response. it was helpful. However, I also found the responses to both my questions.
    i. The null pointer exception was due to using a complex query I was using in the LOV query. I tried a simple query and that worked fine.
    ii. For modifying the user defined attributes one can consult the following forum post:
    OIM 11g - Change UDF Field Type form String to LOV
    Thanks

  • REG : Null Pointer Exception for RFC values

    Hi All,
    I am facing peculiar erro in code.I need to check the null entries in SAP server then it should be replaced by space and if not null then should be replaced by the value in backend.But it is throwing null pointer exception
    I am using equalsignore case(null) and trim for space.
    I am not getting why its is throwing null pointer  exception.Kindly advise
    Regards,
    Anupama

    Hi
    Use
    String f = null ;
    if(f!==null)
    Wdcomponent.getMessageManager.ReportException ("this will cause null pointer exception  "+ f.length());
    Better to give it any Constant like
    priveate static final String NULL_CHECK  = "DEL_VAL12";
    rather than space ,at the time of chceking see if it has  DEL_VAL12 if true then put the actual data else let it be there.
    Best Regards
    Satish Kumar

  • Why am I receiving Null pointer Exception Error.

    why am I receiving Null pointer Exception Error.
    Hi I am developing a code for login screen. There is no syntex error as such ut I am receving the aove mentioned error. Can some one please help me ??
    ------------ Main.java------------------
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Main implements ActionListener
    Frame mainf;
    MenuBar mb;
    MenuItem List,admitform,inquiry,exit,helpn;
    Menu newm,update,help;
    Inquiry iq;
    Admit ad;
    // HosHelp hp;
    Howuse hu;
    Register reg;
    Main()
    mainf=new Frame(" Engg College V/S Mumbai University ");
         mb=new MenuBar();
         newm=new Menu(" New ");
         update=new Menu(" Update ");
         help=new Menu(" Help ");
         List=new MenuItem("List");
         admitform=new MenuItem("Admit");
         inquiry=new MenuItem("Inquiry");
         exit=new MenuItem("Exit");
         helpn=new MenuItem("How to Use?");
    newm.add(List);
                   newm.add(admitform);
    newm.add(inquiry);
                   newm.add(exit);
         help.add(helpn);
              mb.add(newm);
              mb.add(update);
              mb.add(help);
    mainf.setMenuBar(mb);
                   exit.addActionListener(this);
                   List.addActionListener(this);
         inquiry.addActionListener(this);
         admitform.addActionListener(this);
    helpn.addActionListener(this);
         mainf.setSize(400,300);
         mainf.setVisible(true);
    public void actionPerformed(ActionEvent ae)
    if (ae.getSource()==List)
              reg=new Register();
         if(ae.getSource()==inquiry)
         iq=new Inquiry();
    if(ae.getSource()==admitform)
         ad=new Admit();
              if(ae.getSource()==helpn)
              hu=new Howuse();
              if(ae.getSource()==exit)
         mainf.setVisible(false);
    public static void main(String args[])
              new Main();
    -------------Register.java---------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Register implements ActionListener//,ItemListener
    Label id,name,login,pass,repass;
    Button ok,newu,cancel,check;
    Button vok,iok,lok,mok,sok; //buttons for dialog boxes
    TextField idf,namef,loginf,passf,repassf;
    Dialog valid,invlog,less,mismat,acucreat;
    Frame regis;
    Checkbox admin,limit;
    CheckboxGroup type;
    DBconnect db;
    Register()
         db=new DBconnect();
    regis=new Frame("Registeration Form");
              type=new CheckboxGroup();
              admin=new Checkbox("Administrator",type,true);
              limit=new Checkbox("Limited",type,false);
              id=new Label("ID :");
    name=new Label("Name :");
         login=new Label("Login :");
         pass=new Label("Password :");
         repass=new Label("Retype :");
    idf =new TextField(20); idf.setEnabled(false);
         namef=new TextField(30); namef.setEnabled(false);
    loginf=new TextField(30); loginf.setEnabled(false);
         passf=new TextField(30); passf.setEnabled(false);
         repassf=new TextField(30); repassf.setEnabled(false);
    ok=new Button("OK"); ok.setEnabled(false);
         newu=new Button("NEW");
    cancel=new Button("Cancel");
         check=new Button("Check Login"); check.setEnabled(false);
    vok=new Button("OK");
         iok=new Button("OK");
              lok=new Button("OK");
              mok=new Button("OK");
              sok=new Button("OK");
    valid=new Dialog(regis,"Login name is valid !");
         invlog=new Dialog(regis,"Login name already exist!");
         less=new Dialog(regis,"Password is less than six characters !");
    mismat=new Dialog(regis,"password & retyped are not matching !");
    acucreat=new Dialog(regis,"You have registered successfully !");
         regis.setLayout(null);
    //     regis.setBackground(Color.orange);
    valid.setLayout(new FlowLayout());
         invlog.setLayout(new FlowLayout());
         less.setLayout(new FlowLayout());
         mismat.setLayout(new FlowLayout());
    acucreat.setLayout(new FlowLayout());
    id.setBounds(35,50,80,25); //(left,top,width,hight)
    idf.setBounds(125,50,40,25);
    name.setBounds(35,85,70,25);
    namef.setBounds(125,85,150,25);
    login.setBounds(35,120,80,25);
    loginf.setBounds(125,120,80,25);
    check.setBounds(215,120,85,25);
         pass.setBounds(35,155,80,25);
    passf.setBounds(125,155,80,25);
    repass.setBounds(35,190,80,25);
    repassf.setBounds(125,190,80,25);
    admin.setBounds(35,225,100,25);
    limit.setBounds(145,225,100,25);
              ok.setBounds(45,265,70,25);
         newu.setBounds(135,265,70,25);
    cancel.setBounds(225,265,70,25);
         passf.setEchoChar('*');
    repassf.setEchoChar('*');
         regis.add(id);
         regis.add(idf);
    regis.add(name);
         regis.add(namef);
         regis.add(login);
         regis.add(loginf);
         regis.add(check);
    regis.add(pass);
         regis.add(passf);
    regis.add(repass);
         regis.add(repassf);
         regis.add(ok);
         regis.add(newu);
         regis.add(cancel);
    regis.add(admin);
         regis.add(limit);
    valid.add(vok);
         invlog.add(iok);     
         less.add(lok);
         mismat.add(mok);
    acucreat.add(sok);
    ok.addActionListener(this);
         newu.addActionListener(this);
    check.addActionListener(this);
    cancel.addActionListener(this);
         // limit.addItemListener(this);
         //admin.addItemListener(this);
              vok.addActionListener(this);
              iok.addActionListener(this);
         lok.addActionListener(this);
         mok.addActionListener(this);
         sok.addActionListener(this);
    regis.setLocation(250,150);
    regis.setSize(310,300);
    regis.setVisible(true);
         public void actionPerformed(ActionEvent ae)
         if(ae.getSource()==check)
              try{
                   String s2=loginf.getText();
    ResultSet rs=db.s.executeQuery("select* from List");
                        while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
    //                    invlog.setBackground(Color.orange);
                             invlog.setLocation(250,150);
                             invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                             break;
                        else
                        //     valid.setBackground(Color.orange);
                             valid.setLocation(250,150);
                             valid.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                   valid.setVisible(true);
                        }catch(Exception e)
                   e.printStackTrace();
    if(ae.getSource()==newu)
         try{
              ResultSet rs=db.s.executeQuery("select max(ID) from List");
         while(rs.next())
    String s1=rs.getString(1).trim();
                   int i=Integer.parseInt(s1);
    i++;
                   String s2=""+i;
    idf.setText(s2);
                   newu.setEnabled(false);
                   namef.setText(""); namef.setEnabled(true);
              loginf.setText(""); loginf.setEnabled(true);
              passf.setText(""); passf.setEnabled(true);
              repassf.setText(""); repassf.setEnabled(true);
              ok.setEnabled(true);
                   check.setEnabled(true);
                   }catch(Exception e)
              e.printStackTrace();
         if(ae.getSource()==ok)
              try
              String s1=idf.getText();
              String s2=loginf.getText();
              String s3=passf.getText();
         String s4=repassf.getText();
         int x=Integer.parseInt(s1);
         int t;
         if(type.getSelectedCheckbox()==admin)
              t=1;
              else
              t=0;
    ResultSet rs=db.s1.executeQuery("select* from List");
                   while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
                        invlog.setBackground(Color.orange);
                        invlog.setLocation(250,150);
                        invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                        break;
                   else
                        if (s3.length()<6)
                        less.setBackground(Color.orange);
                             less.setLocation(250,150);
                             less.setSize(300,100);
                   ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        less.setVisible(true);
    else if(!(s3.equals(s4)))
                        mismat.setBackground(Color.orange);
                        mismat.setLocation(250,150);
                        mismat.setSize(300,100);
                        ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        mismat.setVisible(true);
                        else
    db.s1.execute("insert into User values("+x+",'"+s2+"','"+s3+"',"+t+")");
                        acucreat.setBackground(Color.orange);
                        acucreat.setLocation(250,150);
                        acucreat.setSize(300,100);
                        regis.setVisible(false);
                        acucreat.setVisible(true);
                   }//else
              }//while
                   } //try
              catch(Exception e1)
              // e1.printStackTrace();
              if (ae.getSource()==cancel)
              regis.setVisible(false);
              if (ae.getSource()==vok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   valid.setVisible(false);
              if (ae.getSource()==iok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   invlog.setVisible(false);
              if (ae.getSource()==lok)
              less.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
              if (ae.getSource()==mok)
              mismat.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
    if (ae.getSource()==sok)
              acucreat.setVisible(false);
              ok.setEnabled(false);
                   newu.setEnabled(true);
                   regis.setVisible(true);
         public static void main(String args[])
         new Register();
    -----------DBConnect.java------------------------------------
    import java.sql.*;
    public class DBconnect
    Statement s,s1;
    Connection c;
    public DBconnect()
    try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              c=DriverManager.getConnection("jdbc:odbc:Sonal");
              s=c.createStatement();
    s1=c.createStatement();
         catch(Exception e)
         e.printStackTrace();
    ----------Login.java----------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Login implements ActionListener
    Frame log;
    Label login,pass;
    TextField loginf,passf;
    Button ok,cancel;
    Dialog invalid;
    Button iok;
    Register reg;
    DBconnect db;
    Main m;
    Login()
    db=new DBconnect();
         log=new Frame();
         log.setLocation(250,210);
         login=new Label("Login :");
    pass=new Label("Password :");
         loginf=new TextField(20);
         passf=new TextField(20);
         passf.setEchoChar('*');
         ok=new Button("OK");
         // newu=new Button("New User");
         cancel=new Button("CANCEL");
         iok=new Button(" OK ");
    invalid=new Dialog(log,"Invalid User!");
    //log.setBackground(Color.cyan);
    //log.setForeground(Color.black);
         log.setLayout(null);
         // iok.setBackground(Color.gray);
         invalid.setLayout(new FlowLayout());
         login.setBounds(35,50,70,25); //(left,top,width,hight)
         loginf.setBounds(105,50,100,25);
         pass.setBounds(35,85,70,25);
         passf.setBounds(105,85,70,25);
         ok.setBounds(55,130,70,25);
    // newu.setBounds(85,120,80,25);
    cancel.setBounds(145,130,70,25);
    log.add(login);
    log.add(loginf);
    log.add(pass);
    log.add(passf);
    log.add(ok);
    // log.add(newu);
    log.add(cancel);
         invalid.add(iok);//,BorderLayout.CENTER);
    ok.addActionListener(this);
    // newu.addActionListener(this);
    cancel.addActionListener(this);
         iok.addActionListener(this);
    log.setSize(300,170);
    log.setVisible(true);
    public void actionPerformed(ActionEvent a)
    if(a.getSource()==ok)
         try{
              String l=loginf.getText();
              String p=passf.getText();
              ResultSet rs=db.s.executeQuery("select * from List");
              while(rs.next())
              if(l.equals(rs.getString(2).trim())&& p.equals(rs.getString(3).trim()))
                        String tp=rs.getString(4).trim();
                             int tp1=Integer.parseInt(tp);
    log.setVisible(false);
    if(tp1==1)
                             m=new Main();
                        // m.List.setEnabled(true);
                             else
                             m=new Main();
                             m.List.setEnabled(false);
                        break;
    else
                   invalid.setBackground(Color.orange);
                   invalid.setSize(300,100);
                   invalid.setLocation(250,210);
                   cancel.setEnabled(false);
              ok.setEnabled(false);
                   invalid.setVisible(true);
                   }catch(Exception e1)
                   e1.printStackTrace();
         if (a.getSource()==cancel)
         log.setVisible(false);
         if (a.getSource()==iok)
         invalid.setVisible(false);
         loginf.setText("");
         passf.setText("");
         cancel.setEnabled(true);
    ok.setEnabled(true);
         public static void main(String[] args)
         new Login();
    -------------inquiry.java---------------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.Date;
    import java.text.*;
    import java.sql.*;
    public class Inquiry implements ActionListener
    Frame inqry;
    Label name,addr;
    TextField namef,addrf;
    Button ok,cancel,dok;
    Dialog invalid;
    Frame result; //Result of the inquiry....
    Label lrname,lraddr,lward,lrdate,lcdate;
    TextField rname,raddr,ward,rdate,cdate;
    Date d;
    DateFormat df;
    Button rok,rcancel;
    Dialog success;
    Button rdok;
    DBconnect db;
    Inquiry()
              db=new DBconnect();
              inqry=new Frame("Inquiry Form");
              inqry.setLayout(null);
    inqry.setBackground(Color.cyan);
              name=new Label(" NAME ");
              addr=new Label("ADDRESS");
              namef=new TextField(20);
              addrf=new TextField(20);
              ok=new Button("OK");
              cancel=new Button("CANCEL");
              dok=new Button("OK");
              invalid=new Dialog(inqry,"Invalid Name or Address !");
              invalid.setSize(300,100);
         invalid.setLocation(300,180);
              invalid.setBackground(Color.orange);
              invalid.setLayout(new FlowLayout());
    result=new Frame(" INQUIRY RESULT "); //Result Window......
    result.setLayout(null);
    result.setBackground(Color.cyan);
    lcdate=new Label(" DATE ");
         lrname=new Label(" NAME ");
    lraddr=new Label(" ADDRESS ");
         lward=new Label(" WARD ");
         lrdate=new Label(" ADMIT-DATE ");
    cdate=new TextField(10);
         rname=new TextField(20);
    rname.setEnabled(false);
         raddr=new TextField(20);
         raddr.setEnabled(false);
         ward=new TextField(20);
         ward.setEnabled(false);
         rdate=new TextField(10);
         rdate.setEnabled(false);
         cdate=new TextField(20);
         d=new Date();
         df=DateFormat.getDateInstance(DateFormat.MEDIUM,Locale.KOREA);
         cdate.setText(df.format(d));
         cdate.setEnabled(false);
    rok=new Button(" OK ");
         rcancel=new Button("CANCEL");
              name.setBounds(40,50,50,25);
    namef.setBounds(120,50,130,25);
    addr.setBounds(40,100,60,25);
    addrf.setBounds(120,100,80,25);
    ok.setBounds(60,145,70,25);
              cancel.setBounds(140,145,70,25);
              lcdate.setBounds(200,50,60,25); //Result Window......
    cdate.setBounds(270,50,80,25);      
    lrname.setBounds(35,85,70,25);
    rname.setBounds(140,85,180,25);
    lraddr.setBounds(35,120,80,25);
         raddr.setBounds(140,120,100,25);
    lward.setBounds(35,155,80,25);
    ward.setBounds(140,155,100,25);
    lrdate.setBounds(30,190,80,25);
    rdate.setBounds(140,190,80,25);
    rok.setBounds(70,240,70,25);
    rcancel.setBounds(170,240,70,25);
              inqry.add(name);
              inqry.add(namef);
              inqry.add(addr);
              inqry.add(addrf);
              inqry.add(ok);
              inqry.add(cancel);
    invalid.add(dok);
         result.add(lcdate); //Result Window......
         result.add(cdate);
              result.add(lrname);
              result.add(rname);
              result.add(lraddr);
              result.add(raddr);
              result.add(lward);
              result.add(ward);
              result.add(lrdate);
              result.add(rdate);
              result.add(rok);
              result.add(rcancel);
         ok.addActionListener(this);
         cancel.addActionListener(this);
         dok.addActionListener(this);
    rok.addActionListener(this); //Result Window......
         rcancel.addActionListener(this);
         inqry.setSize(280,180);
         inqry.setLocation(300,180);
         inqry.setVisible(true);
              result.setSize(400,280); //Result Window......
         result.setLocation(200,150);
         result.setVisible(false);
              public void actionPerformed(ActionEvent ae)
                   if(ae.getSource()==ok)
                   try
                             String nm=namef.getText();
                             String ad=addrf.getText();
                             inqry.setVisible(false);
                             ResultSet rs=db.s.executeQuery("select * from Billinformation");
                             while(rs.next())
                                  String nm1=rs.getString(2).trim();
                                  String ad1=rs.getString(3).trim();
                                  int k=0;
                                  if((nm1.equals(nm))&&(ad1.equals(ad)))
                             String adm=rs.getString(5).trim();
                             String wr=rs.getString(6).trim();
                             String bd=rs.getString(8).trim();
                                  String wrb=wr+"-"+bd;
    result.setVisible(true);
                                  rname.setText(nm1);
                             raddr.setText(ad1);
                             ward.setText(wrb);
                             rdate.setText(adm);
    k=1;
                                  break;
                                  }//if
                             else if(k==1)
                             invalid.setVisible(true);
                             }//while
    }//try
                             catch(Exception e)
                             e.printStackTrace();
                        } //getsource ==ok
                   if(ae.getSource()==cancel)
    inqry.setVisible(false);
                        if(ae.getSource()==rok) //Result Window......
                        namef.setText("");
                             addrf.setText("");
                             result.setVisible(false);
                        inqry.setVisible(true);
    if(ae.getSource()==rcancel)
    result.setVisible(false);
                        if(ae.getSource()==dok)
                        namef.setText("");
                             addrf.setText("");
                             invalid.setVisible(false);
                             inqry.setVisible(true);
         public static void main(String args[])
              new Inquiry();
    PLease Help me !!
    I need this urgently.

    can you explain what your program tries to do... and
    at where it went wrong..Sir,
    We are trying to make an project where we can make a person register in our data base & after which he/she can search for other user.
    The logged in user can modify his/her own data but can view other ppl's data.
    We are in a phase of registering the user & that's where we are stuck. The problem is that after the login screen when we hit register (OK- button) the data are not getting entered in the data base.
    Can u please help me??
    I am using "jdk1.3' - studnet's edition.
    I am waiting for your reply.
    Thanks in advance & yr interest.

Maybe you are looking for

  • [SOLVED] Japanese input makes things weird

    Hello everybody! Well, recently I've reinstalled Arch Linux. Everything was ok (as well in the previous installation), but since I've installed the Japanese input/fonts, my fonts got weird into QT applications. But that happens only when I activate t

  • Delete condition type records from PO

    Hi all,    I have put custom fields ( for condition type ) under customer data tab in PO (ME21N) line item. While creating/changing PO, I have to delete condition records under conditions tab based on the custom fields which I have defined in the cus

  • How to open  .exe file located in server system by the client system

    hi, i am using tomcat 5.0 as server and jsp as front end. I placed some of the software in the server system.I want to open the exe of those software from the client system when the user clicks the button. I am able to open them in the server system

  • UPDATE to "Premiere Pro's #1 missing feature": Auto-Tagging Bins with Shortcuts

    In a previous thread (http://forums.adobe.com/thread/1179075?start=0&tstart=0) I suggested that Adobe give us FCPX and FCP7-style subclip creation. I just got some new ideas that improve this previous FR: AUTO-TAGGING BINS with user assignable SHORTC

  • CS3 Master Suite

    Hello, I have 2 users that have CS3 Master Suite installed. Adobe Acrobat was on version 8.1.6 so I updated both to the latest patch. Seems that their ability to search a network drive with windows xp search has been crippled. Previously they were ab