Handling business exceptions from DB adapter

Hi,
How to handle the business exceptions/faults raised from PL/SQL stored proc exposed via DB Adapter. From what I know there are two types of exceptions namely business exceptions which result into binding faults and runtime exceptions. The later are retriable exceptioons.
So the scenario I am working with is a simple PL/SQL procedure which selects from a table and returns a value if found and raises an PL/SQL exception if select fails. I expect the second case to result in a binding fault and hence catchable in BPEL process or ESB as error topic.
But when I try this I am always getting oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException. More over as the name implies it's a retriable exception and it appears to me it's being re-tried by default before throughing this message. My question is shouldn't this be a business fault/binding exception?
Am I doing something wrong here? What's the expected behavior for exceptions (buiness related) raised from DB adapter. I understand I can always catch these exceptions in PL/SQL and pass a relevation status OUT parameter. But I am trying to mimic a typical input/output or input/fault type of web service interfaction for PL/SQL procedure.
Any help is greatly appreciated.
Regards,
Rajesh

Just my 2 cents, but you're talking about the integration of DB Adapter and ESB and I think Marc is talking about Bpel and DB Adapter and these have different functionalities for eror-handling.
In ESB a framework has been added to be able to retry exceptions that are 'retryable business exceptions', which gives the user the possibility to for example recompile the procedure/function and retry the transaction that was defined earlier.
I think if you want to add custom exceptions you will need to extend the BusinessRetrievableException to your own custom exception handling.
I think this is a possible enhancement question for the exception handling-architecture that has been created for usage in ESB. Maybe this can be added to the 'enhancement requests for ESB'-list ... if that exists?

Similar Messages

  • Throwing Business Exception from Human Task

    Hi,
    Can anyone point me to some examples, of how can I configure a Human Task to throw a business exception in a BPMN process ?
    I want to provide th user with the ability of completing the task normaly, or launch a business exception like, cancel the order, or lack of stock.
    I'm using Fusion 11g.
    Thank You.
    /RG

    Hi
    Thanks for the reply. But, I'm not sure I understood you correctly. What I want, is not to capture an exception after a human task, but to generate one in it. I want to add an error boundary event to a human task. The user can fill the form normally (for example a purchase order) and the normal flow continues or he can generate an exception (like cancel case, or lack of stock) that will be cought by the error boundary event.
    What I want to know is how can I generate a business exception inside a human task? For example in the interface.
    Is this the right way to do it ? Am I missing something ?

  • Return User Defined Exceptions from SP

    Hi,
    Is it possible to return user defined business exceptions from a stored procedure to the dotnet app. through ODP. NET( equivalent to the throw keyword in Java)?
    I would prefer to handle all of the oracle expections in the try catch block of the C# code.
    Thanks,
    Peeyush

    Is your question how to return a custom exception from PLSQL? You'd use RAISE_APPLICATION_ERROR for that, and yes it would propagate via ODP to the calling application.
    Here's a simple dumb example:
    create or replace procedure raise_my_error as
    begin
    raise_application_error(-20001,'something bad happened');
    end;
    Hope it helps,
    Greg

  • How to handle multiple exceptions by the same code?

    Hi, all:
    In my situation I want AException and BException handled by the same code, while CException and DException handled by another code. How can I write my try-catch code in a simple way? Of course I can do the following:
    public void TheMainFunction() {
        try {
        } catch (AException e) {
            Handle_AB();
        } catch (BException e) {
            Handle_AB();
        } catch (CException e) {
            Handle_CD();
        } catch (DException e) {
            Handle_CD();
    private void Handle_AB() {
    private void Handle_CD() {
    }But is there a simpler way?
    Thanks in advance.

    If you have one or two places in your code that need multiple exceptions, just do it with multiple catch statements. Unless you are trying to write the most compact Programming 101 homework program, inventing tricks to remove two lines of code is not good use of your time.
    If you have multiple catches all over your code it could be a code smell. You may have too much stuff happening inside one try statement. It becomes hard to know what method call throws one of those exceptions, and you end up handling an exception from some else piece of code than what you intended. E.g. you mention NumberFormatException -- only process one user input inside that try/catch so it is easy to see what error message is given if that particular input is gunk. The next step of processing goes inside its own try/catch.
    In my case, the ArrayIndexOutOfBoundsException and
    NumberFormatException should be handled by the same way.Why?
    I don't think I have ever seen an ArrayIndexOutOfBoundsException that didn't indicate a bug in the code. Instead of an AIOOBE perhaps there should be an if statement somewhere that prevents it, or the algorithm logic should prevent it automatically.

  • Handle Exception from LCDS

    Hello,
    I am using Flex 4 with LCDS 3. I am having problems with properly handling 
    exceptions. 
    I have a simple commit service like; 
    var commitToken:AsyncToken = 
    _serviceName.serviceControl.commit(); // Commit the change. 
    commitToken.addResponder(new AsyncResponder( 
    function (event:ResultEvent, 
    token:Object=null):void 
    Alert.show("DATA DELETED"); 
    function (event:FaultEvent, 
    token:Object=null):void 
    Alert.show("Save failed: " + 
    event.fault.faultString, "Error"); 
    _serviceName.serviceControl.revertChanges(); 
    Now when I try to delete a row which has a child record I get the following 
    error in my tomcat log; 
    hdr(DSEndpoint) = my-rtmp 
    hdr(DSId) = 9AFF219A-AB2A-3B60-D990-9E87A3D7CF71 
    java.lang.RuntimeException: Hibernate jdbc exception on operation=deleteItem 
    error=Could not execute JDBC batch update : sqlError = from SQLException: 
    java.sql.BatchUpdateException: ORA-02292: integrity constraint (CATEGORY_FK) 
    violated - child record found 
    followed by; 
    [LCDS]Serializing AMF/RTMP response 
    Version: 3 
    (Command method=_error (0) trxId=10.0) 
    (Typed Object #0 'flex.messaging.messages.ErrorMessage') 
    rootCause = (Typed Object #1 'org.omg.CORBA.BAD_INV_ORDER') 
    minor = 0 
    localizedMessage = "The Servant has not been associated with an ORB 
    instance" 
    message = "The Servant has not been associated with an ORB instance" 
    cause = null 
    completed = (Typed Object #2 'org.omg.CORBA.CompletionStatus') 
    destination = "CATEGORY" 
    headers = (Object #3) 
    correlationId = "D4B6573F-F8C2-0732-BD1C-6FD1C5979763" 
    faultString = "Error occurred completing a transaction" 
    messageId = "9AFF6D9A-3C1C-E99B-B00F-92E72069B64E" 
    faultCode = "Server.Processing" 
    timeToLive = 0.0 
    extendedData = null 
    faultDetail = null 
    clientId = "C2F15FE1-2977-23AA-1ADD-6FD1C096A82F" 
    timestamp = 1.281776280572E12 
    body = null 
    In flex in my "event" in the fault function I can only get general data like 
    "Error occurred completing a transaction", but I cannot access the error 
    "ORA-02292:...". 
    Is there a way to access it, as I need to handle multiple exceptions that Oracle 
    will catch such as duplicate ID.....

    Hi Hong,
    I can confirm that 0xE8010014 represents a driver fault. Unfortunately without a dump or some other trace file it is hard to track this down. You could create a dump file if you can reproduce it, upload it to your OneDrive and then post the link here, I
    can grab it and take a look.
    >>This is reported by users. Unfortunately I am unable to reproduce it.
    Could you please collect the OS version which have this issue?
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Handling exceptions from inputprocessor

    I'm using portal 7.0. I created a simple 2 page webflow using the ebcc wizard.
    The first presentation node is a form using the <webflow:validatedForm> taglib.
    I added the event and namespave attrbute. The event from the node is to a input
    processor node. I created a java class to handle the validation from the form.
    The docs from portal 4.0 really helped getting started on that. Then from the
    the input procoessor node I have an exception event back to the first presentation
    node.
    So when I fill out the form and the validation fails the exception is thrown,
    but the screen is not in the portal framework, but instead on the for presentation
    node is displayed with the excpetion printed and the error message next to the
    fields that need to fixed. When I add more items to the form, the functionality
    works, but it's not within the portal framework.
    Any help would be great.
    Thanks,
    Kevin

    use the <portlet:validatedForm>
    "Kevin Pfarr" <[email protected]> wrote:
    >
    I'm using portal 7.0. I created a simple 2 page webflow using the ebcc
    wizard.
    The first presentation node is a form using the <webflow:validatedForm>
    taglib.
    I added the event and namespave attrbute. The event from the node is
    to a input
    processor node. I created a java class to handle the validation from
    the form.
    The docs from portal 4.0 really helped getting started on that. Then
    from the
    the input procoessor node I have an exception event back to the first
    presentation
    node.
    So when I fill out the form and the validation fails the exception is
    thrown,
    but the screen is not in the portal framework, but instead on the for
    presentation
    node is displayed with the excpetion printed and the error message next
    to the
    fields that need to fixed. When I add more items to the form, the functionality
    works, but it's not within the portal framework.
    Any help would be great.
    Thanks,
    Kevin

  • Handling exceptions from Future/FutureTask.get()  : a question

    Hello.
    While trying to understand the way (possible) exceptions from Future/FutureTask.get() method can be handled, I found the following example on how this could be done:
    [http://www.javaconcurrencyinpractice.com/listings.html]
    * StaticUtilities
    * @author Brian Goetz and Tim Peierls
    public class LaunderThrowable {
         * Coerce an unchecked Throwable to a RuntimeException
         * <p/>
         * If the Throwable is an Error, throw it; if it is a
         * RuntimeException return it, otherwise throw IllegalStateException
        public static RuntimeException launderThrowable(Throwable t) {
            if (t instanceof RuntimeException)
                return (RuntimeException) t;                // Line #1
            else if (t instanceof Error)
                throw (Error) t;                                    // Line #2
            else
                throw new IllegalStateException("Not unchecked", t);// Line #3
    }And here is an example on how this handler is supposed to be used:
    * Preloader
    * Using FutureTask to preload data that is needed later
    * @author Brian Goetz and Tim Peierls
    public class Preloader
        ProductInfo loadProductInfo() throws DataLoadException {
            return null;
        private final FutureTask<ProductInfo> future =
            new FutureTask<ProductInfo>(new Callable<ProductInfo>() {
                public ProductInfo call() throws DataLoadException {
                    return loadProductInfo();
        private final Thread thread = new Thread(future);
        public void start() { thread.start(); }
        public ProductInfo get()
        throws DataLoadException, InterruptedException
            try {
                return future.get();
            } catch (ExecutionException e) {
                Throwable cause = e.getCause();
                if (cause instanceof DataLoadException)
                    throw (DataLoadException) cause;
                else
                    throw LaunderThrowable.launderThrowable(cause);
        interface ProductInfo {  }
    class DataLoadException extends Exception { }Everything is clear in general, except for one thing:
    Why is the LaunderThrowable.launderThrowable() method re-throws Error and IllegalStateException (Line #2 and #3 above) and just returns RuntimeException (Line #1)? Especially taking into consideration that whatever is returned from launderThrowable() is re-thrown in any case...
    Any ideas?
    Thanks.

    ...Why is the LaunderThrowable.launderThrowable() method re-throws Error and IllegalStateException (Line #2 and #3 above) and just returns RuntimeException (Line #1)?this is explained in the end of paragraph [5.5.2. FutureTask|http://www.javaconcurrencyinpractice.com/]:
    +"...When get throws an ExecutionException in Preloader, the cause will fall into one of three categories: a checked exception thrown by the Callable, a RuntimeException, or an Error. We must handle each of these cases separately, but we will use the launderThrowable utility method in Listing 5.13 to encapsulate some of the messier exception-handling logic. Before calling launderThrowable, Preloader tests for the known checked exceptions and rethrows them. That leaves only unchecked exceptions, which Preloader handles by calling launderThrowable and throwing the result. If the Throwable passed to launderThrowable is an Error, launderThrowable rethrows it directly; if it is not a RuntimeException, it throws an IllegalStateException to indicate a logic error. That leaves only RuntimeException, which launderThrowable returns to its caller, and which the caller generally rethrows..."+
    ...Especially taking into consideration that whatever is returned from launderThrowable() is re-thrown in any case...As far as I understand, assumption about re-throwing in any case is not quite correct. launderThrowable is intended to be a general utility, #) so it leaves a way for client to handle the returned value in a way different from re-throwing.
    #) intended to be a general utility -- launderThrowable is used not only in Preloader, but in [other listings|http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.javaconcurrencyinpractice.com%2Flistings+launderThrowable] as well

  • Stopping exceptions from being handled earlier

    Hi,
    I am writing a program that uses some code that I wrote and some code that others wrote. In one part of the code, an exception often comes up in the part of code that other people wrote. They handle that exception themselves by printing the stack trace. However, I do not want the stack trace to be printed out. The exception is already handled so if I put in a catch block it does nothing.
    Is there any way I can stop the exception from being caught or handled before? Or is there a way I can prevent the stack trace from being printed and call a different method if this exception was ever thrown or caught?
    Thanks, and tell me if part of what I wrote was unclear then tell me.

    Sky,
    Your problem description is perfectly clear. 10/10.
    But, Sorry.... It ain't good news.
    1. The short answer is "No".
    2. The longer and far more correct answer is "maybe", so long as the dodgy booger who wrote that code gave you the hooks which allow you to (a) supply an error handler; or (b) override the offending method by extending the class and reimplementing all it's constructors and that messy method, and you can change all the code which references that class to use your subclass... ie: Not bluddy likely.
    3. The correct answer is of course: "Yes, anything is possible, just some things cost more than others"... Decompilers, Custom byte-code modifying class-loaders, A wee ASM to filter the JVM's
    standard error stream... I can hear the boss now "What do you porkchops think you're playing at!".
    I get the feeling that the stackTrace is just an annoyance factor, and it really isn't worth the effort to solve this problem. My advice is to learn to live with it.
    Keith.

  • Intermittent bug: Business Components from Tables wizard exception

    Hi JDev team
    Just to flag an exception I periodically get in JDev 11g TP with the Business Components from Tables wizard, once I've pressed Finish in the wizard:
    java.lang.NullPointerException
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createRelatedViewLinks(PKEntityThread.java:1085)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createTableViews(PKEntityThread.java:966)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.createObjects(PKEntityThread.java:424)
         at oracle.jbo.dt.jdevx.ui.pkg.XPKComponentWizardEntityThread.createObjects(XPKComponentWizard.java:454)
         at oracle.jbo.dt.ui.pkg.PKEntityThread.run(PKEntityThread.java:396)It is raised when the dialog displays showing the work JDev is doing after completing the wizard to create my business components.
    I'm not able to consistently reproduce this issue, though I've encountered it several times. Don't quote me, but it appears to happen the first time I use the wizard in a new JDev session, but is not reproducible again in the same session. However it doesn't always happen when I restart JDev and I'm sorry I can't be more precise.
    Hopefully the exception trace will give you enough information to track this issue down.
    Regards,
    CM.

    Hi Ric
    Unfortunately not really, it's a basic schema we use to test new software. One unusual thing is a hierarchical fk on the same table. But as I said the exception doesn't always occur, but annoyingly does seem to occur when I'm demoing the 11g TP version to clients. I was just hoping the stack trace would help out.
    I'll keep an eye on it and if I can work out why it's occurring I'll update this post.
    Thanks for following this up.
    Cheers,
    CM.

  • Is it possible to throw an exception from a handler chain with JAXWS???

    I know I cannot throw directly an exception from the handler cause my handler extends SOAPHandler and the method handlerMessage cannot throw exceptions. The problem is that I would like to validate some authorization and if the client doesn't have the appropriate rights, I would like to throw an exception from the handler without calling the web service itself, so the client would receive a valid soap response from the server. Is it possible?? Is there another mechanism that I can use to do that??
    Thanks a lot
    Korg

    You can throw a ProtocolException or RuntimeException from handleMessage().
    If you throw ProtocolException, HandleFault() is called on previously invoked handlers.
    If you throw a RuntimeException, handleFault() or handleMessage() is not called on previously invoked handlers, and the Exception is converted to Fault message and dispatched.

  • OSB error while generating business service for FTP adapter Sync Get File

    Hi All
    I am trying to generate a business service from SOA Suite JCA FTP adapter Sync Get File, but i am getting this exception for no reasons (Rest operations list file, get file and put file are working)
    Invalid JCA transport endpoint configuration, exception: java.lang.NullPointerException     Unknown ALSB Conflict.
    Is this a bug in eclipse, can any body help me. Thanks
    Sorry Forgot to mention eclipse version...
    Eclipse Platform
    Version: 3.6.2
    Build id: M20110210-1200

    Ok,
    bcoz of this issue, i had to code the entire interface in OSB console. It runs fine in OSB console (i was able to test it successfully).
    Is this a bug in eclipse or only i am facing this issue? Has anybody tried to create a business service from JCA FTP Get Synchronous jca file?
    <adapter-config name="FTPReadMOMFileOnRMSDB" adapter="FTP Adapter"
         wsdlLocation="../wsdl/FTPReadMOMFileOnRMSDB.wsdl"
         xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
         <connection-factory location="eis/ftp/RMSDBFtpAdapter" />
         <endpoint-interaction portType="SynchRead_ptt"
              operation="SynchRead">
              <interaction-spec
                   className="oracle.tip.adapter.ftp.outbound.FTPReadInteractionSpec">
                   <property name="DeleteFile" value="true" />
                   <property name="PhysicalDirectory" value="/MOMFiles/output" />
                   <property name="FileName" value="*" />
                   <property name="FileType" value="binary" />
              </interaction-spec>
         </endpoint-interaction>
    </adapter-config>
    One more doubt? The PhysicalArchiveDirectory path can be on the FTP server something like: /MOMFiles/archive. Or do i have to use the Put operation to move it to /MOMFiles/archive directory. Currently OSB console and eclipse do not accept FTP path for this parameter and want me to specify a local directory on server. Thanks

  • Is there a way to handle system exception ERROR_MESSAGE?

    Hi,
    I have a program executed in background, which produces a bunch of consecutive documents for a set of Bulk Shipments -> TD Loading and TD Delivery Confirmation. To create those documents I use function modules 'OIGI_LOADING_CREATE' and 'OIGI_DEL_CONF_CREATE'  - both from Industry-Solution Oil-and_Gas (IS-Oil).
    In some cases these FM-s produces error messages (E-type) which cancel execution of the program and broke my flow-logic.
    Below are few messages recorded in a job log for my task:
    18.08.2005 15:56:41 Job started                                                                         
    18.08.2005 15:56:41 Step 001 started (program /PTRL/TAS_POSTPONDED_SYNC, variant , user name IMUTAFCHIEV)
    18.08.2005 15:56:58 Shipment 180753 saved                                                               
    18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
    18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
    18.08.2005 15:57:06 The plant data of the material 177 is locked by the user BMINKOV                    
    18.08.2005 15:57:06 Job cancelled after system exception ERROR_MESSAGE                                  
    Both function modules are not designed to handle any exceptions, and in owr environment (4.6c) there is no documented system exception 'ERROR_MESSAGE' which to be handled in CATCH-ENDCATCH block.
    Is there a way to handle this exception and to track the list of error messages produced by some FM into an internal table, log, whatever, as it is done in the log of the background job. I need to find a way write these messages in my log-tables and to proceed further with my flow-logic.
    FYI: my program executes an RFC call to a remote system and retrieve a list of documents which need to be synchronized with R/3. I loose information, if the R/3 broke my flow-logic.
    Any help would be highly appresiated.
    Many thanks in advance.
    Ivaylo Mutafchiev

    Sven,
    I made few programs where we used business scenario:
    IS-Oil Shipment => IS-Oil Loading Confirmation => IS-Oil Delivery Confirmation.
    All of them are based on Function Module call:
    1. OIGI_LOADING_CREATE and
    2. OIGI_DEL_CONF_CREATE.
    To load shipment I call 1st FM in a way:
      CALL FUNCTION 'OIGI_LOADING_CREATE' DESTINATION 'NONE'
           EXPORTING
                I_SUBRC     = 9  "save and commit
                I_SHNUMBER  = shNumber
                I_VEHICLE   = vehicle
                I_LDPLT     = plant
                I_LDDATE    = loadDate
                I_LDTIME    = loadTime
                I_LDCDAT    = loadDate
                I_VEH_NR    = veh_nr
           TABLES
                T_OIGISVMQ  = quantity_items
                T_OIGISVMQ2 = hpm_append
                T_OIGISIQ   = doc_quan_items
           EXCEPTIONS
                COMMUNICATION_FAILURE = 1 MESSAGE p_error
                SYSTEM_FAILURE = 2 MESSAGE p_error.
    To confirm shipment (status 4) I call the same FM with:
      CALL FUNCTION 'OIGI_LOADING_CREATE' DESTINATION 'NONE'
           EXPORTING
                I_SUBRC    = 39  "confirm & commit 2nd step
                I_SHNUMBER = shNumber
                I_VEHICLE  = vehicle
                I_LDPLT    = werks
           EXCEPTIONS
                COMMUNICATION_FAILURE = 1 MESSAGE sh_error
                SYSTEM_FAILURE = 2 MESSAGE sh_error.
    And finaly to finish process (status = 6) I call 2nd FM in a way:
      CALL FUNCTION 'OIGI_DEL_CONF_CREATE' DESTINATION 'NONE'
           EXPORTING
                I_SUBRC         = 19  "save, confirm and commit
                I_SHNUMBER      = shNumber
                I_RAPID_CONFIRM = 'X'
                I_DDCDAT        = loadDate
                I_DLDATE        = loadDate
                I_DLTIME        = loadTime
           EXCEPTIONS
                COMMUNICATION_FAILURE = 1 MESSAGE p_error
                SYSTEM_FAILURE = 2 MESSAGE p_error.
    FYI: It tooks me some time to 'investigate' and find correct use of these function modules. And I worked VERY CLOSE with our SD consultant.
    For details (what the export parameters and tables consist of) and sample code, please contact me at:
    ivaylo dot mutafchiev at vbs dot bg
    I would be glad to share my knowlege.
    Regards,
    Ivaylo

  • A problem with 3 exceptions from 1 method!!!

    I don't like it and I need advice on how to avoid it. I have been given an interface and am required to use ech of its methods. Here is what happened...
    The interface declares that when a record is searched for in the database and cant be found then a database exception must be thrown.
    When a operation is performed on a record it gets locked with a lock cookie and this cookie must be the same when the lock is released at the end of the operation or a Security Exception gets thrown.
    The file accessing itself throws IO exception which ofcourse has to be handled too.
    So far I have done the following(data level). I have a general databaseException which is a parent to all database exceptions. This means my Security and RecNotFound exceptions can be caught by one exception as they bubble up the stack. My IOException gets converted to a runtime exception and will be converted back to a checked exception in the GUI layer where I cater for all exceptions (The user does not see them).
    Moving on....
    In my service layer layer I have a business Exception to all business logic errors. Here is why it gets tricky...
    A record can not be booked if it is already booked. So I have a bookedRecException and the booking process involves locking the record(throws databaseException as mentioned). I also catch my RuntimeIOExceptions and throw them in my service layer up the stack as an IOException which gets handled in the GUI.
    As you can see this does not look good and I want to fix it. I thaught of making my databaseException into a IOE my service interface methods are all throwing DatabaseException AND IOExceptions.
    Edited by: Yucca on Apr 2, 2009 8:37 PM

    Yucca wrote:
    morgalr wrote:
    So what you are saying is: you don't want to deal with all the different exceptions?
    No what I am saying Is it's the SCJD and I am trying to avoid messy code with 3 exceptions. I am very much for custom exceptions where having a strongly typed exception tells you enough just by the fact that AlreadyBookedRecordException in your stack explains it all.That is not apparent from you post, what you seem to be saying is that you don't want them. In any case I've never found it messy to handle all exceptions individually, nor have I found it messy to use the method I mentioned.

  • NotSerializableException reading file from configuration adapter

    Hi!
    When I try to access a file with config.getFile() that is stored in VA configuration adapter I get a P4BaseRuntimeException with an underlying NotSerializableException.
    This is what I'm doing:
    Context ctx = new InitialContext();
    ConfigurationRuntimeInterface configInterface = 
         (ConfigurationRuntimeInterface)ctx.lookup("configuration");
    cfgContext      = configInterface.getConfigurationContext();
    cfgHandler      = cfgContext.getConfigurationHandler();
    config     = cfgHandler.openConfiguration(path, ConfigurationHandler.READ_ACCESS);
    boolean exists     = config.existsFile(filename);
    InputStream is = config.getFile(filename);  // this is where the exception occurs
    I've omitted handling for InconsistentReadException in this post, to keep the code short.
    The existence check with config.existsFile() returns true, so configuration path and filename seem to be ok. However, config.getFile() throws a NotSerializableException.
    So, how can I read a file from configuration adapter? What is my mistake?
    Thanks for your help,
    Frank

    hi frank,
    in addition to the above content
    u can refer the how to use the  config.getFile()
    http://kickjava.com/src/org/apache/commons/configuration/reloading/FileChangedReloadingStrategy.java.htm
    let me know u need any further info
    bvr

  • Io exception: The Network Adapter could not establish the connection

    Hi All,
    I run tomcat and connect to Oracle fine, both on the same machine.
    I also run some batch processes daily and they often run without problems. The batch processes lots of selects and updates/inserts onto Oracle.
    These tend to work fine, but sometimes when they run I get
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    So a batch process will be running doing lots of selects and updates then it just decides it had enough and throws this error each time it tries to connect. Meanwhile tomcat continues to run fine through the same TNS listener, but subsequent batch jobs fail to connect.I normally have to restart the TNS Listener.
    I connect through the same class whether connecting through Tomcat or from the batch process with this:
    public static Connection getConnection(String caller) throws SQLException{
    try{
    Connection con;
    if (standalone){
    try{Class.forName(driver);}catch(ClassNotFoundException e){}
    con=DriverManager.getConnection(url,user,password);
    return con;
    }else{
    if (ds==null)initialiseContext();
    con=ds.getConnection();
    return con;
    }catch(SQLException e){
    ds=null;
    logger.debug("Problem in DBAccess.getConnection()...");
    logger.debug(e.getMessage());
    e.printStackTrace();
    throw e;
    I specifiy params such as MaxIdle with Tomcat using the xml config but not when its standalone - could this be affecting it?
    Any idea?
    Thanks.

    lovingbarcelona wrote:
    * Yep I get the same on the dev box.
    * I am definitely closing all the connections, I keep a close watch on that.
    Oracle should be able to handle lots of connections no problem, I agree, and it is through tomcat.
    Yet the exception that you get says that it isn't. Oracle, for example, on a single box shouldn't be able to handle 100,000 simultaneous connections.
    I would be very surprised if it couldn't handle 1,000. And if there was an issue at that point it would be a resource bound issue, like CPU (on the single box) rather than connections.
    You suggested licensing issues?I believe at one time, not necessarily now, the Oracle server would be sold such that it limited the number of simultenous connections. This could have been a relatively low number. There are quite a few assumptions in that - the major one would be it is based on my faulty memory and second would be that it was years ago.
    By the way you are not running this on a unix variant system without redoing the kernel limits to set up for a server system right?

Maybe you are looking for