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.

Similar Messages

  • Problems with the dispatchEvent-Methode

    Hallo,
    I have a strange problem with above mentioned methode
    I have a JTextField, and I want that only numeric inputs are
    accepted, so I used a KeyListener -Interface in the following way
    public void keyTyped(KeyEvent e)
    JTextField field =(JTextField)e.getSource();
    char c =e.getKeyChar();
    if(c>57 | c<46 |c==47 &&c >31)
    field.dispatchEvent(e);
    the other methodes keyPressed and keyReleased are implemented in the same way.
    So if I type in now in my JTextField an 'a' or whatsoever
    then the following Exception occurs:
    java.lang.StackOverflowError
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1483)
    at java.awt.EventQueue.setCurrentEventAndMostRecentTime(EventQueue.java:731)
    at java.awt.Component.dispatchEventImpl(Component.java:3448)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    Mmh, and this is not the whole Exception message.
    There are missing a couple of lines.
    But may be one of you knows what my mistake is.
    Thanks advance.

    This is not the best way to validate for numerics. Check out the "Creating a Validated Text Field" section from the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation

  • Xi 3.0: Mail adapter fails with "exception in method process"

    Hi.
    I configured the dynamic address for mail adapter following the fantastic-as-always weblog from michalgh.
    Althou everything seems to work fine (that is, i send correctly the email message) the A.F. returns an error with "exception in method process".
    I tried both async and sync case with the same result. In the sync case, the response contains:
    <!--  Call Adapter   -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="PARSING">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Exception in method process.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Any idea???

    Yes. There is also a response message in the imported structure.. it seems it should work as a kind of application ack with some info on the server that processed the mail.
    Anyway, in my server i get a 404 for the link you suggested.
    In the async case i don't get any error on the SXMB_MONI but only on the A.F.
    I attach the audit log for the async case:
    Audit Log for Message: ffb28585-3c53-0f4b-b366-7dd7a00513fc
    Time Stamp Status Thread ID Sequence No. Description
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_45 1118608026046 The message was successfully received by the messaging system. Profile: XI URL: http://CAPELAB010:50000/MessagingSystem/receive/AFW/XI
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_45 1118608026062 Using connection AFW. Trying to put the message into the receive queue.
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026093 The message was successfully retrieved from the receive queue.
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026375 The message status set to DLNG.
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026468 Delivering to channel: MAIL_RECV
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026468 Mail: message entering the adapter
    2005-06-12 22:27:06 Error SAPEngine_Application_Thread[impl:3]_34 1118608026828 Exception caught by adapter framework: Failed to call the endpoint
    2005-06-12 22:27:06 Error SAPEngine_Application_Thread[impl:3]_34 1118608026828 Delivery of the message to the application using connection AFW failed, due to: Failed to call the endpoint.
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026843 The asynchronous message was successfully scheduled to be delivered at Sun Jun 12 22:32:06 CEST 2005.
    2005-06-12 22:27:06 Success SAPEngine_Application_Thread[impl:3]_34 1118608026859 The message status set to WAIT.
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327109 The message was successfully retrieved from the receive queue.
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327125 The message status set to DLNG.
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327156 Delivering to channel: MAIL_RECV
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327171 Mail: message entering the adapter
    2005-06-12 22:32:07 Error SAPEngine_Application_Thread[impl:3]_34 1118608327250 Exception caught by adapter framework: Failed to call the endpoint 
    2005-06-12 22:32:07 Error SAPEngine_Application_Thread[impl:3]_34 1118608327250 Delivery of the message to the application using connection AFW failed, due to: Failed to call the endpoint .
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327281 The asynchronous message was successfully scheduled to be delivered at Sun Jun 12 22:37:07 CEST 2005.
    2005-06-12 22:32:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608327296 The message status set to WAIT.
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627421 The message was successfully retrieved from the receive queue.
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627437 The message status set to DLNG.
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627546 Delivering to channel: MAIL_RECV
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627562 Mail: message entering the adapter
    2005-06-12 22:37:07 Error SAPEngine_Application_Thread[impl:3]_34 1118608627671 Exception caught by adapter framework: Failed to call the endpoint 
    2005-06-12 22:37:07 Error SAPEngine_Application_Thread[impl:3]_34 1118608627671 Delivery of the message to the application using connection AFW failed, due to: Failed to call the endpoint .
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627703 The asynchronous message was successfully scheduled to be delivered at Sun Jun 12 22:42:07 CEST 2005.
    2005-06-12 22:37:07 Success SAPEngine_Application_Thread[impl:3]_34 1118608627734 The message status set to WAIT.
    2005-06-12 22:42:07 Success SAPEngine_Application_Thread[impl:3]_40 1118608927734 The message was successfully retrieved from the receive queue.
    2005-06-12 22:42:07 Success SAPEngine_Application_Thread[impl:3]_40 1118608927734 The message status set to DLNG.
    2005-06-12 22:42:07 Success SAPEngine_Application_Thread[impl:3]_40 1118608927750 Delivering to channel: MAIL_RECV
    2005-06-12 22:42:07 Success SAPEngine_Application_Thread[impl:3]_40 1118608927750 Mail: message entering the adapter
    2005-06-12 22:42:07 Error SAPEngine_Application_Thread[impl:3]_40 1118608927765 Exception caught by adapter framework: Failed to call the endpoint 
    2005-06-12 22:42:07 Error SAPEngine_Application_Thread[impl:3]_40 1118608927781 Delivery of the message to the application using connection AFW failed, due to: Failed to call the endpoint .
    2005-06-12 22:42:07 Error SAPEngine_Application_Thread[impl:3]_40 1118608927796 The message status set to NDLV.
           Total: 33 Entries   1020304050 messages displayed per page; this is page 1 of  1 page(s)     

  • Set value in af:query with value from method

    hello all
    i have problem, when they want set value in af:query (inputText) with value from method, how to do that?
    anyone help..?
    thx
    agungdmt

    Hi,
    are you facing this issue when you try to show few values on right side (selected list) of shuttle component.
    what is your usecase exactly ?

  • Windows 8.1 Problem with games from windows store.

    I've got a problem with games from windows store. The installation is going well without any problems, however when I try to open it it's loading and then it turns off. The same problem happens when I try to use Games for Windows. I've use a sfc scan and
    it shows some errors but unfortunately it cannot fix them. Should I share the CBS log or find the solution somewhere else? I hope you help, best regards.

    Hi,
    According to my experience, the problem like store game app open failed probably caused by hardware driver. such as Audio and Graphic driver. So, first of all, please try to reinstall these two driver to fix this problem for test.
    In addition, for SFC scan failed problem, it can be caused by many reasons, I would suggest you use another command to fix your system for test.
    Dism /Online /Cleanup-Image /ScanHealth
    Also you can test SFC command in Windows 8.1 safe mode.
    Thirdly, if problem persists, please check Event Viewer, generally speaking, it would record the app open failed events.
    Roger Lu
    TechNet Community Support

  • TS3297 Why I can't download a free game I get a message that there's a problem with my payment method but not what it is this is a free app I tried support and got nowhere help

    Why can't I down load a free app  I get a message that there is a problem with my payment method but I gave all information correctly , I did recently change my card no because I lost my old one .i did change the no. On my account      HOPE YOU HAVE SOME SUGGESTIONS  I DON'T SEE WHY THEY HAVE TO CHECKMY PAYMENT METHOD FOR A FREE GAME

    Contact iTunes customer support.
    We're all users like yourself and as such have no access to your account.

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • I have problem with buying from iTunes Store

    I have problem with buying from iTunes ??!!
    I've put all of my info cards
    What can i do ?!

    Are you trying to spam the forum with 6 the same posts?
    Please give more details of your problem and answer the question below:
    Is the app available in your country?
    Are you using the App Store for your country?

  • Problem with the renameTO method in the Linux environment

    Hi
    I got a problem with the renameTO method in the Linux environment. The file is not moving.
    This method is returning false. the same code executed successfully in Windows environment.
    Can anyone give some fix to this one or an alternate solution to move the files in both windows and Linux.
    boolean success;
    File root = new File(tempPath);
                   File f = new File(root, phyFileName);
                   File dest = new File(targetPath);
    success = f.renameTo(new File(dest, actualFileName));actualFileName = 400.doc
    dest = /home/jboss-4.0.3/axsscm_1.0/axsscmDocuments/xchange/fileup/fshare/PO/1786

    JITHENDRA wrote:
    Thanks for the prompt replyNo problem.
    >
    Can u solve the below doubt.
    Will renameTo method wont work in Linux? If so why?Did you not read what I said? I suspect you are trying to rename a file so that it actually has to be moved to a different volume (partition or hard disk) so it won't work. One would have the same problem on Windows trying to rename a file on the c: drive to a name on the d: drive.
    >
    >
    Can u give a sample or good link to do the above work which works fine in all environments.?Just follow the pseudo code I gave. 15 minutes work.

  • Hi. I have a problem with downloading from app store while last three days. An error did mot allow me to that. It's number is 1009.

    I have a problem with downloading from app store while last three days. An error does not allow me to take any app. The error number is 1009.

    Thats the ugliest code I've seen in a while and may be hampering your abilities to debug it. No offense - you have to start somewhere - think of it as somewhat constructive criticism.
    However, I cannot find any place where this is happening. Its happening on line 193.
    Also, this only happens when you try to move certain pieces to certain squaresThat might be a clue. Try printing out the indexes before line 193 and see what happens. Maybe use a debugger to step through your code.

  • Problem with Exceptional Aggregation

    Hi Gurus
    I have problem with Exceptional Aggregation.I have a cube which as following data
    Plant , Fromcostcenter,ToCostcenter, g/l,fiscalyear/period, allocation %,amount
    1             101234            102355       888881      001/2006            10       1000
    1             101234            102355       888881      002/2006            10       1000   
    1             101234             102345      888882      001/2006            10       1000
    1             101234             102346      888893       001/2006            90      1000
    1             101234             102346      888893       002/2006            90      1000
    1            101234             102346      888984        001/2006           90       1000
    I need summarized report as follows
    Fromcostcenter tocostcenter  allocation%
    101234                   102355         10
    101234                   102346          90
    But iam getting report as follows
    101234   102355  30
    101234   102355  270  
    The allocation% keyfigure should not be accumulated, so for this i specified Exceptional aggregation but not worked.
    Any Suggestions,please help me.
    Thanks
    Raghu

    Hi
    I am also having same problem. Did you get a solution for your problem? Can you please tell me how did u manage to display 10 and 90 instead of 30 and 270?
    I also tried exceptional aggregation if more than one value. but not working.
    Thanks

  • Webservice returned with exception in method 'isConnectionLoopbackAlive'

    Hello,
    during monitoring of last 24 hours logs i found message:
    <b>Webservice returned with exception in method 'isConnectionLoopbackAlive'
    category: /Applications/CAF/KM
    Application:  sap.com/irj
    Location:com.sap.portal.prt.cafkm.com.sap.caf.km.service.ConnectionTestService.isConnectionLookupAlive(String)
    </b>
    can anybody help me? what does it mean?
    Denis
    ip
    Edited by: Denis Yugay on Mar 18, 2008 5:10 AM

    Hello, Vincent.
    Situation is same after rebooting server.
    Denis
    Edited by: Denis Yugay on Mar 20, 2008 5:17 AM

  • I have a Iphone 4S and i update a new version 6.1, and i have a problem with wifi from i update this version. What is this problem? thanks Andres

    I have a Iphone 4S and i update a new version 6.1, and i have a problem with wifi from i update this version. What is this problem? thanks Andres

    Move or Copy the ENTIRE iTunes folder from the old computer or the backup of the old computer to the new computer.

  • K8t Neo2 problem with resume from standby after BIOS flash

    Previously while using the 3.2 BIOS and a Winchester 3200+, Both Standby and hibernation worked perfectly almost without fail.  Since I flashed the BIOS to 9.3 and installed an X2 4200+ I have had a problem with resume from standby.  The machine starts up OK but the 2nd processor core (cpu1) is almost maxed out and stays that way.  Task manager shows total cpu load as about 45-50% (all on cpu1) but shows no running process using any cpu load, just the usual System Idle process at about 99%.  The only way to get it back down to normal again seems to be to reboot.  By Contrast Hibernation works fine, with no increase in cpu load after resume.  I have all the latest MS patch's installed (I think!) the AMD dual core driver and the MS and AMD dual core optimizers.  Any ideas what is going on?

    Noticed last night that S! standby seems to work OK.  Also was experimenting with a fresh windows install on a spare hard drive (checking on another problem).  The fresh windows install appeared to work with S4 hibernation, so it looks like that is the answer to that problem.  However the problem with high cpu load on the second core after resume from S3 suspend to RAM standby was still present.  This problem is so specific and so repeatable (it does it every time without fail), that I feel there must be some very well defined reason for it.  Unfortunately I have no ideas what could be wrong. Have now tried Windows re-install, latest cpu drivers, AMD dual core optimizer, MS dual core optimizer, Cool'n'quite disabled/enabled, and various others and suspend to RAM still gives the same behaviour

  • Problem with output from  report to excel, calling the report from form 10g

    Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
    Code for version 6i (Works Very well)
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
    cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
         BEGIN
    nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
              BEGIN
              nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
         BEGIN
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';      
              END;
    ELSE
              BEGIN
                        nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');
    END;
    Code for version 10g
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    --byt12122007.sn
    repid REPORT_OBJECT;
         vURL VARCHAR2(500);
         rep_status VARCHAR2(20);
         vJobID VARCHAR2(100);
         v_rep VARCHAR2(100);
    VAR NUMBER;
    w_name_repserv VARCHAR2(30);
    --byt1212007.en
    BEGIN
         --w_name_repserv:=F_OBTIENE_SERVREP;
    w_name_repserv:='repserv';     
    pl_id := Get_Parameter_List('mytmp_params');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('mytmp_params');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
         cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    /*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
    BEGIN
         repid := find_report_object('tdvenrli1577');
    --nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
    BEGIN
         repid := find_report_object('tdvenrli1578');      
              --nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
    BEGIN
         repid := find_report_object('tdvenrli1576');
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              --nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');     
              END;
    ELSE
    BEGIN
         repid := find_report_object('tdvenrli1545');
                        --nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');     
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
         v_rep := RUN_REPORT_OBJECT(repid, pl_id);
         rep_status := REPORT_OBJECT_STATUS(v_rep);
         WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED')     LOOP
              rep_status:= report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
              vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
         END IF;
         WEB.SHOW_DOCUMENT(vURL, '_blank');
         IF NOT form_success THEN
              MESSAGE('Error: PL/SQL held against Button failed to execute');
              RAISE FORM_TRIGGER_FAILURE;
         END IF;
    /*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');*/
    END;

    There are two problems with your VI.  First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this:  Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition.  When you exit the acquire/write to file loop, then close the file.  In particular, the opening and the closing of the file should not be inside the loop.
    As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus.  As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
    Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function.  Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
    Good Luck.
    Bob Schor

  • Problem with a template method in JDialog

    Hi friends,
    I'm experiencing a problem with JDialog. I have a base abstract class ChooseLocationDialog<E> to let a client choose a location for database. This is an abstract class with two abstract methods:
    protected abstract E prepareLocation();
    protected abstract JPanel prepareForm();Method prepareForm is used in the constructor of ChooseLocationDialog to get a JPanel and add it to content pane.
    Method prepareLocation is used to prepare location of a database. I have to options - local file and networking.
    There are two subclasses ChooseRemoteLocationDialog and ChooseLocalFileDialog.
    When I start a local version, ChooseLocalFileDialog with one input field for local file, everything works fine and my local client version starts execution.
    The problem arises when I start a network version of my client. Dialog appears and I can enter host and port into the input fields. But when I click Select, I get NullPointerException. During debugging I noticed that the values I entered into these fields ("localhost" for host and "10999" for port) were not set for corresponding JTextFields and when my code executes getText() method for these input fields it returns empty strings. This happens only for one of these dialogs - for the ChooseRemoteLocationDialog.
    The code for ChooseLocationDialog class:
    public abstract class ChooseLocationDialog<E> extends JDialog {
         private E databaseLocation;
         private static final long serialVersionUID = -1630416811077468527L;
         public ChooseLocationDialog() {
              setTitle("Choose database location");
              setAlwaysOnTop(true);
              setModal(true);
              Container container = getContentPane();
              JPanel mainPanel = new JPanel();
              //retrieving a form of a concrete implementation
              JPanel formPanel = prepareForm();
              mainPanel.add(formPanel, BorderLayout.CENTER);
              JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
              JButton okButton = new JButton(new SelectLocationAction());
              JButton cancelButton = new JButton(new CancelSelectAction());
              buttonPanel.add(okButton);
              buttonPanel.add(cancelButton);
              mainPanel.add(buttonPanel, BorderLayout.SOUTH);
              container.add(mainPanel);
              pack();
              Toolkit toolkit = Toolkit.getDefaultToolkit();
              Dimension screenSize = toolkit.getScreenSize();
              int x = (screenSize.width - getWidth()) / 2;
              int y = (screenSize.height - getHeight()) / 2;
              setLocation(x, y);
              addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent e) {
                        super.windowClosing(e);
                        System.exit(0);
         public E getDatabaseLocation() {
                return databaseLocation;
         protected abstract E prepareLocation();
         protected abstract JPanel prepareForm();
          * Action for selecting location.
          * @author spyboost
         private class SelectLocationAction extends AbstractAction {
              private static final long serialVersionUID = 6242940810223013690L;
              public SelectLocationAction() {
                   putValue(Action.NAME, "Select");
              @Override
              public void actionPerformed(ActionEvent e) {
                   databaseLocation = prepareLocation();
                   setVisible(false);
         private class CancelSelectAction extends AbstractAction {
              private static final long serialVersionUID = -1025433106273231228L;
              public CancelSelectAction() {
                   putValue(Action.NAME, "Cancel");
              @Override
              public void actionPerformed(ActionEvent e) {
                   System.exit(0);
    }Code for ChooseLocalFileDialog
    public class ChooseLocalFileDialog extends ChooseLocationDialog<String> {
         private JTextField fileTextField;
         private static final long serialVersionUID = 2232230394481975840L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel();
              panel.add(new JLabel("File"));
              fileTextField = new JTextField(15);
              panel.add(fileTextField);
              return panel;
         @Override
         protected String prepareLocation() {
              String location = fileTextField.getText();
              return location;
    }Code for ChooseRemoteLocationDialog
    public class ChooseRemoteLocationDialog extends
              ChooseLocationDialog<RemoteLocation> {
         private JTextField hostField;
         private JTextField portField;
         private static final long serialVersionUID = -2282249521568378092L;
         @Override
         protected JPanel prepareForm() {
              JPanel panel = new JPanel(new GridLayout(2, 2));
              panel.add(new JLabel("Host"));
              hostField = new JTextField(15);
              panel.add(hostField);
              panel.add(new JLabel("Port"));
              portField = new JTextField(15);
              panel.add(portField);
              return panel;
         @Override
         protected RemoteLocation prepareLocation() {
              String host = hostField.getText();
              int port = 0;
              try {
                   String portText = portField.getText();
                   port = Integer.getInteger(portText);
              } catch (NumberFormatException e) {
                   e.printStackTrace();
              RemoteLocation location = new RemoteLocation(host, port);
              return location;
    }Code for RemoteLocation:
    public class RemoteLocation {
         private String host;
         private int port;
         public RemoteLocation() {
              super();
         public RemoteLocation(String host, int port) {
              super();
              this.host = host;
              this.port = port;
         public String getHost() {
              return host;
         public void setHost(String host) {
              this.host = host;
         public int getPort() {
              return port;
         public void setPort(int port) {
              this.port = port;
    }Code snippet for dialog usage in local client implementation:
    final ChooseLocationDialog<String> dialog = new ChooseLocalFileDialog();
    dialog.setVisible(true);
    location = dialog.getDatabaseLocation();
    String filePath = location;Code snippet for dialog usage in network client implementation:
    final ChooseLocationDialog<RemoteLocation> dialog = new ChooseRemoteLocationDialog();
    dialog.setVisible(true);
    RemoteLocation location = dialog.getDatabaseLocation();Exception that I'm getting:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:42)
         at suncertify.client.gui.dialog.ChooseRemoteLocationDialog.prepareLocation(ChooseRemoteLocationDialog.java:1)
         at suncertify.client.gui.dialog.ChooseLocationDialog$SelectLocationAction.actionPerformed(ChooseLocationDialog.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6134)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5899)
         at java.awt.Container.processEvent(Container.java:2023)
         at java.awt.Component.dispatchEventImpl(Component.java:4501)
         at java.awt.Container.dispatchEventImpl(Container.java:2081)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
         at java.awt.Container.dispatchEventImpl(Container.java:2067)
         at java.awt.Window.dispatchEventImpl(Window.java:2458)
         at java.awt.Component.dispatchEvent(Component.java:4331)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)java version "1.6.0"
    OpenJDK Runtime Environment (build 1.6.0-b09)
    OpenJDK Client VM (build 1.6.0-b09, mixed mode, sharing)
    OS: Ubuntu 8.04
    Appreciate any help.
    Thanks.
    Edited by: spyboost on Jul 24, 2008 5:38 PM

    What a silly error! I have to call Integer.parseInt instead of getInt. Integer.getInt tries to find a system property. A small misprint, but a huge amount of time to debug. I always use parseInt method and couldn't even notice that silly misprint. Sometimes it's useful to see the trees instead of whole forest :)
    It works perfectly. Sorry for disturbing.

Maybe you are looking for

  • Is there a way to export individual page items as PDF or EPS?

    I have a long document, all threaded, with a bunch of inline graphics. Many of the inline graphics have callouts and pointer lines. I take the graphics, callouts, and pointers, group them, and then cut and paste the group inline into the text flow. I

  • Revenue element-cost center

    During automatic cost element creation, I included one of gl sales accounts which is a revenue element. (cat 11). Now when I try to post entry to this sales account, it asks for cost object (cost center?). Now I really do not want to include this sal

  • Please help - how to copy DVD to computer so that it will play on computer

    I apologize if this is the wrong forum, but I am stuck. I have a DVD of my son-in-law's memorial service that I need to copy onto my computer in a playable form. The DVD itself works great on both the TV, and on the computer (playing with iDVD on the

  • How can I download and install CS3?

    how to download and installing cs3 ?

  • Books / links on best practices when writing on-line Help

    Hi everyone Not sure were to place this topic... I have not posted in here for ages... I am a RoboHelp user and I am looking for one or several books about best practices when writing on-line help. For examples, what are the "rules" or "do's" and "do