Deal with exceptions

I have DB tigger which has 2 select statements and sometimes in both statements
exception no_data_found raise
what i want is : when exception no_data_found is raised for the first statement do action
and do another action for the second statement, how can i do that?
And below another question ...
I have an if condition as follow in DB trigger :
BEGIN
SELECT 'X' INTO V FROM DUAL
WHERE CONDITION;
IF V IS NOT NULL THEN
DO SOMETHING1;
ELSE
DO SOMETHING2;
ENDIF ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DO SOMETHING3;
END;
About the above script when NO DATA RETRIVED I want to do DO SOMETHING2 in ELSE statement not SOMETHING3
which located in the exception section.
hope you understand my requirement
thanks :)
Edited by: user12166119 on 27/03/2013 06:37 ص

user12166119 wrote:
I have DB tigger which has 2 select statements and sometimes in both statements
exception no_data_found raise
what i want is : when exception no_data_found is raised for the first statement do action
and do another action for the second statement, how can i do that?You can include PL/SQL blocks within your trigger to handle this like so:
BEGIN
     BEGIN
          /*SELECT STATEMENT 1*/
     EXCEPTION
          WHEN no_data_found THEN
               /* Do something here */
     END;
     BEGIN
          /*SELECT STATEMENT 2*/
     EXCEPTION
          WHEN no_data_found THEN
               /* Do something here */
     END;     
END;
/

Similar Messages

  • How should I deal with exceptions?

    I have three possible choices that I see:
    (1) Deal with them in an exception handler class. Use try/catch/throw in the class. Have throw call a method in the exception handler class.
    (2) Use try/catch/throw and handle the exception in the same class where the exception occurs.
    (3) Use throws and deal with the exceptions in the mediator class. The mediator class allows for communication between my FileHandler class, my DBHandler class, my UIClass, and any future classes.
    Note that for each exception, I want to call a method in the UI class that displays a message to the user about the error so it can be debugged and a method in some class to write the error to an error log text file.

    Handling
    can mean as little as logging the error.I'm gonna have to go ahead and disagree with youthere, %.
    Disagree with me? This cannot be tolerated! 8)Watch it, lest yet get yer ass smote.
    Except for where you're intentionally
    smothering exceptions in finally blocks, or maybe
    just recording an InterruptedException, justlogging
    it is little better than smothering it. So what about unchecked exceptions? Are these .NET
    demon spawn?I let unchecked exceptions bubble up. I'd expect an appserver to catch and log them, so that a bug in one app doesn't cause the whole server to barf. But other than that kind of situation, these are exceptions that you usually shouldn't try to handle.
    >
    I'm curious, since this thread is so much about
    handling exceptions. What do people do besides
    report them? If you get a SQL exception, what
    recovery actions are you taking? Anything that I'm
    missing?Usually it just bubbles up, or it's a wrapped in a more appropriate or layer-specific exception and rethrown. Sometimes there might be a retry, but usually the exception bubbles up to the higher layers and gets presented to the user as something like, "Could not connect. Retry?" What I hate to see is this:
    try {
        // get stuff from the DB
    catch (SQLExeption exc) {
        // log it
    // Continue here (where "here" may be the calling method)
    // with no idea that anything went wong.If you do that, you might as well not have an exception mechanism. Just go back to return codes and don't bother checking them.

  • How can i deal with Exception of URI

    I am learning Expression Language, in one of the examples, there is a sentence like this: <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jst1/fmt" %>.
    the browser will throw an exception:
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application.
    How can i do with it? Thanks!

    put the standard.jar on the apllication classpath WEB-INF/lib

  • Best practices for dealing with Exceptions on storage members

    We recently encountered an issue where one of our DistributedCaches was terminating itself and restarting due to an RuntimeException being thrown from our code (see below). As usual, the issue was in our own code and we have updated it to not throw a RuntimeException under any circumstances.
    I would like to know if there are any best practices for Exception handling, other than catching Exceptions and logging them. Should we always trap Exceptions and ensure that they do not bubble back up to code that is running from the Coherence jar? Is there a way to configure Coherence so that our DistributedCaches do not terminate even when custom Filters and such throw RuntimeExceptions?
    thanks, Aidan
    Exception below:
    2010-02-09 12:40:39.222/88477.977 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache:StyleCache, member=48): An exception (java.lang.RuntimeException) occurred reading Message AggregateFilterRequest Type=31 for Service=DistributedCache{Name=StyleCache, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=1021, BackupCount=1, AssignedPartitions=201, BackupPartitions=204}
    2010-02-09 12:40:39.222/88477.977 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache:StyleCache, member=48): Terminating DistributedCache due to unhandled exception: java.lang.RuntimeException

    Bob - Here is the full stacktrace:
    2010-02-09 13:04:22.653/90182.274 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache:StyleCache, member=47): An exception (java.lang.RuntimeException) occurred reading Message AggregateFilterRequest Type=31 for Service=DistributedCache{Name=StyleCache, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=1021, BackupCount=1, AssignedPartitions=205, BackupPartitions=204}
    2010-02-09 13:04:22.653/90182.274 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache:StyleCache, member=47): Terminating DistributedCache due to unhandled exception: java.lang.RuntimeException
    2010-02-09 13:04:22.653/90182.274 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache:StyleCache, member=47):
    java.lang.RuntimeException: java.lang.ClassNotFoundException: com.edmunds.vehicle.Style$PublicationState
         at com.edmunds.common.coherence.EdmundsEqualsFilter.readExternal(EdmundsEqualsFilter.java:84)
         at com.tangosol.io.pof.PortableObjectSerializer.initialize(PortableObjectSerializer.java:153)
         at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:128)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3284)
         at com.tangosol.io.pof.PofBufferReader.readAsObjectArray(PofBufferReader.java:3328)
         at com.tangosol.io.pof.PofBufferReader.readObjectArray(PofBufferReader.java:2168)
         at com.tangosol.util.filter.ArrayFilter.readExternal(ArrayFilter.java:243)
         at com.tangosol.io.pof.PortableObjectSerializer.initialize(PortableObjectSerializer.java:153)
         at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:128)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3284)
         at com.tangosol.io.pof.PofBufferReader.readAsObjectArray(PofBufferReader.java:3328)
         at com.tangosol.io.pof.PofBufferReader.readObjectArray(PofBufferReader.java:2168)
         at com.tangosol.util.filter.ArrayFilter.readExternal(ArrayFilter.java:243)
         at com.tangosol.io.pof.PortableObjectSerializer.initialize(PortableObjectSerializer.java:153)
         at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:128)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3284)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2599)
         at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
         at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.distributedCacheRequest.partialRequest.FilterRequest.read(FilterRequest.CDB:8)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$AggregateFilterRequest.read(DistributedCache.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:117)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: com.edmunds.vehicle.Style$PublicationState
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at com.edmunds.common.coherence.EdmundsEqualsFilter.readExternal(EdmundsEqualsFilter.java:82)
         ... 25 more
    2010-02-09 13:04:23.122/90182.743 Oracle Coherence GE 3.4.2/411 <Info> (thread=Main Thread, member=47): Restarting Service: StyleCacheOur code was doing something simple like
    catch(Exception e){
        throw new RuntimeException(e);
    }Would using the ensureRuntimeException call do anything for us here?
    Edited by: aidanol on Feb 12, 2010 11:41 AM

  • Dealing with javax.faces.application.ViewExpiredException in jsf 1.2

    Hello,
    I am working on a jsf 1.2 application and I am trying to implement a way to deal with the ViewExpiredException. Here is what I tried:
    <error-page>
    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/WEB-INF/include/viewExpired.jsf</location>
    </error-page>
    (there is a viewExpired.xhtml file in the same folder as the jsf file)
    What happens is that the above exception is indeed thrown by my app by an ajax component but the error page is not displayed leaving the user with an application that is not working.
    Can anyone please help?
    Thanks in advance,
    Julien.

    Facelets tends to wrap exceptions into generic ones; anything that is not an IOException or a RuntimeException is wrapped into a FacesException. Thus your ViewExpiredException is not the top-level exception anymore and the error-page rule won't work.
    The way I work around this is to define my own view handler to be able to deal with exceptions myself. I figured this out from some article, but I cannot find it anymore. So I'll just post what I have:
    public class MyFaceletsViewHandler extends FaceletViewHandler {
      // TODO: replace with your own log API
      protected Logger  logger = Logger.getLogger(getClass().getName());
      public MyFaceletsViewHandler(ViewHandler parent) {
        super(parent);
      protected void handleRenderException(FacesContext context, Exception ex) throws IOException, ELException, FacesException {
        try {
          Throwable rootcause = findRootCause(ex);
          context.getExternalContext().getSessionMap().put("exception", rootcause);
          logger.error("Error rendering view!", ex);
          // TODO: put correct path to error page here
          ((HttpServletResponse) context.getExternalContext().getResponse()).sendRedirect("error.jsf");
          context.responseComplete();
        catch (IOException ioe) {
          logger.fatal("Could not process redirect to handle application error", ioe);
      private Throwable findRootCause(Throwable t){
        Throwable ret = t;
        while(ret.getCause() != null && ret.getCause() != ret){
          ret = ret.getCause();
        return ret;
      }And in your faces-config.xml:
    <application>
            <view-handler>package.to.MyFaceletsViewHandler</view-handler>
        </application>In the view handler you can then target specific exceptions if you want, like your ViewExpiredException. I added a little trickery to search for the root cause of the exception; that is usually the only part of an exception stacktrace that I'm interested in.
    If anybody knows a better way to deal with specific exceptions in facelets, please share.

  • Best way to deal with Mutating table exception with Row Level Triggers

    Hello,
    It seems to be that the best way to deal with Mutating Table exception(s) is to have to put all the trigger code in a package & use it in conjunction with a Statement level trigger .
    This sounds quite cumbersome to me . I wonder is there any alternative to dealing with Mutating table exceptions ?
    With Regards

    AskTom has a good article about this,
    http://asktom.oracle.com/tkyte/Mutate/index.html

  • How to deal with Flex Exceptions ??

    Hi ,
    I know how to handle an Exception when dealing with Flex with server side that is , when an Exception comes from the server side (java) i can easily handle that on the fault event with the help of ErrorMessage .
    But can anybody please let me know how to handle an Exception when it comes on to the ActionScript and show it to the User .
    For instance , i have seen a half example like this :
    try
    catch(error:EOFError)
    MyTextFiled.text = error.toString();
    Now please let me know how can i show this to the End User ??
    And i can only see Errors in ActionScript , is there anything like Exceptions on to Flex??
    Thanks in advance .

    you can use any one of following
    mx.controls.Alert.show(
    "Error:"+e.message.toString())mx.controls.Alert.show(
    "Error:"+e.toString());

  • How can I deal with the "throw exception"?

    A function has the following definition:
    import javax.naming.NamingException;
    public BinRelation readBinRelation() throws BadInputDataException,IOException
    When I use this function as follows:
    BinRelation binRel;
    binRel = readBinRelation();
    then comes the error:
    unreported exception javax.naming.NamingException; must be caught or declared to be thrown.
    So how can use this function correctly?
    Thanks

    So how can use this function correctly?By learning what exceptions are, how they're used, and what you can do to deal with them. There's a tutorial here: http://java.sun.com/docs/books/tutorial/essential/exceptions/index.htmlAnd here's a quick overview:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • How to deal with IO Exception: Not  Enough Space

    I always get the error message like IO Exception: Not Enough Space, following is the information on my desk , is not suppose have this happy is that right ?
    why ? and how to deal with ?? I use solars 10 with NetBean 6.9
    # df -k
    Filesystem kbytes used avail capacity Mounted on
    rpool/ROOT/s10x_u8wos_08a
    239468544 7338765 229954672 4% /
    /devices 0 0 0 0% /devices
    ctfs 0 0 0 0% /system/contract
    proc 0 0 0 0% /proc
    mnttab 0 0 0 0% /etc/mnttab
    swap 610684 348 610336 1% /etc/svc/volatile
    objfs 0 0 0 0% /system/object
    sharefs 0 0 0 0% /etc/dfs/sharetab
    /usr/lib/libc/libc_hwcap1.so.1
    237293437 7338765 229954672 4% /lib/libc.so.1
    fd 0 0 0 0% /dev/fd
    swap 610484 148 610336 1% /tmp
    swap 610360 24 610336 1% /var/run
    rpool/export 239468544 23 229954672 1% /export
    rpool/export/home 239468544 63960 229954672 1% /export/home
    rpool 239468544 34 229954672 1% /rpool
    #

    Thank you for all the replies.
    Just have time come to this forum:
    think you are running out of swap space.Google surge this too,
    at first I install solaria I give 512M out of totally 2G in memory,
    then I run
    # zfs create -V 512M rpool/additionalswap
    # swap -a /dev/zvol/dsk/rpool/additionalswap
    on meantime
    swapfile dev swaplo blocks free
    /dev/zvol/dsk/rpool/swap 181,3 8 1048568 1048568
    # df -k
    Filesystem kbytes used avail capacity Mounted on
    rpool/ROOT/s10x_u8wos_08a
    239468544 7280779 230012901 4% /
    /devices 0 0 0 0% /devices
    ctfs 0 0 0 0% /system/contract
    proc 0 0 0 0% /proc
    mnttab 0 0 0 0% /etc/mnttab
    swap 392944 352 392592 1% /etc/svc/volatile
    objfs 0 0 0 0% /system/object
    sharefs 0 0 0 0% /etc/dfs/sharetab
    /usr/lib/libc/libc_hwcap1.so.1
    237293680 7280779 230012901 4% /lib/libc.so.1
    fd 0 0 0 0% /dev/fd
    swap                  392760     168  392592     1%    /tmp
    swap                  392616      24  392592     1%    /var/run
    rpool/export 239468544 23 230012901 1% /export
    rpool/export/home 239468544 63989 230012901 1% /export/home
    rpool 239468544 34 230012901 1% /rpool
    /vol/dev/dsk/c7t0d0/unnamed_rmdisk:c
    15618080 1985728 13632352 13% /rmdisk/unnamed_rmdisk
    Edited by: Hjava on Nov 25, 2010 8:40 PM
    Edited by: Hjava on Dec 9, 2010 2:09 AM
    this link is useful
    http://docs.sun.com/app/docs/doc/817-5093/gizet?l=zh_TW&a=view

  • How can I deal with long sql by the oo4o?

    I am using VB and oo4o to develop a sql executor which is a extention of an old system.
    For some reason, I have to use oo4o v8.1.7 to deal with Oracle Database 8i to 11g.
    But when I send a very long sql(11KB) to it I got a error in the VB enviroment.
    The Err.Description is "automention error. Started object is disconnected by the client.".
    The Err.Number is "-2147417848 ".
    The sql that I send it to the program is a simple select sql that like select a, b, c, substrb(d, 1, 2), substrb(e, 2, 3) .... from A_TBL where A=aa;
    This sql is normally executed by the sqlplus but I got an error by the oo4o.
    When I insert a '' between the 30Xth items, it got exectuted normally.
    ex. select a, b, c, substrb(d, 1, 2), substrb(e, 1, 2) ..... substrb(303th, 3, 4), '', substrb(304th, 1, 2) ... from A_TBL where A = aa;
    How can I deal with this problem? Thanks.

    So how can use this function correctly?By learning what exceptions are, how they're used, and what you can do to deal with them. There's a tutorial here: http://java.sun.com/docs/books/tutorial/essential/exceptions/index.htmlAnd here's a quick overview:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • How to deal with any UDDI in SOA Suite 11g?

    Hi folks,
    I have spent quite some time trying to understand how Oracle is dealing with the UDDI aspects in the Soa Suite 11g.
    Back to Oracle AS 10g, I remember, even though i had never used it, that the UDDI repository was a out of the box capability with a very nice Web UI to browse the services The Aqualogic Service Bus seems to have features to consume/publish web services in any UDDI, but no real embedded UDDI in its core.
    Since 11g, obviously the way to go is to adopt Oracle Service Registry. There is a seamless integration with JDeveloper 11g (i.e create a UDDI connection to publish/consume/search web services).
    My company is keen to go on a open source UDDI and I came to the conclusion that any of those (i.e jUDDIv3.02, OpenUDDI) are actually able to work properly with JDeveloper 11.1.1.2. I got XSD exception or other cabalistic errors that definitely show that JDeveloper 11g can only deal with Oracle Service Registry. I heard that the Soa Suite 11g could only deal with UDDI v2 and v3. CentraSite does fit those requirements but does not work too.
    Why is that ? How can I set up my SOA initiative without having the choice on the UDDI ? Does this have changed since PS2 ? I have tried to look up on Metalink and I got a hit on jUDDI but it does clearly state that jUDDI works well now with JDeveloper.
    Any answer on that would be highly appreciated.
    Kind regards,

    Hi,
    DVM cache policy is lazy load. there is no option to preload the cache with server startup currently. However this would be affecting only the first request the susequent requests are serviced from cache.
    HTH..
    appologies for reaching on this late.
    regards,
    Jitendra

  • Dealing with J2SE CORBA errors at the WARNING level?

    Sun CORBA Community:
    For several years now (since we upgraded to J2SE 1.5.*) our log files have been filling up with CORBA.COMM_FAILURE errors from the Sun ORB that are thrown at the WARNING level. This has been reported as either a problem or an annoyance by a number of folks in this forum, but there has yet to be a suitable fix or work-around forthcoming.
    An example stack trace is:
    Oct 17, 2008 1:30:54 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectio
    nImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR
    _TEXT; hostname: 192.168.0.136; port: 58032"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(O
    RBUtilSystemException.java:2172)
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(O
    RBUtilSystemException.java:2193)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(
    SocketOrChannelConnectionImpl.java:205)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(
    SocketOrChannelConnectionImpl.java:218)
    at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.create
    Connection(SocketOrChannelContactInfoImpl.java:101)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.begin
    Request(CorbaClientRequestDispatcherImpl.java:152)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaC
    lientDelegateImpl.java:118)
    at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
    at org.opencoral.idl.Admin._ClientStub.postedEvent(_ClientStub.java:102)
    at org.opencoral.event.server.EventManagerImpl.postEvent(EventManagerImp
    l.java:284)
    at org.opencoral.idl.Resource.EventManager_Tie.postEvent(EventManager_Ti
    e.java:43)
    at org.opencoral.idl.Resource._EventManagerImplBase._invoke(_EventManage
    rImplBase.java:85)
    at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tchToServant(CorbaServerRequestDispatcherImpl.java:637)
    at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tch(CorbaServerRequestDispatcherImpl.java:189)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    Request(CorbaMessageMediatorImpl.java:1680)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:1540)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
    orbaMessageMediatorImpl.java:922)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
    back(RequestMessage_1_2.java:181)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:694)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatc
    h(SocketOrChannelConnectionImpl.java:451)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(
    SocketOrChannelConnectionImpl.java:1189)
    at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
    run(ThreadPoolImpl.java:417)
    Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
    at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket
    (DefaultSocketFactoryImpl.java:60)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(
    SocketOrChannelConnectionImpl.java:188)
    ... 19 more
    Why does this happen? While I can't speak for others, in our case, I know why it happens and is not something that I want to hear about at the WARNING level. We use CORBA for client/server communications and each client registers with and then receives update information from the server. If someone exits the client properly, by clicking "Exit" in the application, we deregister the client with the server and everything is fine.
    However, if someone simply closes the window to terminate the application, then the next time there is an update, the server tries to send it to a non-existent client and, bingo, we get a CORBA.COMM_FAILURE exception. Of course, getting users to properly exit rather than simply closing the window is a losing battle ....
    While I would argue that this is not a WARNING level problem, that's the way that Sun has chosen to define it in the underlying CORBA stuff.
    So, does anyone have an effective means of dealing with this problem. I thought that I should be able to override the logging level for the appropriate class and change it from WARNING to something lower such as FINE so that our logs listening to INFO level or higher wouldn't see them.
    However, my efforts to do this .... and I don't pretend to be a java.logging wizard ... failed. Maybe I was not resetting the level of the appropriate class. Should the java.logging API let me override a logging level for one of the CORBA classes?
    Any insights or suggestions as to how to better deal with this problem would be greatly appreciated.
    Thanks for your consideration,
    John

    Hi,
    I hope you have carried out the following activities:
    1. Carry out standard cost estimate for the materials involved.
    2. Check KKPAN to see the cost details of the product.
    Need more details on the steps that you have carried out so far.
    Regards,
    SGP.
    P.S - assign points incase the info was useful.

  • Dealing with invalid query strings

    I have created a mysql/php site with master and product detail pages. The product details are filtered via a url query string
    e.g. domain/proddetail.php?productID=38
    This all works fine except for the case when a product is deleted and the productID is no longer valid. Because Google continues to index these pages vsitors then get a page displaying no data .
    How do I gracefully deal with these invalid productIDs? Preferbly I want to redirect to a error404 page so that Gogle delists but simply displaying a product not found notice would be better than nothing.
    Thanks

    In your proddetail.php page, test the recordset rowcount - if it is zero, redirect to your 404 page.

  • Problem in dealing with special-character filename

    Hi,
    I am facing a weird problem while dealing with a file which has a special character in its name. That character is the big-hyphen, i.e. '–' (not the normal hyphen we can type from keyboard), you would have seen this character in MS Word.
    My java program is running on HP-UX OS, and its basically trying to copy this file to a Windows target system through socket. But while executing it, I am getting Broken Pipe Exception.
    I am applying UTF-8 encoding while running my program (by specifying the argument "-Dfile.encoding=UTF-8" in the java process), and I am also confirming that the file-encoding is being applied to UTF-8 properly by putting a debug in the beginning of the program. My understanding is UTF-8 supports all the characters exist in this world.
    Any suggestion / pointers would be really appreciated.
    Thanks,
    Rajiv

    Fine..... but is there any way to know which encoding has been applied on it ..
    Let's say if you create any file on unix-based system in any application, which encoding gets applied there by default ?
    This file is basically nothing but an html page created using 'Save As' from the browser.
    The person who has created the file is a non-technical .. and won't know much about this all stuff... encoding etc.

  • RichDialog doesn't close with exception handling in DialogListener

    I have a RichPopup with a child that is a RichDialog. The popup is called using a command button with a showPopupBehavior child.
    I have a DialogListener on the RichDialog that calls a web service method through a proxy.
    I added a try/catch block around the web service method call and then added a call to the FacesContext to add a message to display to the user. If there is an exception thrown from the service (simulated at this point) the message is displayed, but the screen is greyed out and the dialog will not close.
    What am I missing?
    Thanks,
    Al
    Message was edited by:
    Al-2000

    I don't think there are any examples, however something like this might do the trick:
    ---- Put this in your page ----
    <f:verbatim>
    <![CDATA[
    <script>/*ignore the leading greater-than symbol that this forum adds to the start of this line*/
    function closeMyPopup()
      var popup = AdfPage.PAGE.findComponent("myPopupClientId");
      popup.hide();
    </script>
    ]]>
    </f:verbatim>---- Put this in your Java code where you deal with the error ----
    ExtendedRenderKitService erks =
      Service.getService(
        facesContext.getRenderKit(),
        ExtendedRenderKitService.class); 
    erks.addScript(facesContext, "closeMyPopup();");See also the org.apache.myfaces.trinidad.render.ExtendedRenderKitService JavaDoc:
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-faces-api/apidocs/org/apache/myfaces/trinidad/render/ExtendedRenderKitService.html
    Regards,
    Matt

Maybe you are looking for

  • Runtime error in functional module

    they given below program is a function module calling program.while am execute this program they could display the message like as What happened?     Error in ABAP application program.     The current ABAP program "YSUSFUN1" had to be terminated beca

  • XML attributes wrong order in mapping

    In XI SP16 I am building a mapping based on a dataype using XML attibutes. The datatype looks like:     Test_Node ComplexType          a  attribute xsd:string         <b> b</b>  attribute xsd:string          c  attribute xsd:string          d  attrib

  • IPhoto is not responding/loading for ever/crashing when I start it

    Hello I hope anybody out there can help me with this... So, whenever I click on the iPhoto icon on my iMac, the app launches and the window opens, I can see some of the miniatures of my photos, everything is normal. But, when I try to scroll down in

  • Itunes update for iphone

    how do i update my itunes for my iphone? my laptop wont sync with it anymore and says my itunes is out of date

  • FCP with External devices/Mini dv decks

    I just bought FCP and I wanted to know if I should turn on my external device (jvc mini dv deck) before I open FCP or after I open FCP. Thanks, David