Runtime exception for other than programming error.

In a conversation the question arose whether it could be a case of throwing a runtime exception for anything other than a bug. The tutorial on oracle site says "These Usually Indicate programming bugs" leading to think that can be used in situations in which there is no bug.
Anyone have a practical example of a runtime exception when there is no bug?
Thanks.

937643 wrote:
Ok. But. Do you think that in these cases the use of a runtime exception could be considered a bad practice?That's actually a matter of some debate.
On the one hand, Java has defined two major kinds of exceptions since the very beginning (unchecked exceptions, which are RuntimeException, Error, and their descendants; and checked exceptions which are everything else). The intended use of those was that checked exceptions should be for things that can normally go wrong in the execution of a program, even without a bug or without a major internal JVM error, such as a failed attempt to persist something or a network connection dropping--stuff that a programmer might normally be expected to deal with; while unchecked exceptions were created for things that a programmer would not normally handle in his code (except possibly at major architectural boundaries), like buggy code or an internal JVM failure.
With the rule about having to catch or declare checked exceptions, but not unchecked ones, that makes it easy for programmers so say, "Okay, I know exactly what can go wrong here that I might be expected to handle and I can therefore choose what to do with it; there will be no surprises. But I don't have to deal with problems that are outside my normal responsibility, like somebody passing me a null when they shouldn't have." It gives a programmer a nice bit of control, and the ability to know he hasn't missed something, kind of like the type safety provided by a strongly typed language.
At least that's the theory.
In practice, most checked exceptions either just get bubbled up to the next layer (via a throws clause), or caught wrapped in a fairly generic layer-appropriate exception and rethrown. There's not a whole lot of use made of what checked exceptions provide, and there's a lot of ugly boilerplate code that doesn't do anything useful for the app but is just there to satisfy the compiler.
So, some people think that checked exceptions are useless, or mostly useless, and favor unchecked exceptions in most or all cases. I believe that's part of the philosophy of Spring, but I'm not totally sure.
The idea is that since most of the time you can't do anything about exceptions that might be thrown to you, it's wasteful and pointless to have all that code to catch and rethrow. In this viewpoint, it would be better if, for example, not providing a throws clause at all meant that you could throw any exception. Any given code can still catch specific exceptions that it knows it can handle, but we don't have to write a bunch of code notating something that we're not really doing anything about.
Personally, I used to be totally in the checked exception camp. However, all the pointless boilerplate is wearing me down. I'm still not completely convinced though, and here's why: If I'm calling a method, I'd like to at least be able to see what might go wrong, so that I can decide how to deal with it. If all exceptions were unchecked, and the throws clause were optional, a conscientious developer could still provide it, and list the unchecked exceptions his method might throw to me, and/or he could document them in the javadoc comments. But a lot of developers won't do that, or even if they start to, as their method evolves, without the compiler to enforce it, they won't keep it up to date.
So there are advantages to both approaches. I personally would to know that the information will always be available to me, but for the small percentage of the time where I actually use it (like handle one specific exception one way and some other exception differently), I'm not sure if it's worth the overhead.

Similar Messages

  • Runtime Exception for Transaction MEREP_MON

    Can you please help me solving this problem?
    For last 3 days I am getting runtime exception for Transaction MEREP_MON. Error description is Time limit Exceeded.
    This is coming only for Direction Outbound ( When I chcking OutBound Checkbox) at the top left corner.
    For Inbound and Distribution it is working fine.
    I tried with MEREP_PURGe and purging all inbound and outbound data.

    Hi Baskar,
    I changed the mapping. I removed the ABS function. It's still throwing the same error. Now when I copy the payload from SXMB_MONI and test in Mapping in ESR, it's working fine. But the same source file throws error in SXMB_MONI. The xml that works in Test tab should certainly work in SXMB_MONI also, shouldn't it?
    So I guess it is a different error.
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_INFRECMASS_ECC_to_MDM_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_INFRECMASS_Receiver/INFREC_Receiver
    I must add that the INFREC_Receiver is the root node of the target file and I have kept it 0..unbounded and fields 0...1. But the source has many segements of the Idoc, so should I change them ?
    Harish Babu

  • Runtime exception for configurable products

    Hi Gurus,
    I am getting a runtime exception for configurable products on clicking the link You can select more product options in CRM 7 b2c application . But when i login with a registered user and click the same link , it opens up and takes to the page for configuration of products .
    Please find the error from logs :
    [EXCEPTION]
    79823   java.lang.NullPointerException: It was tried to rebuild the connection because of invalidity. It is not allowed because the connection type is not JCoConnectionStateless. You may also check the user authorizations.
    79824   at com.sap.isa.core.eai.sp.jco.BackendBusinessObjectBaseSAP.getDefaultJCoConnection(BackendBusinessObjectBaseSAP.java:55)
    79825   at com.sap.isa.maintenanceobject.backend.crm.DynamicUICRM.readData(DynamicUICRM.java:121)
    79826   at com.sap.isa.maintenanceobject.businessobject.DynamicUI.read(DynamicUI.java:767)
    79827   at com.sap.isa.ipc.ui.jsp.action.InitDynamicUIAction.ecomPerform(InitDynamicUIAction.java:67)
    79828   at com.sap.isa.isacore.action.EComBaseAction.doPerform(EComBaseAction.java:375)
    79829   at com.sap.isa.core.BaseAction.execute(BaseAction.java:212)
    79830   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    79831   at com.sap.isa.core.RequestProcessor.processActionPerform(RequestProcessor.java:692)
    79832   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    79833   at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:409)
    79834   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    79835   at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)
    79836   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    79837   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    79838   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    79839   at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
    79840   at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
    79841   at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
    79842   at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
    Can anybody help me out to find the issue .
    Thanks and Regards,
    Tony Isaac

    Tony,
    It looks more like an issue with the loading of the JCO properties before the logon. Can you go to XCM and try reentering the password and save the config. Once done do a test connection and restart the application.
    Then set a breakpoint in the BackendBusinessObjectBaseSAP class in the method getDefaultJCoConnection().
    Here when the current connection is invalid it tries to read the config properties from XCM. Just check if it is reading the correct values from the config ISA_COMPLETE which is read on the backend object.
    In case of mismatch, you need to fix that or you could try to build a new JCO connection with your own parameters.
    Pradeep
    Edited by: Pradeep Kumar on Mar 11, 2010 6:20 AM

  • INT-0115: Null Poiner Exception. This is programming error. Please contact

    Hello, good day
    I am fulfilling one interface between maximo eam and sap r3 but to the quere to purchaise requisition of sap to maximo marks the following mistake,
    INT-0115: Null Poiner Exception. This is programming error. Please contact your System Administrator.; nested exception is:
    java.lang.NullPointerException

    Please contact your System Administrator
    Did you?

  • All users GONE except for "Other"...and CANNOT boot from External DVD drive

    I booted the iMac (Intel...the last one with the White Bezel) tonight, and all of my users were GONE except for "Other." The internal Superdrive has had a disc jammed in it for months, so instead I have an OWC external USB/FW400/FW800 DVD drive. Snow Leaopard.
    I need to boot from the SL install disc, but that must go into the external drive...which, as it's been since I upgraded to SL, the Mac sometimes sees and sometimes doesn't. Right now it can't see it. Which leaves me a big pile of crap, doesn't it?
    So, what to do? I can't boot the internal drive because it's jammed with a DVD (or I spend $300 to replace what should be a $20 optical drive in it), I can't boot the external DVD drive because the iMac w/Snow Lepeord can't see it, and, meanwhile, all of my photos, etc., are on my Time Machine backup drive...which, as long as I can't do any of the above, just sits there...useless.
    Can you tell I'm a bit frustrated with this?
    I've reset the PRAM. I've rebooted. I've held down all sorts of combinations of keys. I've tried every single interface type on the external drive and the same thing - the drive can't be seen by the computer.
    Has the internal hard drive failed? Nope. I'm tying this using the Firefox browser that's running on my Windows XP installation via Boot Camp on the internal hard drive.

    Thanks, but no luck so far.
    I have an old iMac G3 downstairs, and I connected it to the machine via Firewire. I could see the disk on the 24" iMac, its folders, etc. I wanted to see if I could install OS X via Target Disk Mode from the old machine to the new one, but it's a PowerPC machine and you can't do that. Maybe you can't do that from ANY iMac...I'm not that experienced.
    Now the iMac isn't booting at all to Windows via Boot Camp - it's been booting for 45 minutes now with the "WinXP" logo, but nothing. I'm about to throw it in the car and haul it over to my parents, who have both a Powerbook and a 27" iMac. Maybe it'll work there. Who knows.
    Other ideas...replace the internal hard drive (cheap)...if that doesn't work, I'll just sell the thing. I'm not going to sink $300 into the thing when I can get a new machine for around $600-$700. I may go to a Windows7 machine on the desktop and a Powerbook...maybe even an iPad.
    I really want to love this iMac. It's my first (well, I did have the G3, but that was just to play with) Mac. It's given me a ton of problems since I bought it new. It's always been a "stock" machine - nothing weird done to it. I was hit with an iMovie update once, and that broke iMovie. Even the new iLife 2009 didn't fix it. Then, the internal optical disk drive failed. I couldn't believe that Apple used a proprietary optical drive rather than a stock Pioneer model. Price for the drive alone? $200.
    I installed Snow Leopard 2 months ago, and that completely broke my ability to use external optical drives. Sometimes they work...most times they don't. This is an ongoing problem that many people are having (check the forums)...but no fix. Where does that leave me? With a useless computer.
    So, I've boiled it down to this: I love the Mac software. I hate the hardware. Sure, it's pretty, but if something goes wrong, get ready to pay. I hate that Apple knows about problems, yet does nothing to address them, like the problem with external optical drives and Snow Leopard.
    I bought the Mac because I was sick of Microsoft not being able to simply produce an OS full of security holes. Often times I read people bashing supposed "driver ****" with Windows, but look at what users of Windows machine are demanding of Microsoft - "please make my software compatible with the trillions of combinations of hardware that can run the os...all the way back to stuff that was created in the mid 1990s." Meanwhile, from my experience, Apple can't get their software to work with their own proprietary, supposedly vertically-controlled hardware.
    Windows7 is a not bad OS. It's got it's faults, of course. But, if my optical drive failed in a Windows box, I'd have it replaced in 10 minutes...with a bluray drive...that can write...for under $100.
    I use my computer for pictures, etc. In fact, we were ready to send off to iPhoto for our yearly photo books. That's not going to happen, as the photos are forever trapped on my Time Machine backup drive (lesson learned: dump photos to a generic format...fat32 works...just in case you decide to switch from Mac to Win7). iLife is great. MS Office is great, too, on the Mac. I love the little things the Mac does right.
    After years of screwing around with my Windows box, I wanted a computer that acted like a consumer electronic device. That's not what I've gotten.
    Ugh, so now do I buy a Mac Mini for $700, a new iMac for $1,400, or a Macbook Pro and a mac mini?
    ...or...do I continue to work within this silly Ubuntu Linux world?
    Whatever the answer, I wish I didn't have to ask the question now.

  • Any tools are there in data upload for other than BDC.

    Any tools are there in data upload for other than BDC.

    Hi Hassan,
    <b>LSMW</b>
    <a href="http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf">http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf</a>
    <b>Direct Input</b>
    <a href="http://help.sap.com/saphelp_di471/helpdata/EN/fa/097174543b11d1898e0000e8322d00/content.htm">Direct Input</a>
    <b>BAPI</b>'s
    Example :
    <b>BAPI_QUOTATION_CREATEFROMDATA2</b> - Customer Quotation: Create Customer Quotation
    <b>BAPI_PO_CREATE1 </b> -     Create Purchase Order
    <b>Close your previous threads if you have got the answers.</b>
    Regards,
    AS

  • Is it possible to find out if the over print is applied for other than 100% black  object?

    I need to find out the over print is applied for other than 100% black objects in "illustrator cs3" through programmatically. Kindly advice me.

    Anyone please

  • GUI_DOWNLOAD is giving # for other than english content

    Hi Guys,
    I am using GUI_DOWNLOAD FM for downloading internal table content. When my table has content other than english language, my downloaded file has only # symbols.
    I getting code page number for the  language using FM NLS_GET_FRONTEND_CP and passing to GUI_DOWNLOAD. Even standard ALV download also doing the same.  Please sugest some solution for this.
    I have to download to text file and excel file.
    Thanks,
    Vinod.

    Hi Sandra/Vijay,
    Your inputs are really helpfull. Thank you so much for your response.
    Problem is solved now by giving the code page as 4103 and marking the field write_BOM as X in GUI_DOWNLOAD FM.
    You guys are are correct. I am in Unicode system and using SAP 4.7 version. Now it is working fine. But one more problem with GUI_UPLOAD.
    I am using Office 2007. I have saved excel file in 2003 format. When i try to upload this file having Korian text/Russian text using the FM  ALSM_EXCEL_TO_INTERNAL_TABLE last two rows are not coming properly. Tried with FM TEXT_CONVERT_XLS_TO_SAP also. Below is the code snippet.
        REFRESH: li_xlstab[].
        CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          EXPORTING
            filename                = po_file
            i_begin_col             = lc_1
            i_begin_row             = lc_1
            i_end_col               = lc_4
            i_end_row               = 5                         "lc_65536
          TABLES
            intern                  = li_xlstab
          EXCEPTIONS
            inconsistent_parameters = 1
            upload_ole              = 2
            OTHERS                  = 3.
    My excel has always 4 columns and unknown number of rows. For testing i gave 5 rows.
    Here first 4 rows are uploaded correctly. When it comes to fifth row it is still recognising as 4th row.
    Results of li_xlstab is like below.
    ROW  COL  VALUE
    0001|0001|KO                                                              |
    0001|0002|I                                                               |
    0001|0003|001                                                             |
    0001|0004|uACB0uACFC, uD3C9uAC00                                                          |
    0002|0001|KO                                                              |
    0002|0002|I                                                               |
    0002|0003|M01                                                             |
    0002|0004|uACB0uACFC, uD3C9uAC00                                                          |
    0003|0001|KO                                                              |
    0003|0002|I                                                               |
    0003|0003|M02                                                             |
    0003|0004|uACB0uACFC, uD3C9uAC00                                                          |
    0004|0001|KO                                                              |
    0004|0002|I                                                               |
    0004|0003|M03                                                             |
    0004|0004|uACB0uACFC, uD3C9uAC00##KO                                                      | "Here its going wrong
    0004|0005|I                                                               |
    0004|0006|M04                                                             |
    0004|0007|uACB0uACFC, uD3C9uAC00##                                                        |
    After 4th row 4th column it should take 5th row 1st column. But it is taking as 4th row 5th column. Also in 4th row 4th column u can see some # symbols and KO after korian text. This value KO should be the 5rh row 1st column value.
    When i run the same program in office 2003 machine with the same file it is working perfectly fine.
    Hope u guys got the problem.
    Thanks,
    Vinod.

  • Runtime exception for Date format

    Hi,
    Scenario : RFC to IDOC
    found the error in my payload :
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ZORDERS06/IDOC/E1EDK03/DATUM. The message is: Unparseable date: "2008-05-19" at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    Here i has used DateTransformation from the Date Function.
    How can i give the format for Target side here.
    Regards,
    yeswanth.

    Hello Yeshwanth,
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ZORDERS06/IDOC/E1EDK03/DATUM. The message is: Unparseable date: "2008-05-19" at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    Here i has used DateTransformation from the Date Function.
    In Date Trans Properties:
    In Format Source date u select : yyyy-mm-dd
    In Target Format u select: yyyy/mm/dd
    Thanks,
    Satya

  • How to handle runtime exceptions for sync scenario?

    Hi Experts,
       I have a synchronous scenario.
       Request :
       webservice -
    > sends input data -
    > PI -
    > SAP R/3 --BAPI
       Response:
       webservice -<---  PI <sends back any validation error or successfully processed message----- SAP R/3 --BAPI
       Here a webservice uses SOAP adapter to send input data to PI. While PI uses ABAP proxy to send data to SAP R/3.
       The problem is when the BAPI takes too long to process and resulting in timeout exception in PI. Is there some way we can catch this runtime exception in PI and send it to webservice as response?
       Please help!
    Thanks & Regards,
    Gopal

    Hi Gopal,
    as mentioned by otheres: the main issue is here to detect the reason for performance lack...
    >Is there some way we can catch this runtime exception in PI and send it to webservice as response?
    You can invoke a Business Process and open a sync / asyn Bridge. In the process call the FM synchronous and define an exception branch which you access in case of system failure. In the exception branch execute a transformation step to fill the response container with a corresponding error message.
    Regards,
    Udo

  • Mapping Runtime Exception - How to see complete error message?

    Hello,
    we have a mapping runtime exception in SXMB_MONI. However only the first 4 lines are displayed are shown in <SAP:Stack>, the rest of the error message is needed however for trouble shooting.
    Is there any way to display the full error message? Executing a unit-test in ESR is not possible as there are some functions executed which just work during runtime.
    Thank you.

    Resolved: The full error is visible in the trace section of the header.

  • Other than ODBC error

    Hi Team,
    What are the errors that we can found other than the odbc error in obiee can please share the document if you have.
    Thanks in advance

    Hi,
    Some common errors-
    Unable to Log In
    Error connecting to the Oracle BI Server: Could not connect to the Oracle BI Server because it is not running or is inaccessible. Please contact your system administrator.
    Error Codes: WH4KCFW6:OPR4ONWY:U9IM8TAC
    Common cause(s):
    •"Oracle BI Server" windows service is not running. Starting the service could resolve the issue.
    •In case the BI Server service is running and still the error occurrs, check the port the service is listening to is matching with the port specified in the ODBC DSN for the analytic repository. In NQSConfig.ini file look for RPC_SERVICE_OR_PORT. The default value is 9703. The ODBC DSN name can be found in instanceconfig.xml
    "Oracle BI Server" windows service is not starting.
    Common cause(s):
    •The RPD file specfied in the NQSConfig.ini doesn't exist in the repository folder.
    •RPD file may be inconsistent. Open it using Admin tool in offline mode and fix the consistency errors.
    Error Generating Chart
    Error Codes: ETI2U8FA
    Common cause(s):
    •"Oracle BI Java Host" windows service is not running. Starting the service could resolve the issue.
    Access denied for user to path /users/username/_portal.
    Error Codes: O9XNZMXB
    Common cause(s):
    •The specified user doesn't have permission to read/write to the his/her catalog folder. To resolve the issue, login as Administrator and grant permission to the user to his/her catalog folder using catalog manager.
    Check the below links too-
    http://debaatobiee.wordpress.com/category/obiee-11g-2/errorsbugsissues/
    http://total-bi.com/category/obiee-errors/
    http://total-bi.com/category/obiee-errors/page/2/
    http://obiee-blog.info/tag/obiee-bug/
    Hope this helped
    Regards
    MuRam
    Edited by: MuRam on May 29, 2012 8:32 AM

  • The error console, I clear it and 4 minutes later it has 100's of yellow, pink & blue message lines in it, without me making 100's of clicks or commands ?? .... Other than the error console filling up faster than a superman, it seems to be working fine.

    The error console, I clear it and 4 minutes later it has 100's of yellow, pink & blue message lines in it, without me making 100's of clicks or commands ?? .... Other than error console filling up faster than a superman, it seems to be working fine. why does it register so many yellow, pink & blue warnings, errors, etc. ???
    This happens no matter where I am browsing, yahoo, google, mail or news. Clearing the console seems to help with the speed of FF after an hour or so of browsing, it slows down terribly and if not cleared and or shut down and relaunching FF, both actually, it is painfully slow, like dial-up.

    Hi Mac Attack,
    My computer will not disconnect from the internet.  It seems to find a clone router and continues even when I shut down and unplug my my own home iy
    Your main question was 'chopped' in the title. Please reply in the body of a reply box with the full question and anything you have tried. And no, the long report was not helpful .
    If the same website is opening each time you launch a browser (Safari?) hold down the shift key as you launch to prevent previous pages from opening.
    Have a look at your settings in Safari > Preferences. Especially General and Privacy.
    Reset Safari to remove cookies and other stored data.
    System Preferences > General
    Have a look at your settings in System Preferences >  Security & Privacy.
    Call back with more questions.
    Regards,
    Ian

  • Enabling Motion Detection on 2621V: "Video for other platform/os" error

    Team,
    trying to get motion detection on my CIVS 2621V enabled. Running Firmware Version: V4.4.2-2
    I always get the Video for Other Platforms error not matter which browser that I am using or different systems.
    Searched around and found some posts from some COTS video surveillance systems from Cisco running into the same issue but nothing here.

    It's likely you'll need a much older version of IE in order to set this up natively.  I believe the original user guide for the 2621 actually called for IE 6 on Windows XP.
    http://www.cisco.com/c/en/us/td/docs/security/physical_security/video_surveillance/ip_camera/2621/user_guide/2621ug.pdf
    ... although I seem to recall doing this with something as recent as IE 8 without issue.
    I actually have to keep a VM and an old XP workstation with VNC on it to work with some of the much older hardware :-S

  • TS4268 I can't receive text on my IPad except for other apple users

    I can't receive text on my IPad except from other apple users. My Iphone works fine, texting to Ipad, however I can't receive from others.

    SMS/MMS is a voice cell technology and not natively supported on any device not a cellphone. Messaging through iMessage is the only method included with the iPad. There are third-party apps that support SMS messaging available the iTunes Store, though I don't know how well any of them work or if indeed any can support receving SMS messages or can only send.
    Regards.

Maybe you are looking for