Could not retrieve the message date

I tried to show the date of receipt of a message in two ways, first with Message.getReceivedDate () and on the other hand with Message.getHeader ("DATE"). When I try and view the dates with one of these methods, my program stops and nothing is displayed. There are other elements that must be displayed on the screen, but are not. Here is the code I tried:

                                    try {
                                        message1 = currStore.list()[i].getMessages()[0];
                                    } catch (Exception e) {
                                    }
                                    for (int j=0; j < message1.getHeader("DATE").length; j++) {
                                        folderScreen.add(new LabelField(message1.getHeader("DATE")[j]));
                                    }
        SimpleDateFormat sdFormat2 = new SimpleDateFormat("h:mma");
        DateField dateField=null;
        try {
            messages = folder.getMessages();
        } catch (Exception e) {
        }

        if (messages.length >0) {
            dateField = new DateField ("", messages[messages.length-1].getReceivedDate().getTime(), sdFormat2);
        }
        Dialog.alert(dateField.toString());

What I find really puzzled, it's that when I commented the line of folderScreen.add () in the first piece of code, the rest of the items on the screen appear as expected. In the second piece of code, the screen appears as expected when the Dialog.alert line is commented out. The debugger does not all exceptions or other errors.

I use JDE 6.0.0 with the Simulator v6.0.0.396 9800, 9800 v6.0.0.246 peripheral.

Getting the date of the message is crucial to my project. I'm trying to recover the incorrect date? Is there another way to extract the date?

Thank you

Scott

Crisis averted. I've never understood why the first block of code has failed (I suspect because 'DATE' is not a valid header field), but the problem in the second block was that I was using Dialog.alert. I have it displayed via LabelField and it worked. Still confused, but I'm able to go forward now.

Thanks anyway,

Scott

Tags: BlackBerry Developers

Similar Questions

  • ADFDI-05577: could not retrieve the data table on the server.

    Dear all,

    My use case is, when I opened my excellent work book, I have this error message is out ' ADFDI-05577: could not retrieve the data table on the server line "and when I click on the button 'OK' of the error message I can recover all the data on the server. Please help me how to solve this error?


    Concerning
    KT

    Thanks much Sireesha Pinninti, John Stegeman, Arun.

    Yes, my problem is of subquery. I found a solution from this site.
    http://www.DBA-Oracle.com/t_ora_01427_single_row_subquery_returns_more_than_one_row.htm,
    http://srinisboulevard.blogspot.com/2010/04/ora-01427-single-row-subquery-returns.html
    http://StackOverflow.com/questions/3804850/erroneous-ora-01427-single-row-subquery-returns-more-than-one-row / / the answer is the last line

    Before change (error subquery)

    CheckingEO.BO,
    (SELECT ntr_no FROM test
    WHERE cs_no = CheckingEO.CS_NO) NTR_NO
    To archive the CheckingEO

    Edit it like this

    (SELECT ntr_no FROM test
    WHERE cs_no = CheckingEO.CS_NO and Rownum = 1) NTR_NO
    To archive the CheckingEO

    Concerning
    KT

    Published by: KT on 23 May 2012 15:35

    Published by: KT on 23 May 2012 15:48

  • Planted in the middle of the intallation: "could not update the registry data.

    My hard drive was a hardware malfunction and had to be replaced altogether. I just got my new hard drive, and after fit, he tried to install vista Home premium 32B, that came with my dell inspiron 530 computer. About 10 minutes after the installation a message announcing that "windows could not update the registry data" and "installation has been cancelled. This was repeated several times. Any ideas why and how to solve?
    Thank you.

    HI -.
    Other people who have had this problem report that choose NOT to do the updates during installation allows you to install finish. They are then installing updates once the installation is complete. You see an option to install no updatesa as part of the installation? Barb winter
    Program Manager of Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows 7 "the network connections folder could not retrieve the list of the network adapters on your Machine. Please make sure that the network connections service is enabled and running. »

    Get the message "the network connections folder could not retrieve the list of the network adapters on your Machine. Please make sure that the network connections service is enabled and running. "I am NOT able to connect to the internet please help. I use Windows 7 OS

    Hi Odile,

    Thanks for posting your question in the Microsoft Community forum.

    It seems that you have a problem with the connection to the Internet and receive the error message "the network connections folder could not retrieve the list of the network adapters on your Machine. Please make sure that the network connections service is active and running".


    I imagine the inconvenience that you are experiencing. We are here to help and guide you in the right direction.
    I may need a few more details to better understand the issue.
    1. did you of recent changes on the computer before this problem?
    2 do you have wireless or wired Internet connection?
    Method 1:
    We'll first run check network troubleshooting if this can help.
    Method 2:
    If the problem persists, I suggest you try the procedure described in the article and see if it helps.
    Method 3:
    If the problem persists, I suggest you try the procedure described in the article and see if it helps.
    For more information, please see the link.
    Get back to us and let us know the State of the question, I'll be happy to help you. We, at tender Microsoft to excellence.
  • Insider source subscription. Could not retrieve the client certificate

    Hi all

    I created subscription source initiated between two Windows 2008 R2.

    The source (client) cannot connect to the server. Logs on the client:

    Send the request for operation to the destination machine enumeration and the server.corp.domain.com:5986 port

    Authenticate the user using the Client certificate mechanism

    User authentication failed. The credentials did not work.

    Has received the answer of the layer network; status: 401 (HTTP_STATUS_DENIED)

    WSMan enumeration operation failed, error code 5

    Opens a session on the server.

    Sending HTTP error to the client after a failure of transportation.
    The HTTP status code is 503
    The error code is 995

    Could not retrieve the client certificate

    Send the HTTP 401 response to the client and disconnect the connection after sending the answer

    The user authorization failed with error 5Authorizing the user

    Authentication using client certificate with the client.corp.domain.com object is successfully

    How to fix the error "unable to retrieve the client certificate?

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Cannot send e-mail in Outlook Express. Message "could not open the message from the Outbox folder. 0x800420C8 error number.

    Cannot send e-mail in Outlook Express. Message "could not open the message from the Outbox folder. Account email Sympatico Server SMTPHM.sympatico.ca Protocol SMTP Port 25 secure (SSL) Yes, error number0x800420C8

    original title: 0x800420C8 error NUMBER

    Never seen a port 25, who wanted to use SSL, but by checking, Sympatico's apparently.

    1. This account has already worked? Is it simply to start?
    2. What is the exact verbatim error message? Otherwise, copy & paste it into a response.
    3. Have you tried to send a message and the message stuck in the Outbox?
  • "Adobe Acrobat Reader DC cannot open 'amy application' because it's a non supported file type or because the file is damaged."   I received this message during indexing on my computer.  I could not get the message, so I uninstalled Adob

    "Adobe Acrobat Reader DC cannot open 'amy application' because it's a non supported file type or because the file is damaged."

    I received this message during indexing on my computer.  I could not get the message, so I

    uninstalled Adobe.

    After you have uninstalled Abobe, I was able to get all my jobs and applications (with the exception of adobe files).

    Then I tried to re - install Adobe, but who has turned to a complicated procedure.

    There are so many choices, and there are a number of downloadable updates. What was I guess what to do?   But I have chosen one of the Adobes and tried to install it.

    After that I don't know what happened.  All my desktop icons are now Adobe icons in place.   that is The Firefox icon is now replaced by an icon of Adobe.  It is the same for several other desktop program icons. (QuickTime, chrome, Internet Explorer, etc.)

    When I try to open the program by clicking on it, I get the above message.

    I went to the site of help from Adobe and read a complex string of instructions, including

    words like '% pdf', "DWROD" and, for me, other nonsensical words and phrases.

    Needless to say that the instructions were no help.

    I said all that to say this.  I want that my computer back.  What should I do to do?

    Sincerely,

    Ralph Thompson

    [personal information... [Mod - https://forums.adobe.com/docs/DOC-3731]

    [This is an open forum, not the Adobe support, please do not post personal information]

    [If you send messages by e-mail, please turn off your "sig file" function for display]

    This may help: Application, file icons change in Acrobat/Reader icon

  • Error "could not get the audio data in the file.

    Hello

    I get a lot of mistakes "Could not get the audio data in the file" when you open a project. Sometimes they will plant Premiere Pro CC 7.01 (Mac). But if no first works as usual, with the audio.

    I tried to convert the audio files (from the hearing) from 32 to 16 bit. It worked while opening a project once, but not the next time.

    Where can it be?

    Edit: I also get this error when importing audio: "error: Premiere Pro version 7.0 is not compatible with the first version of plugin Pro 5.7.4. Maybe it's related.

    I have it! This is the plugin Smartsound hurt. Got rid of him and no more errors.

  • Windows Mail & Windows Live Mail does not start, could not open the message store

    Windows Mail & Windows Live Mail will not start. In both cases, I get an error message "Windows Mail could not be started. The application could not open the windows mail message store. Your Windows Mail mailbox data is currently used by another program, such as a virus scanner. Close the program or wait so he could complete its operation, then open Windows Mail again. (0x800C0155, 2). Waiting and turning off antivirus program do not solve the problem. For Windows Mail, I also have the message (Windows Mail could not be started because MSDE.) "DLL cannot be initialized). This message is not displayed for Windows Live.

    Hello

    1. did you of recent changes to the system before the show?

    I suggest you to follow the methods mentioned below and check if it helps.

    Method 1: Troubleshoot Windows Mail

    Follow the link below and troubleshoot Windows Mail and check if the problem persists.

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    Method 2:

    (a) open the windows Explorer.

    (b) make a right click on the user C: folder, click Properties.

    (c) uncheck the 'read only' option, and remember that there is no blue rear field in the box.

    (d) apply to all subfolders.

    (e) let run its course.

    Method 3:

     

    EDITING REGISTRY WARNING:

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following link.

    Back up the registry

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-the-registry

    (a) go to Start, type regedit in the search box.

    (b) expand this registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows Mail.

    (c) right-click and choose export to back it up.

    (d) then make sure that Windows Mail is closed and right click on the key again and choose Remove.

    (e) then try to start Windows mail.

     

    Also, I suggest you to send your application in the Windows Live Solution Center for better support.
    http://windowslivehelp.com/solutions.aspx?ProductID=15

    It will be useful.

  • DeskJet 3050 J610a: We could not retrieve the list of drivers for your product (3050 J610a)

    I have the HP Deskjet 3050 J610a. Printer worked fine on my machine Win 8.1. Just got reimagee to the same machine (Win 8.1) and had to reload my drivers for the printer. Site displays the following message when I select 3050 J610a with Windows OS. I can't add the printer to the computer as pilot given result is not available... was here last year.

    Anyone has a suggestion. My other computer on Win 10 works and driver is available.

    We were able to retrieve the list of drivers for your product.  Please select the desired operating system and select "Update" for a new attempt

    Hello

    It is still there:

    http://ftp.HP.com/pub/softlib/software12/COL34584/al-109394-3/DJ3050_J610_1315-1.exe

    A quick victory is first install it on your computer. Please download and install on your machine.

    Kind regards.

  • [redacted] Pavilion v208tx: we could not retrieve the list of drivers for your product. Please select the desired operatin

    I can't find drivers... tried to reload the page for a bunch of times... quiting browser and re open... I pressed the bunch of times update I tried different OS and it still saying "we couldn't retrieve the list of drivers for your product.  Please select the operating system"oh and he

    Hello

    Thanks for posting in the HP Support forum.

    It seems it was some website temporary glitch - it works for me now.  Could you try again?

  • Error: Could not find the locale data files. Please reinstall when you try to open Facebook.

    Original title: locale data file errors... How can I fix it?

    can't the facebook home page and when I search the

    "Cannot find the locale data files. Please reinstall"pop box.

    Hi kjkin,

    1 did you change on your computer before this problem?

    2 are you able to access other Web sites correctly?

    3. what browser do you use?

    If you are using Internet Explorer, follow these methods & check if the problem persists:


    Method 1

    You can follow this link & check if the problem occurs:

    Can't access some Web sites in Internet Explorer


    Method 2

    You can also follow this link:

    How to delete the contents of the temporary Internet files folder?


    Reference:
    Internet Explorer does not start or stops responding

    Hope the helps of information.

  • Could not import the message to get model No. Virtual Machine selected

    Hi guys,.

    Need help.  obtained Lab Manager, who was very well, yesterday I've migrated virtual machine that is running Lab Manager and virtual Center for LM to a new environment of VC VC 4.0 5.5, but not changed the computer virtual another installation of VMware tools updated.

    Now, whenever I try to import a new model in an organization, the window has changed, the Panel that has the VM on VC lists very well all VM but he now has a black box with an X in it next to each virtual machine and 'expand' next to it.  I put a name and choose the virtual machine that I want to import and it comes up saying 'No Virtual Machine not selected' even though there obviously.

    Other than this lab manager seem to be OK, I was able to deploy to the workspaces etc. without problem.

    Has anyone seen this?

    Mike

    It sets, migration has changed the time and date of the Lab Manager server, once I changed the date and time correct and restarted the Manager of laboratory services, he has worked.

  • Selection of approval tasks using adapters-could not retrieve the information of the user

    Hello
    I created the reconciliation of flat file (IOM 9.1) users. According to the requirement, approval must be provided before users are provisioned to Active Directory, using the 2 conditions.
    If the user is in the "Executive", level 2 approval is required so that if the user is the "Senior" position, single approval.
    The field to distinguish the condition is 'Position' defined in the UDF. I have created an approval process for Active Directory with level 2 approvals already.
    I created an adapter that checks the position of the user and returns responses. I use this adapter in a task to "check the Position of the user. This task above the 2 'immediate head' approvals and approvals for 'second level '.
    Depending on the response, the trust levels are supposed to be selected.

    But when I'm trying to retrieve the position of the user into the adapter using the key of the user (usrKey), the value of usrKey spending like '1' (xelsysadm key) instead of the user key which I created through reconciliation flat file. What could be the reason for this? Need your help guys.

    Mary,

    Is a correct method for OIM9.1

    tcResultSet requestResultSet = (newRequestKey) tcrequestIntf.getRequestTargets;

    Please import import Thor.API.Operations.tcRequestOperationsIntf;

    Thank you
    Hemant

    Published by: Hemant-IOM on November 2, 2012 03:08

  • Error: Could not open the database Data Book

    I have an old Palm VX, which works fine until today when I received the above captioned error message. I read through some of the other positions and some of the suggestions - tried even if they were not specific to a Vx and have removed and reloaded disc Palm software, without success. I even tried to restore my computer to an earlier date, thinking that might solve the problem. The outstretched hand works well, but I can't open the program on my PC - Windows XP.  Any suggestions?  Thank you.

    You can change the setting led by simply opening the opening of the Palm Desktop Hotsync Manager.  Simply click on the Hotsync icon in your system tray.  Go to custom.  Highlight the channel that you want to change, make change, come out, then Hotsync.

    Message relates to: None

Maybe you are looking for