GetMessage() displays null for EXCEPTIONS.Please guide

I have created my own Exception class called InvalidAccountException which extends InternalException.
My code throws an exception if an invalid account in set.
Thats fine.I get the exception shown.
But when I say te.getMessage() in the catch clause,is displays null
Any idea why?
class Customer{
public static void main(String[] args) {
     AccountInfo acInfo = new AccountInfo();
     acInfo.setAccount(100);
     // Create customer.
     VirtualPerson cust = new VirtualPerson();
     try {
           cust.readAccount(acInfo);
         }catch(InvalidAccountException te){
              System.out.println(te);                             // Works
              //System.out.println(te.getMessage().toString());   // displays null.Why?
         }catch(InternalException ie){
             //System.out.println(te.getMessage().toString());    // displays null
}

Last, but only because the first post didn't show. <_<Bah, excuses ;)

Similar Messages

  • I have an iMac with mountain lion 10.8.3 with boot camp 5.0.2 .i installed windows 7 -64 bit with boot camp but the boot camp didn't install drivers for windows please guide me for trouble shooting .

    i have an iMac with mountain lion 10.8.3 with boot camp 5.0.2 .i installed windows 7 -64 bit with boot camp but the boot camp didn't install drivers for windows please guide me for trouble shooting .

    Kappy wrote:
    Boot Camp doesn't install the drivers. You have the drivers on a separate USB device if you followed directions. Once in Windows connect the USB drive with the driver software. It should startup automatically and install the drivers.
    You don't even need to do that. As downloading the drivers from within Boot Camp Assistant can be unreliable, it is better to get the package directly from here:
    http://support.apple.com/kb/DL1638
    Copy the .zip file to a USB flash drive or burn it to a DVD in OS X. Install Windows as normal, insert the flash drive/DVD in Windows, copy the .zip file to the hard drive, extract it, then run the setup executable.

  • Getting null pointer exception(please help me...its urgent)

    hi,
    I have cretaed ajar file on desk top which also includes a .jpg file and .txt.When i run my jar in the desktop it is runninig fine.But when i have placed this jar on my pocket pc and tried to run it ,nullpointerexception is raised at the place where iam accessing jpg and txt files...
    eg:
    Image img=Toolkit.getDefaultToolkit.createImage("home.jpg");
    could anyone can solve my problem.
    Thanks and Regards

    Image
    img=Toolkit.getDefaultToolkit.createImage("home.jpg");On pocketpc/java the current directory is set to "\". So if you have "home.jpg" this file is searched in "\home.jpg", not in the directory from which the apps was started.
    prusak

  • Compleated guided procedure task throws Java.lang.null pointer exception.

    Hello,
    Compleated guided procedure task throws Java.lang.null pointer exception in UWL.
    From UWL  tracking of finished task of guided procedures throws null pointer exception .
    Guided procedure is created in local J2EE Engine not in Back end SAP System.
    Any ideas.
    Regards
    Mark

    Hi
    If u solved the problem mentioned above please tell me g\how u managed to do it.We are facing the same issue.Completed gp shows the same exception while opening from tracking tab

  • Remote Portal Role is displaying "null" on the TLN (FPN)

    Hi All,
    I have created a role on my Producer portal which is called by my Consumer Portal.  Although this role has worked in the past and displayed it's proper name, it is now displaying "null" as are all the links within it.
    Can anyone shed some light on this?
    If you require more information please let me know.
    Oloy.

    Hi Again Jo,
    Yes, both of the Portals are currently using SP14.
    The Producer portal is working perfectly fine but the consumer is displaying null for all content.
    Is a Portal-restart the only known solution for the issue?  The thing is we have a number of key users trying to access the system at the moment and I would prefer to avoid that if I can.
    Thanks for your speedy responses too,
    Oloy.

  • Display null text field in tabular form

    Seems too simple to ask in this forum but I know how to display null for a select list but how can I have a text field display blank instead of '(null)' in a tabular form?

    Hi,
    Go edit report attributes and check that attribute "Show Null Values as" do not have any value.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Exception is thrown but exception.getMessage() is null

    Hi,
    I am wirting a code in which an exception is thrown, I catch this exception in the catch block, but when I display e.getMessage() it displays null.....Can any body help in telling why....
    Thanks
    Rajnish Verma

    getMessage() is just about useless. If you use the no-arg constructor for a Throwable, you'll get a null message. Much, much better for displaying information about Throwables is toString() which will include the class name of the Throwable and the message if it's not null. Out shop never uses getMessage()

  • Give me a idea for null pointer exception handling in java

    dear friends,
    Now i'm doing one program thats read a xml file element and store on txt file in java.now it's working but i have one problem.The problem is the parent node have number of child node.For a example, now i read the file.The first parent have a 5 child.that time work.the next parent have a 4 child this time one child is not on there.so now my program show one run time error.thats "NullPointerException" please give me a solution.its very urgently.
    advance Thanks !

    import java.io.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class rsk1{
    public static void main (String argv []){
    try {
                   int j=0,arry=0;
                   FileWriter Out = new FileWriter("file1.txt");
                   BufferedWriter f1 = new BufferedWriter (Out);
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document doc = docBuilder.parse (new File("Transaction.xml"));
    // normalize text representation
    doc.getDocumentElement ().normalize ();
    System.out.println ("Root element of the doc is " +
    doc.getDocumentElement().getNodeName());
    NodeList listOfPersons = doc.getElementsByTagName("transactionid");
    int totalPersons = listOfPersons.getLength();
    System.out.println("Total no of people : " + totalPersons);
    arry = totalPersons * 5;
    String sr[] = new String[arry];
                   String s1=" ";
                   int k=0;
    for(int s=0; s<listOfPersons.getLength() ; s++,k++){
    Node firstPersonNode = listOfPersons.item(s);
    for(int r=0; r<4;r++)
    if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){
    Element firstPersonElement = (Element)firstPersonNode;
    NodeList firstNameList = firstPersonElement.getElementsByTagName("item");
    Element firstNameElement = (Element)firstNameList.item(r);
    NodeList textFNList= firstNameElement.getChildNodes(); //ERROR OCCUR IN THIS LINE
    sr[++j]=((Node)textFNList.item(0)).getNodeValue().trim();
    }//end of if clause
    }//end of for loop with s var
    System.out.println("Process completed");
    for(int i=1;i<=j;i++)
         f1.write(sr);
                                       f1.write(" ");
                                       if(i%3==0)
                                            f1.newLine();
    f1.close();
    }catch (SAXParseException err) {
    System.out.println ("** Parsing error" + ", line "
    + err.getLineNumber () + ", uri " + err.getSystemId ());
    System.out.println(" " + err.getMessage ());
    }catch (SAXException e) {
    Exception x = e.getException ();
    ((x == null) ? e : x).printStackTrace ();
    }catch (Throwable t) {
    t.printStackTrace ();
    }//end of main

  • ViewDocument.jsp gets null pointer exception when using report token instead of docid for DHTML

    <p>The following command gets a null pointer error showing up in Tomcat log:</p><p>../../viewers/cdz_adv/viewDocument.jsp?sEntry=<%=strEntry%>&lang=en&iDocID=830&ViewType=I&kind=Webi</p><p>where sEntry is a valid report token </p><p>but works fine if the ViewType is H  or id=830 is used instead of sEntry.  When the above command is issued the drill columns are displayed correctly but no report is shown and a null pointer exception is encountered.</p>

    There is a Consulting Solution called BOInterface that Business Objects Global Services sells and that may help you if you are implementing your own "InfoView".
    A description is <a href="http://www.mnsoft.org/bointerface0.0.html">here</a>.
    Particularly, see the <a href="http://www.mnsoft.org/pmiv.0.html">Poor Man's InfoView</a> web application.
    Contact me via direct email for more information if this is interesting for you.
    HTH,
    M
    Matthias Nott -  Business Objects
    Service Line Leader Products EMEA
    [email protected]

  • SAP Portal Display Documents is hanging with Null Pointer Exception

    Hi I am having problems with an iview from the products section of SAP standard iviews
    In my portal page I have the following three iviews, find documents, display master data and display documents both the find docs and display master data work great, but the display documents seems to hang and a java Null Pointer Exception shows in the data frame of IE.  It hangs up the whole page and I have to keep hitting back button to close the window and open.  I have the following in config for web front end
    DOC_OBJ is mapped to DOKAR, DOKNR, DOKVR and DOKTL with default set.
    DOC_REQ is set to DOKAR default checked
    EQUI_REQ is set to EQUI-EQUNR default checked
    This is under SIMG_SPORT -> products -> select data fields for web front end
    Am I missing something?
    Cheers,
    Devlin

    The following code is your problem:
    //-------construct
    public void MySlide()
      contents = new Tile[ROWS][COLS];
      reset();
    }Constructors don't return anything including void. Therefore you really aren't calling the above method as you assume in your main method as it is not a constructor. Remove the void keyword and your initializing code will execute properly.

  • My mini i pad 2 retina display screen is not work correctly after two days of buying appear some gray line on screen un furtunately i live in iran and i havnot access to any i pad store please guide me

    My mini i pad 2 retina display screen is not work correctly after two days of buying appear some gray line on screen un furtunately i live in iran and i havnot access to any i pad store please guide me

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
     Cheers, Tom

  • Oracle native API for AQ  - Null pointer exception

    Hi
    I am trying to enqueue a message to AQ adapter through the java native api. But i am getting a null pointer exception.
    import java.sql.*;
    import oracle.AQ.*;
    Connection db_conn;
    AQSession aq_sess = null;
    AQQueueTable q_table = null;
    AQQueue queue = null;
    AQMessage message ;
    byte[] b_array ;
    try{
    String test_data = "hello";
    Class.forName("oracle.jdbc.driver.OracleDriver");
    db_conn =
    DriverManager.getConnection(
    "jdbc:oracle:thin:@localhost:1521:SOABRM",
    "soabrm", "password");
    System.out.println("JDBC Connection opened ");
    db_conn.setAutoCommit(false);
    Class.forName("oracle.AQ.AQOracleDriver");
    aq_sess = AQDriverManager.createAQSession(db_conn);
    System.out.println("Successfully created AQSession ");
    q_table = aq_sess.getQueueTable ("soabrm", "AQ_Test");
    queue = aq_sess.getQueue ("soabrm", "AQ_Queue_Test");
    message = queue.createMessage();
    b_array = test_data.getBytes();
    AQRawPayload raw_payload = message.getRawPayload();
    AQEnqueueOption enq_option = new AQEnqueueOption();
    raw_payload.setStream(b_array,b_array.length); */* Erroring out at this statement*/*
    message.setRawPayload(raw_payload);
    queue.enqueue(enq_option, message);
    db_conn.commit();
    catch(Exception ex){
    System.out.println("Exception "+ex.getMessage());
    Error : Exception null
    Please let me know if I missed something.
    Thanks in advance!!!!!

    hi,
    I had found the issue. The queue takes object type messages where as I was trying with Raw messages.
    Instead of AQRawPayload raw_payload = message.getRawPayload();
    I need to use
    AQObjectPayload raw_payload = message.getObjectPayload()
    and pass object as input to the queue.

  • API5072: Internal Error: Null message for exception

    OWB 11.1.0.6  on Database 11.1.0.6
    Suddenly i am getting this internal error while saving.... Can't save the work please help!!!!
    API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    oracle.wh.util.Assert: API5072: Internal Error: Null message for exception. Please contact Oracle Support with the stack trace and details on how to reproduce it.
         at oracle.wh.util.Assert.owbAssert(Assert.java:51)
         at oracle.wh.ui.jcommon.OutputConfigure.showMsg(OutputConfigure.java:216)
         at oracle.wh.ui.jcommon.CommonUtils.error(CommonUtils.java:298)
         at oracle.wh.ui.console.commands.CommitCmd.performAction(CommitCmd.java:27)
         at oracle.wh.ui.editor.WindowHelpEventHandler.handleSaveAll(WindowHelpEventHandler.java:239)
         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:585)
         at oracle.wh.ui.editor.listener.ReflectListener.invokeMethod(ReflectListener.java:41)
         at oracle.wh.ui.editor.listener.ReflectActionListener.actionPerformed(ReflectActionListener.java:33)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Hi,
    Thsi is the famous NULL pointer exeption. There may be multiple reasons for it and sometime it may also happen beacuse of lost connection to DB, instance may have gone off etc...You cannot retrive the work back as far as i know when u strike this error.
    Plz save ur work after every change or operator u put into the mapping as a safety precausion.
    Regards,
    Bharath

  • 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

  • Please help me to find my iPad and iPhone 5C. I lost all of them last night. I set up icloud for my devices but i can't find them because they were not connect to the Internet. Please guide me other ways to find my "best friends".

    Dear Apple,
    Please help me to find my iPad Air 2 64 GB and iPhone 5C 8GB. They're in IOS 8.0 maybe...I lost all of them last night. I set up icloud for my devices but i can't find them because they were not connect to the Internet. Please guide me other ways to find my "best friends". They're very important to me. Many important files for my job in here and it has sentimental value to me. My boyfriend gave it for me so i don't want to lose them. And because i just lost my iPad Air last 3 month, and now i just bought iPad Air 2 two months ago. I'm so sad and lost. I want to catch the thief to the police so bad because they keep my bag and many other important things. I can not do anything without them. Please help me and contact me via my email or my phone. Thank you very much. Hope to receive your answer soon.

    Hey there thaovy309,
    Welcome to Apple Support Communities.
    The linked article below provides a lot of great information and suggestions that should address your concerns about your data and finding your lost or stolen iPhone 5c and iPad Air 2.
    If your iPhone, iPad, or iPod touch is lost or stolen - Apple Support
    Take care,
    -Jason

Maybe you are looking for

  • How to get back fields from INSERT statement in batch mode(getGeneratedKeys

    Hi, I wanted to insert records to database and get back some fields. I create prepared statement: preparedStatement = connection.prepareStatement(sqlQuery, columnIndexes); then I set parameters. Following code works properly: preparedStatement.execut

  • Captivate File Created with Trial Will Not Open in Paid for Captivate

    I have a file created by Trial version of captivate. It was created in a different computer. Now, I have to make some modification in the file. However, when I tried to open it with Captivate 5.5, I got the error shown below. I am not able to use the

  • Embedded QT in IE

    I have embedded QT movies in web pages for years, using both EMBED and OBJECT. Now there is a problem with IE. The EMBED tag doesn't work in it, it requires use of the ActiveX Control (Object). But now in IE7, ActiveX Objects will not play by default

  • Is the 2.1.2 update safe ?

    I'm tired of updating and than downgrading again. Can some of the brave people please post if this update actually fixed bugs, or introduced more bugs (like the last few updates did). I'm constantly in the middle of deadlines, hence my fear of updati

  • I cannot open xls files on my Imac in preview or numbers where as I used to be able to

    I am no longer able to open XLS files on my Imac.  I was able to do it with preview or number & it will start to load & stop "progress" Thank you