Java Error Handling-Something Weird

While working with Exception Handling I've found (written in java manuals) that we can't handle Errors in catch blocks.
Is it correct? Or experts want to write that we shouldn't handle but we can handle them. For example:
try
some recursion;
catch(StackOverflowError soe)
System.out.println("overflow handled");
Any commnets on this would be highly appreciated.
Thanks,
Kartikeya

I would really appreciate if someone shed some light on this.
It is really weird and I am unable to understand this.
I am asking the question again for reference
While working with Exception Handling I've found (written in java manuals) that we can't handle Errors in catch blocks.
Is it correct? Or experts want to write that we shouldn't handle but we can handle them. For example:
try
some recursion;
catch(StackOverflowError soe)
System.out.println("overflow handled");
Any commnets on this would be highly appreciated.
####################

Similar Messages

  • Bursting with JAVA APIs / MultiThreading / Errors Handling

    We are trying to use the bursting JAVA APIs 10.1.3.3.1 Standalone) to burst huge XML files and generate PDF Files from RTF templates. Here are a list of our issues with this feature:
    1. We have some problems catching the errors when bursting. We have tried to use the "oracle.apps.xdo.common.log.Logger" class, but it is not always reacting like we think it should. Could you please give us an exemple of a clean bursting error catching or a brief description of how we could do it. We have a lot of difficulties to find information about using the JAVA APIs of BIP.
    2. Is it a clean way of catching the bursting errors to use the "oracle.apps.xdo.common.log.Logger" class?
    3. When using the 10.1.3.3.1 DocumentProcessor JAVA API, the process gets killed when the RTF template is not where the control file specified it. Even when using a finally clause containing the document processor, we can't fetch the error from the "oracle.apps.xdo.common.log.Logger" class. We did not find a way to catch this error which make our program crash.
    4. How can we enable multi-threading that is included in the DocumentProcessor JAVA APIs so it can take advantage of the multi-processors environnements?

    1. Check tim d. blog, you can use the bursting listners to get the errors. It's also in the documentation.
    First, on every exception, the Bursting APIs are dumping the error in the Logger. So I can't see how we can use the listeners to catch these. We can check the hasExceptions on the Logger but still, we have some problems with this. When we deploy our application as a MDB (Message driven bean), it seems that once the hasException flag has been raised, if we call the MDB again, it is still up. Is there documentation about that Logger class? Also, I'm worried that we won't be able to call our MDB twice to run simultaneously 2 different bursting process since it seems the Logger is something static, keeping every exception in memory... That's bad.. And show me where you have found documentation about this. All I see in documentation is how to call the DocumentProcessor in a couple of lines. I don't see anything about a clean way to catch errors.
    2. Yes/No/Depends. I think it's fine. If your changing the logger options in your program that could come back to haunt you.
    I guess so, I'm not changing anything and its already haunting me...
    3. When using the 10.1.3.3.1 DocumentProcessor JAVA API, the process gets killed when the RTF template is not where the control file specified it. Even when using a finally clause containing the document processor, we can't fetch the error from the "oracle.apps.xdo.common.log.Logger" class. We did not find a way to catch this error which make our program crash.
    Even worst, when we deploy the component has an MDB, when the error happens, it kills the whole oc4j container... please correct this quick.
    4. How can we enable multi-threading that is included in the DocumentProcessor JAVA APIs so it can take advantage of the multi-processors environnements?
    We got an answer from the dev team which is to add two properties to the document processor, something like:
    enable-multithreading: true
    thread-count: >2
    We did that and what we got is that the process started and it got stuck in a dead lock at the first document processing. How nice! :)
    We got a milestone in March and I'm really worried about all those problems... Not enough documentation, a pretty bad error handling, errors making crash the whole oc4j container, Logger seems not to be handling simultaneous calls/ threads, not even handling two subsequent calls... etc.
    If anyone has the magic answer, it would be pretty welcomed!
    Thanks

  • Error handle request; Root exception is: java.lang.NoSuchMethodError

    Hello Guys,
    I am running EBS 11i, rdbms 10g on OEL4. After applying a bunch of patches to resolve some IE issues I ran into an error:
    "FRM-41072: Cannot create group ACTION_REC_GROUP" when trying to cancel a PO.
    An SR directed me to apply patch 8286920 which indeed fixed the FRM-41072 error. After this patch "Logon to Oracle Applications Manager" is not possible as the page gives me :
    Error handle request; Root exception is: java.lang.NoSuchMethodError: oracle.apps.fnd.security.AolSecurity.userPwdHash(Ljava/lang/String;)Ljava/lang/String;
    MOS thinks that patch 8286920 didn't break OAM but I don't think so since this is only happening on my DEV and TEST systems on which I have applied the patch. PROD, wihtout the patch, is accessible through OAM just as usual?
    Any thouths?
    Thank you
    Mathias

    Did you apply all patches mentioned in the following docs?
    FRM-41072 - Unable to Cancel Purchase Order or Purchase Order Line or Release [ID 947402.1]
    Change Tax Code in the Purchase Order Gets Error - Could not reserve record (2 tries) Keep trying [ID 956047.1]
    Autocreate Process Does Not Default Purchase Order Form As The Active Window After PO Is Created - Does Not Come To The Front [ID 1055623.1]
    Did you bounce all the services and see if you ca reproduce the issue?
    What about clearing the server cache files? -- How To Clear Caches (Apache/iAS, Cabo, Modplsql, Browser, Jinitiator, Java, Portal, WebADI) for E-Business Suite? [ID 742107.1]
    Can you find any errors in the database/apache log files? Any invalid objects?
    If you have verified all the above please update the SR with the error you have after applying that patch.
    Thanks,
    Hussein

  • Advantage of Java Exceptions over C error handling.

    I understand the advantages of Java Exception handling(as against C) when it comes to the ability to define exclusive Exception types or reuse exceptions, documentation benefits of the throws clause, advantages due to OO etc. But some people say that using exceptions in Java it is possible to recover from an exceptional condition and that's an advantage over how errors are dealt in C.
    Is that really an advantage? (I mean is that true?)AFAIK in C errors can be handled using perror or errno.h. For every error code generated there seems to be a description. And by checking the return values from functions we could see if there had been an exceptional condition and if there really had been one take appropriate action and recover from the error. So how is it that Java can recover from exceptions while in C it is not possible to recover from errors?
    Thank you very much.

    I'm waiting in my cold cell when the bell begins to chime
    Reflecting on my past life and it doesn't have much time
    Cos at 5 o'clock they take me to the Gallows Pole
    The sands of time for me are running low
    When the priest comes to read me the last rites
    I take a look through the bars at the last sights
    Of a world that has gone very wrong for me
    Can it be there's some sort of error
    Hard to stop the surmounting terror
    Is it really the end not some crazy dream
    Somebody please tell me that I'm dreaming
    It's not so easy to stop from screaming
    But words escape me when I try to speak
    Tears they flow but why am I crying
    After all I am not afraid of dying
    Don't believe that there is never an end
    As the guards march me out to the courtyard
    Someone calls from a cell "God be with you"
    If there's a God then why has he let me die?
    As I walk all my life drifts before me
    And though the end is near I'm not sorry
    Catch my soul cos it's willing to fly away
    Mark my words please believe my soul lives on
    Please don't worry now that I have gone
    I've gone beyond to see the truth
    When you know that your time is close at hand
    maybe then you'll begin to understand
    Life down there is just a strange illusion.
    Yeah, yeah, yeah, Hallowed be thy name
    Yeah, yeah, yeah, Hallowed be thy name

  • Error handling notification type=Platform,Domain=java.lang,subType=GC

    I'm seeing this error over and over. Odd that 17 and 18 are not listed as members.
    -Andrew
      MemberId|ServiceVersion|ServiceJoined|MemberState
        2|3.7.1|2012-03-28 08:59:53.744|JOINED,
        4|3.7.1|2012-03-28 04:42:03.799|JOINED,
        6|3.7.1|2012-03-28 05:22:21.955|JOINED,
        7|3.7.1|2012-03-28 05:55:56.571|JOINED,
        8|3.7.1|2012-03-28 05:55:56.584|JOINED,
        9|3.7.1|2012-03-28 06:42:46.461|JOINED,
        10|3.7.1|2012-03-28 06:00:00.698|JOINED,
        11|3.7.1|2012-03-28 08:20:01.535|JOINED,
        12|3.7.1|2012-03-28 08:20:02.32|JOINED,
        13|3.7.1|2012-03-28 08:21:12.046|JOINED,
        14|3.7.1|2012-03-21 09:10:59.991|JOINED,
        16|3.7.1|2012-03-21 09:11:03.034|JOINED,
        20|3.7.1|2012-03-21 09:10:59.236|JOINED,
        22|3.7.1|2012-03-21 09:11:00.273|JOINED,
        23|3.7.1|2012-03-21 09:11:02.329|JOINED
      RecycleMillis=1200000
      RecycleSet=MemberSet(Size=0
    TcpRing{Connections=[23]}
    IpMonitor{AddressListSize=1}
    2012-03-28 09:00:04.395/11.378 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Service Managemen
    t joined the cluster with senior service member 14
    2012-03-28 09:00:04.659/11.642 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Error handling no
    tification type=Platform,Domain=java.lang,subType=GarbageCollector,name=ParNew,nodeId=18
    2012-03-28 09:00:04.677/11.660 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Error handling no
    tification type=Platform,Domain=java.lang,subType=GarbageCollector,name=ParNew,nodeId=17
    2012-03-28 09:00:04.693/11.676 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Error handling no
    tification type=Platform,Domain=java.lang,subType=GarbageCollector,name=ParNew,nodeId=18
    2012-03-28 09:00:04.706/11.689 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Error handling no
    tification type=Platform,Domain=java.lang,subType=GarbageCollector,name=ParNew,nodeId=17
    Map (?):
    2012-03-28 09:00:04.875/11.858 Oracle Coherence GE 3.7.1.1 <D5> (thread=Invocation:Management, member=2): Error handling no
    tification type=Platform,Domain=java.lang,subType=GarbageCollector,name=ParNew,nodeId=18

    No ideas on a cause or solution for this? I only saw it once and I don't know how to reproduce it.
    -Andrew

  • Owb process flow error handling

    Hi,
    I am using OWB 10gR2.
    I have 2 process flows that each call a series of mappings. Then I have one "master" process flow that calls the two aforementioned proecess flows. When a mapping errors, I want my whole master process flow to abort. I put error handling in, but it doesn't seem to work. For example, if I get an error in the first process flow, I get my email notification that something is wrong. The process ends. However, the master process flow continues to go. I want it to stop. It continues to go because there wasn't an error in the first process flow. The error was handled, and the process flow ended successfully. Does anyone have any tips or tricks on how to handle this type of situation? I'm not doing anything revolutionary. I'm just new to these process flows.
    Thanks,
    Tim

    hmm ok this sounds a bit weird to me.
    I've created similar processflows with customers and never had similar problems like you describe.
    Just to verify your design, here is how I would solve your master1 processflow.
    _______________________END_WARNING
    w w
    start----PF1----------s---------------PF2------s---- END_SUCCESS
    e e
    \___________________\____END_WARNING
    where the conditions for the transitions is indicated with w for warning, s for success and e for error.
    Some poorly made ascii art there but hopefully you get the idea...:p
    This also sounds like what you've done already and with extra email functionality.
    Are you sure that pf2 starts after pf1? Or can it actually run in parallel with pf1 but just finishes after pf1 so it seems like it its done afterwards? The reason I ask is that I experienced that in one of my processflows with around 30+ mappings, one of the mappings that was supposed to be executed almost at the end, executed before everything else and messed everything up. It was quite the annoying little bug and took a long time for me to discover. If you have noticed on the transitions, there is a little number next to the line on the canvas, indicating in which order the operators are to be executed. In my case, two transitions had the same number and that caused one of the mappings to just start as soon as the processflow was told to start. If this is the case there is a way to set these, but I don't remember right now. Delete and recreate the transitions also do the trick I think.
    Hope you figure it out!
    Ragnar
    edit: seems like my ascii art got a bit messed up... :(
    Message was edited by:
    rhaug

  • Error Handling in Forms

    Dear all,
    we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003.
    Error handling is a very big issue.
    i try to do the following, just correct me, or make the trigger more efficient.
    i face unexpected messages, like a message two time displayed, sometime important message never displayed.
    i just set the :system.message_level =20 in the when-new-form-instance trigger.
    and create on-error trigger like below
    declare
    errcode number:=error_code;dbmserrcode number;dbmserrtext varchar2(200);
    formtxt varchar2(200);
    errtype varchar2(3);
    begin
    --------- user defined database exceptions errors raised by --RAISE_APPLICATION_ERROR
    IF DBMS_ERROR_CODE in (-20738,.......) then
    raise form_trigger_failure;
    end if;
    if error_code=50017 then
    message('duration must be between 0 and 23');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif
    error_code=40202 then
    clear_message;
    message('please provide the required fields.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif error_code=50022 then
    clear_message;
    message('time must be in the correct format.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    if error_code in (40509,40508) then
    dbmserrcode:=dbms_error_code; dbmserrtext:=dbms_error_text;
    if dbmserrcode=-1438 then
    clear_message;
    message('your number is too large.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1400 then
    clear_message;
    message('your forgot to provide a value.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-2291 then
    clear_message;
    message('header is not found for this insertion.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1 then
    clear_message;
    message('record already exists');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    exception
    when others then
    if dbms_error_code=-20738 then
    clear_message;
    message('Error: absent or later record errror from the database trigger.);
    raise form_trigger_failure;
    elsif .....
    esle
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    end;any suggession?
    Regards

    i must come with a plsql code which handle every error and suppress unnecessary messages.Good luck with that. No matter how well thought out or planned, you're not going to be able to take all scenarios into account. The design of an exception handler takes time to address all possible scenarios you want handled and even then, you're not likely to handle every situation in the beginning.
    could we implement the oracle ebusiness error handling procedures here in our application?if yes, then where could we find that procedure?>
    I've dug through that code and it is not a thorough as you think it is. It handles specific situations and then defaults the rest. It is a good model for your own exception handler, however. That is what I used it for. :) I don't recall which library it is in, but I'll look around and if I find it, I'll post it.
    I agree with Andreas's comment...
    Simply remove your ON-ERROR-trigger, then you have a default. That's nothing better or worse than what apex has.I'm not too familiar with Apex; I've worked with it, but it's been a little while. Even with Apex, you're going to have to develop a customized Exception Handler so more intuitive or application specific messages are displayed in response to an exception.
    As to Andreas's comment...
    For your own error-handling... The "simplest" way in my eyes is create your own error-table where you have appropiate columns for the error-code and the error-type (FRM,ORA,Whatever), then in your ON-ERROR-trigger read the appropiate record from that table and show the error. You could also have a flag in your table which decides what to do with a specific error (Show as Message, Show as Alert, Don't show at all) and react accordingly.This is exactly what we implemented in our application. We created a set of tables that contain all of the Oracle Runtime errors and their attributes (Error Type, Severity Level, etc). Then we wrote a standard On-Error trigger that is subclassed to all of our forms that calls a Library "On_Error" package. This package evaluates the exception raised, compares it to the database entry for the error and then displays an appropriate message depending on the Severity Level, Error Type (ORA or FRM) and Message Type (Informational, Error, Caution) and we display the message in either the Status Bar, Note Alert, Caution Alert or Stop Alert or it is supressed. If an error is not found in the table, then it is displayed in a Stop Alert as an "Unhandled Exception." The second table I mentioned contains all of the messages used by our application and is cross referenced with the table that contains the Oracle messages. By simply assigned one of our messages to an Oracle message - our package will display our message instead of the default Oracle Message. Yes, this took sometime to build and test and once implemented, we spent another couple of months perfecting it, but now it is pretty solid and we haven't had to modify it in over a year.
    While this level of complexity may be overkill for your application, it does offer the greatest flexibility in the long-run. Also, if your application must support multiple languages, having all of your messages in a table make internationalization extremely easy. :)
    The point of all this, is that no matter which system you use (Forms, Apex, or Java) you will still need to invest some time into designing an Excpeiton Handling method for your application and then implement it accross the application. This is not something you can develop in a short period of time and it will not be perfect in the beginning. However, in the long-run, you will be happy you spent the time up-front to build a flexible and robust Exception Handling system.
    Craig...

  • Error Handling with JPA

    I'm working on a JPA/TopLink Essentials/ADF faces application. It's going well except that I don't have a clue how to get on top of the error handling. JPA doesn't seem to have any. I would assume that there must be a Toplink extension[b] to find out what errors/codes etc are being produced. ADF faces does a ok job of showing them on screen but the handling should be more user friendly for errors like invalid foreign key, unique key violation etc.
    Since there is no return and no exceptions declared on JPA functions like persist(), I assume that there must be some sort of listener that I can register to handle the errors myself. If ADF Faces can get the errors then so can I, but how??
    Any help would be appreciated
    Mark

    The "errors" raised by the persistence provider for the types of "errors" you mentioned are all runtime exceptions of the PersistenceException variety. See the javadoc for this class and also look at its subclasses: http://java.sun.com/javaee/5/docs/api/javax/persistence/PersistenceException.html
    Since PersistenceException is an unchecked runtime exception, its up to you to catch it at whatever point you decide to handle these types of problems in your application (i.e. in the service layer which would communicate the problem to your view layer to display something user friendly). Make sense?

  • ADF Mobile Error handling and redirect

    I'm stuck on how to handle errors within my ADF Mobile application. My application consumes a number of web services and we have found we often get error messages when phone connections switch from wifi to 3g or lose connection altogether. These are errors such as SSL handshake failure, HTTP500 errors, and also errors where it can't display the binding eh "Unable to get value for the property due to invalid binding iterator" because a WS call has failed. From the little information I can find - and none of it specific to ADF Mobile, I think I need to write an error handler class which I set against ErrorHandlerClass in databinding.cpx - if that correct? Am I able to catch these errors using that method and if so has anyone got any examples at all. Ideally what I'd like to do when I've caught those errors is redirect to another page (showing something like facebooks app does when it loses a connection and says tap to try again), does anyone have any suggestions or examples?
    thanks
    lynsey

    A sample for ADF Mobile Error Handling.
    SDA013
    Error Handling in ADF Mobile
    https://java.net/projects/smuenchadf/pages/ADFMobile#SDA013

  • Error Handling and Freeing-up Memory

    I'm trying to write my java programs as responsibly as possible. When an exception is caught and sent to my catch block, in order to properly free up memory do I need to set all objects (created prior to the error occurance in the try block) to null or does Java do this for me at the termination of the routine or thread? I used to do this in VB within my error handlers. For example, in VB, if I had created an XYZ object and an error occured later on, before I was done using object XYZ, as part of my error handler I would "Set XYZ = Nothing". Is something similar needed in Java?

    Well it is always good to do a clean up routine you can do this by makeing a method that will set things to null and such and you also can use finally after the exception handler has exit and close streams and such in the finally {} catch also you can forcing finalization and carbage collection
    here is a link for that
    http://java.sun.com/docs/books/tutorial/essential/system/garbage.html
    but I thank it is alway good programming practice to clean up after your self
    ps I hope this helps

  • Xml forms - Error handling HTTP request

    Hello,
    We have installed portal 6.0
    I've made some forms with the xml form builder, imported them into IViews (KM navigation IView) and assigned the IViews to a role
    The Iview shows the RenderListItem form
    Every Iview (RenderListItem form) has a "new item" button
    Every record of the iview has a edit-delete action
    When I press the "new item" button or the edit button (or save button) I get the following error:
    Error handling HTTP request. Check the log file for more information.
    java.lang.RuntimeException: Context is unavailable!
         at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMConnection.(DMSRMConnection.java:83)
         at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMR3FunctionCalls.getGenericValueList(DMSRMR3FunctionCalls.java:6532)
         at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMR3FunctionCalls.getLaboratoryList(DMSRMR3FunctionCalls.java:6360)
         at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMLaboratoryValueProvider.getAllowedValues(DMSRMLaboratoryValueProvider.java:79)
         at com.sapportals.wcm.service.propertyconfig.config.MetaName.getAllowedValues(MetaName.java:781)
         at com.sapportals.wcm.service.propertyconfig.config.MetaName.allowedValueIterator(MetaName.java:472)
         at com.sapportals.wcm.service.xmlforms.ResourceProperties.appendAllowedValues(ResourceProperties.java:713)
         at com.sapportals.wcm.service.xmlforms.ResourceProperties.mergeProperty(ResourceProperties.java:682)
         at com.sapportals.wcm.service.xmlforms.ResourceProperties.mergePropertiesIntoDom(ResourceProperties.java:611)
         at com.sapportals.wcm.service.xmlforms.transformation.HtmlGenerator.getHtmlStream(HtmlGenerator.java:116)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformation.render(Transformation.java:391)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformation.render(Transformation.java:336)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformation.render(Transformation.java:188)
         at com.sapportals.wcm.app.xmlforms.EditServlet.doGetAction(EditServlet.java:165)
         at com.sapportals.wcm.app.xmlforms.XFBaseServlet.doGet(XFBaseServlet.java:241)
         at com.sapportals.wcm.app.xmlforms.XFBaseServlet.doPost(XFBaseServlet.java:261)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.wcm.app.xmlforms.XFBaseServlet.service(XFBaseServlet.java:134)
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:331)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    This error doesn't always appear, there are times that the portal works correct and when I can add items, edit them and save my changes
    Does anyone have an idea where the error comes from? In what direction I have to search? How I can solve this problem?
    Thanks in advance, points will be distributed for helpfull answers

    Hi,
    I didn't place a save button on the RenderListItem but on the Edit form so this couldn't be the issue...
    I solved the error I got when I wanted to save my form
    The edit and delete buttons also work correct...
    I only get the error mentioned above when I press the "new form" button, I created that button with the CreateXMLForms action group that I added in my Collection Grid renderer settings (option collection command group)
    Then I changed my form availibility (System administration ->system configuration ->KM->CM->form based publishing->form availibility->folder settings)
    I created the following folder settings:
    foldername//priority//path//forms to exclude//forms to include
    library//10 //documents/testlibrary//Smarties, QnA,SAP_APP_News//library
    News //10 //documents/News//smarties, library, QnA// SAP_APP_News
    QnA //10 //documents/testQuestionAnswer// SAP_APP_News, smarties, library //QnA
    Smarties //10 /documents/testSmarties
    Did I do something wrong here? What can cause this error? In what direction should I search?

  • Where to find Java errors in the RAS server?

    Hi,
    I have a Java data source in the RAS server.  As I do development, there are plenty of issues I work through, but some take a while to troubleshoot because I haven't found where  Java exceptions are logged.  For example, if I don't have all the classes packaged up correctly in the RAS server, that would cause a class-loading exception.  However, I have not found where that exception is logged.  I looked in the D:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\Logging directory, but I don't see any Java errors there.
    Can anyone point me to where I can find the Java errors that occur in the RAS server?
    Thanks!,
    Eric

    Java data sources for Crystal Reports are handled by a separate process, the JavaServer, that communicates back to the Crystal engine via CORBA TCP/IP connectivity.  So the RAS server itself isn't in the flow path, but even then, the JavaServer would not send back details of the exception.  Typically what RAS server itself reports is something along the lines of "Unexpected Error".
    If your Java data source is custom code you can modify, are you able to log separately, if you haven't already? That won't resolve the classloader issue, but may help troubleshoot other issues.
    Sincerely,
    Ted Ueda

  • Error handling from PCO Query

    Hi,
    In my project I am integrating with a PLC through SAP PCO and OPC server.
    I am currently testing error handling if something fails on any of the involved systems.
    As a first test I stopped the agent instance that I use to read data from the PLC.
    When I try to write through the agent instance with a PCO Quaery I get no errors.
    The 'Success' attribute of the PCO Query is 1.
    The 'LastErrorMessage' attribute is empty.
    The only indication is the 'Output'which contains an error message.
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowsets CachedTime="" DateCreated="2015-03-19T09:58:49" EndDate="2015-03-19T09:58:48" StartDate="2015-03-19T08:58:48" Version="14.0 SP5 Patch 12 (1-okt-2014)">
         <Messages>
              <Message>PoederMagazijn/ATS PLC/General/NewDataReady_InputTypeMessage: java.net.ConnectException: Connection refused: connect</Message>
         </Messages>
    </Rowsets>
    However, the same <Message> tags are used for success messages as well. So there is no clear way to identify an error.
    Is there any other way I can be sure the PCO query was able to write and catch any errors?
    FYI: we are using PCO 2.3 and MII 14.0
    Thanks!

    A small update. I tried again by upgrading the PCO version to 15.0 But still the same.
    I did the following 2 test cases:
    Unplug the UTP cable to the PLC and write data via PCO query
    Disable the agent instance and write data via PCO query
    In both cases the PCO Query returned the following output:
    Success: 1
    LastErrorMessage: <empty>
    The only information that I get is in the results but it is not a good practice to interpret this because I don't know all the possible messages.
    Result for Case 1:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T14:13:18" EndDate="2015-03-26T14:13:12" StartDate="2015-03-26T13:13:12" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Unspecified error</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/ProductDescription: Operation failed</Message>
        </Messages>
    </Rowsets>
    Result for Case 2:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets CachedTime="" DateCreated="2015-03-26T12:11:37" EndDate="2015-03-26T12:11:35" StartDate="2015-03-26T11:11:35" Version="14.0 SP5 Patch 12 (1-okt-2014)">
        <Messages>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityTarget: java.net.ConnectException: Connection refused: connect</Message>
            <Message>PoederMagazijn/ATS PLC/M1 Order Dispatch/OrderQuantityConfirmed: java.net.ConnectException: Connection refused: connect</Message>
        </Messages>
    </Rowsets>
    Please advice. I cannot provide any transaction integrity at this time. I would assume this to be one of the base principles of PCO.

  • Error handling, error-page

    http://wiki.apache.org/myfaces/Handling_Server_Errors
    has a bunch of info on error handling in myfaces. Is there something similar for mojarra? Or is any of this relevant for mojarra? Thx.

    user3935812 wrote:
    I have the same question.No kidding, seeing as you are the exact same user...
    This is all Myfaces specific. The best you can do in a standard web environment is to use the error handling built into the server, which basically means catching specific HTTP error codes. Here is an example:
    http://www.java2s.com/Tutorial/Java/0400__Servlet/ServletErrorPage.htm

  • Would like to redirect java error ExceptionHelper.java

    Hi All,
    I think this might be the right forum... anyway, I'd like to redirect this java exception handler to a different URL. Pretty simple.
    I've tried this line of code, but I can't compile... might just be in the wrong place, line 348 :
    response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') );This is the whole exception file. Thank youf or your help.. I'm a newbie...
    * Copyright � 2001 The JA-SIG Collaborative.  All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
    *    the documentation and/or other materials provided with the
    *    distribution.
    * 3. Redistributions of any form whatsoever must retain the following
    *    acknowledgment:
    *    "This product includes software developed by the JA-SIG Collaborative
    *    (http://www.jasig.org/)."
    * THIS SOFTWARE IS PROVIDED BY THE JA-SIG COLLABORATIVE "AS IS" AND ANY
    * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JA-SIG COLLABORATIVE OR
    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    * OF THE POSSIBILITY OF SUCH DAMAGE.
    package org.jasig.portal;
    import java.io.PrintWriter;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ExceptionHelper {
        private static final Log log = LogFactory.getLog(ExceptionHelper.class);
        // List of strings to match in traceback for various containers
         // This array must be expanded as additional Application Server
         // containers become better known
        public static final String boundaries[] =
                  "at javax.servlet.http.HttpServlet."
         * Generate traceback only to the Servlet-container interface.
         * @param ex any throwable exception
         * @return stack trace string without container layers
        public static String shortStackTrace(Throwable ex) {
             if (ex == null)
                  return "";
            java.io.StringWriter sw = new java.io.StringWriter();
            ex.printStackTrace(new java.io.PrintWriter(sw));
            sw.flush();
            String stktr = sw.toString();
            return trimStackTrace(stktr);
         * Trims a String representation of a Stack Trace to remove
         * the portion of the trace that is in the servlet container layer.
         * @param stackTrace - String result of printStackTrace
         * @return the stack trace with portions of the trace that dive into the container
         * layer removed.
        static String trimStackTrace(String stackTrace) {
            StringBuffer trimmedTrace = new StringBuffer();
            // a List of Strings to be trimmed and appended to the buffer
            // these represent elements in the causal chain
            List fragments = new ArrayList();
            int causeCut = (stackTrace.indexOf("Caused by"));
            if (causeCut > 0) {
                // there are one or more Caused by fragments to consider
                // we traverse stackTrace, parsing out fragments for later processing
                // and updating stackTrace to contain the remaining unparsed portion
                // as we go
                while (stackTrace.length() > 0) {
                    if (stackTrace.startsWith("Caused by")){
                        // don't count the "Caused by" leading the stackTrace
                        causeCut = stackTrace.substring(9).indexOf("Caused by");
                        if (causeCut > 0)
                            causeCut += 9;
                    } else {
                        causeCut = stackTrace.indexOf("Caused by");
                    if (causeCut > -1) {
                        // stackTrace currently includes multiple fragments
                        // parse out the first and leave the rest for next iteration
                        fragments.add(stackTrace.substring(0, causeCut));
                        stackTrace = stackTrace.substring(causeCut);
                    } else {
                        // stackTrace currently is a bare fragment
                        // grab it
                        fragments.add(stackTrace);
                        stackTrace = "";
            } else {
                // there's ony a single Throwable in the chain
                fragments.add(stackTrace);
            // now that we have fragments to consider
            for (Iterator iter = fragments.iterator(); iter.hasNext();){
                String consideredFragment = (String) iter.next();
                // flag to indicate that a trimmed form of this fragment has been appended
                // to the trimmed stack trace buffer
                boolean appended = false;
                for (int i=0; i < boundaries.length; i++) {
                    int cut = consideredFragment.indexOf(boundaries);
    if (cut > 0) {
    // stack trace includes a trace through our container
    // in which we are not interested: trim it.
    // grab the desired portion up to the boundary
    trimmedTrace.append(consideredFragment.substring(0, cut).trim());
    trimmedTrace.append("\n");
    appended = true;
    break;
    if (! appended) {
    // a trimmed version of this fragment was not appended
    // because it doesn't need to be trimmed -- append the whole thing.
    trimmedTrace.append(consideredFragment.trim());
    trimmedTrace.append("\n");
    return trimmedTrace.toString();
    * Generic Exception Handler called from catch clause
    * @param eid the ErrorID (as seen from catch)
    * @param parm
    * @param ex the Exception caught
    * @throws PortalException
    public static void genericHandler(ErrorID eid, String parm, Throwable ex)
    throws PortalException {
    // *** Handle PortalExceptions ***
         // Log it if logging was deferred in .signal() call
         // Rethrow it
    if (ex instanceof PortalException) {
         if (((PortalException)ex).isLogPending())
              traceToLog(eid,parm,ex);
                   throw (PortalException) ex;
    // *** Handle all other Exceptions ***
    // Log the message and traceback
    traceToLog(eid, parm, ex);
    // Create a derived PortalException chained to this
    PortalException nex;
    if (ex instanceof Exception) {
    nex = new PortalException(eid, (Exception) ex);
    } else {
         // Sorry, at this point PortalExceptions don't chain to
         // non-Exception subclasses of Throwable
    nex = new PortalException(eid);
    nex.setLogPending(false);
    ProblemsTable.store(nex);
    throw nex;
         public static void genericHandler(ErrorID eid, Throwable ex)
              throws PortalException {
                   genericHandler(eid,null,ex);
         * Create PortalException from ErrorID and throw it. Maybe trace it.
         * @param eid ErrorId
         * @param parm Additional error information
         * @param tracenow Trace now or defer till first catch.
         * @throws PortalException
    public static void signal(ErrorID eid, String parm, boolean tracenow)
    throws PortalException {
    PortalException nex = new PortalException(eid);
              nex.setParameter(parm);
    signal(nex,tracenow);
    * Create PortalException from Errorid, trace, and throw it.
    * @param eid ErrorID to use to generate PortalException
    * @param parm Additional error information
    * @throws PortalException
    public static void signal(ErrorID eid, String parm) throws PortalException {
         signal(eid,parm,true);
    * Throw PortalException provided by caller, maybe trace it.
    * @param nex Exception provided by caller
    * @param tracenow Trace now, or later after first catch.
    * @throws PortalException
    private static void signal(PortalException nex, boolean tracenow)
    throws PortalException {
    if (tracenow) {
         traceToLog(nex.getErrorID(), nex.getParameter(), nex);
         ProblemsTable.store(nex);
    throw nex;
    * Generate, trace, and throw Portal Exception given ErrorID.
    * @param eid ErrorID
    * @throws PortalException
    public static void signal(ErrorID eid)
         throws PortalException {
         signal(eid,null,true);
    * Common logic for generating log entry of errors
    * @param eid ErrorID with initial message
    * @param parm Parameter string to append to eid msg
    * @param ex Old exception
    private static void traceToLog(ErrorID eid, String parm, Throwable ex) {
         if (ex !=null &&
              ex instanceof PortalException) {
                   if (!((PortalException)ex).isLogPending())
                        return; // This PortalException was already logged.
                   else
                        ((PortalException)ex).setLogPending(false);
    String logmsg = errorInfo(eid, parm, ex);
    log.error( logmsg);
    * Generate error string for logging or /problems online display
    * @param eid Error ID
    * @param parm Parameter string
    * @param ex Exception
    * @return Multiline text with message and traceback
    public static String errorInfo(ErrorID eid, String parm, Throwable ex) {
              StringBuffer errorinfobuffer = new StringBuffer(1000);
              if (eid!=Errors.legacy)
         errorinfobuffer.append(eid.getMessage()); // Error ID message
    else
         errorinfobuffer.append(ex.getMessage());
              if (parm != null) { // Parameter data
                   errorinfobuffer.append("\n [specific data: ");
                   errorinfobuffer.append(parm);
                   errorinfobuffer.append("] ");
              errorinfobuffer.append("\n");
              if (ex!=null)
                   errorinfobuffer.append(shortStackTrace(ex)); // Stack trace
              return errorinfobuffer.toString();
    * Generic Top-Level Exception Handler caled from catch clause
    * (doesn't rethrow exception)
    * @param eid Error ID
    * @param parm Parameter string
    * @param ex Exception caught
    public static void genericTopHandler(ErrorID eid, String parm, Throwable ex) {
    // If this is an already logged Portal Exception, we are done
    if (ex instanceof PortalException &&
         !((PortalException)ex).isLogPending()) {
         return;
    traceToLog(eid, parm, ex);
    if (ex instanceof PortalException) // already in the table
         return;
              // Create a derived PortalException (just for Problems Table)
              PortalException nex=null;
              if (ex instanceof Exception)
                   nex = new PortalException(eid, (Exception) ex);
              else
                   nex = new PortalException(eid);
              ProblemsTable.store(nex);
         public static void genericTopHandler(ErrorID eid, Throwable ex) {
              genericTopHandler(eid, null, ex);
    * Generate HTML page to send to end user after fatal error
    * @param resp Servlet response object
    * @param e PortalException received at Servlet code.
         public static void generateErrorPage(HttpServletResponse resp, Exception e) {
              resp.setContentType("text/html");
              try {
                   response.sendRedirect(response.encodeRedirectURL('http://dev.sheridan.edu/uportal/errors/') );
                   PrintWriter out = resp.getWriter();
                   out.println("<h1>Cannot start uPortal</h1>");
                   out.println("<p>Sorry, but a problem is preventing the Portal from starting. "+
                        "The error must be corrected by system administrators. Try again later.</p>");
                   //out.println("<p><a href='http://www.yale.edu/portal'>Click here to display the static Yaleinfo page.</a></p>");     
                   out.println("<!--");
                   ErrorID eid = Errors.bug;
                   String parm = "";
                   if (e instanceof PortalException) {
                        PortalException pe = (PortalException)e;
                        if (pe.errorID!=null)
                             eid=pe.errorID;
                        if (pe.parameter!=null)
                             parm=pe.parameter;     
                   out.println(errorInfo(eid,parm,e));
                   out.println("-->");     
                   out.flush();
              } catch (Exception ex) {

    I've tried this line of code, but I can't compile...
    might just be in the wrong place, line 348 :
    response.sendRedirect(response.encodeRedirectURL ('http://dev.sheridan.edu/uportal/errors/') );
    Use double quotes instead of single quotes!
    Single quotes are for char literals, not string literals.
    And next time please copy and paste the complete error message, instead of just saying "it doesn't compile".

Maybe you are looking for

  • Smart Form not going as attachment with Email

    Hi, I am configuring actions for support message and email has to be automatically sent to a particular partner based on status of support message. I am using standard actions and standard smart forms. The email is also going but without attachment.T

  • Windows 7 not recognizing iPod Touch

    I just bought a new Windows 7 Home Premium laptop and I'm trying to connect my iPod Touch to it to put my music on my new laptop (my old computer crashed with all the music from my iPod plus more, and most of it wasn't otherwise stored), but when I p

  • How to repair the iPhone 5 which buy from New York but now I am in HK

    How to repair the iphone 5 which I buy in  New York but I am now in Hong Kong I cannot but a air-ticket to New yor for repair can I repair in Hong Kong Charles <Personal Information Removed by Host>

  • Repeat the delta

    Hi, Our request is failed due to bad record in master data. It is cost center allocation datasource (CCA_9). Data Source(CCA_9) > Cube (no psa in between). I want to follow the following step to repeat the delta, Is that correct > 1. go to Manage tab

  • ABAP or BI ?!!

    Dear friends, I have been working in ABAP from last 2 years.Can any body suggest me whether I have to do ABAP certification or learn BI. Regards Kota