PhoneLogs.callAt () threw NullPointerException

Hi all

I just met a weird phenomenon

net.rim.blackberry.api.phone.phonelogs.PhoneLogs.callAt (int index, long folderID) threw a NullPointerException.

This is the code:

fPhoneLogsInstance = PhoneLogs.getInstance();

int numberOfPhonelogs = fPhoneLogsInstance.numberOfCalls(PhoneLogs.FOLDER_NORMAL_CALLS);
for (int i = 0; i < numberOfPhonelogs; i++)
{
  try
  {
    PhoneCallLog callLog = (PhoneCallLog)fPhoneLogsInstance.callAt(i, PhoneLogs.FOLDER_NORMAL_CALLS);
    // do some calc on the log.
  }
  catch (Exception ex)
  {
    System.out.println("Will skip FOLDER_NORMAL_CALLS phonelog entry number: " + i + " of total count: " + numberOfPhonelogs + "; Ex: " + ex.toString());
  }
}

and this is the output:

Will skip FOLDER_NORMAL_CALLS phonelog entry number: 428 of total count: 430; Ex: java.lang.NullPointerException
Will skip FOLDER_NORMAL_CALLS phonelog entry number: 429 of total count: 430; Ex: java.lang.NullPointerException

I guess that the last two newspapers has somehow broken!

Anyone have an idea what could have gone wrong?

BTW, the problem occurred on a BB Bold device. This is (obviously) very difficult to reproduce on another device.

the code seems to be OK. If you manipulate the call log in your code or in another thread, there seems to be a bug.

Tags: BlackBerry Developers

Similar Questions

  • PhoneLogs.addCall (Journal CallLog) throwing NullPointerException in OS 5.0?

    Hi developers, RIM

    I found phonelogs.addcall (Journal CallLog) seems to throw NullPointerException in Simulator for OS 5.0 beta. Could someone confirm this?

    Same error occurs in swapCall() as well.

    You can report bugs using the developer Issue Tracker.  Please refer to this post: http://supportforums.blackberry.com/t5/Java-Development/Developer-Issue-Tracker/td-p/271768

  • Error PhoneLogs.addListener (this)

    Hi, I have the following code, which adds a phoneloglistener to the phonelogs.

    On the system 4.3 or later, all right.

    but when I do the test on 4.1, it seems that there is an error on PhoneLogs.addListener (this);

    It refers to an exception instance... advice?

    Thank you.

    class XXXPhoneLogListener implements PhoneLogListener

    {

    public XXXPhoneLogListener)

    {

    try {}

    PhoneLogs.addListener (this);

    }

    catch (NullPointerException e)

    {System.out.println (e.getMessage ()) ;}}

    }

    {} public void callLogAdded (CallLog cl)

    ...

    }

    }

    Hi, thanks for the response.

    The problem has been resolved.

    This is because there is a log of phone calls security option.

    On the new phone, there will be a prompt requesting access authorization to the log of phone calls, but on the old version of the blackberry handheld, such as 7250, the line does not work, even if it is set to 'ask '.

    In any case, after you set this option to 'allow', the program works.

  • List PhoneLog never has the same elements as the native Phonelog

    Hi all.

    I'm figuring the minutes devoted to the calls. But impossible to get the same behavior as the native PhoneLog.

    For example, I manually delete all the entries in PhoneLog in the PhoneLog.

    Can I browse through all entries with:

        allPhoneLogs = new SimpleSortingVector();
    
        for (int i = 0; i < fPhoneLogsInstance.numberOfCalls(PhoneLogs.FOLDER_NORMAL_CALLS); i++)
        {
          PhoneCallLog callLog = (PhoneCallLog)fPhoneLogsInstance.callAt(i, PhoneLogs.FOLDER_NORMAL_CALLS);
          allPhoneLogs.addElement(callLog);
        }
        for (int i = 0; i < fPhoneLogsInstance.numberOfCalls(PhoneLogs.FOLDER_MISSED_CALLS); i++)
        {
          PhoneCallLog callLog = (PhoneCallLog)fPhoneLogsInstance.callAt(i, PhoneLogs.FOLDER_MISSED_CALLS);
          allPhoneLogs.addElement(callLog);
        }
    

    To my surprise, they're all here!

    The PhoneLog is empty, but the entries are here!

    Even more in the Options of the phone log is a parameter called "phone list view.

    After "CallLog" changed to "Most recent", I see the entries that have already been deleted! (similar thing happens when you switch to another type of view: 'Name', 'Most used')

    (1) so how can I count properly only the entries in the display type "Call log" of the call log? (or indeed any other type?)

    (2) is it possible to remove completely the phonelog entry it is not in one of the types of display?

    on some versions of the OS the calllog displayed and the internal version are not synchronized, restart the device help.
    There is a bug in the firmware, there is nothing you can do about it except by using a more recent firmware.

  • JSP value variable Bean but page give NullPointerException when Bean attempts to merge in the DB

    I'm new to JSP but I have to use to retrieve data from an external site, pass data to a bean, write data to a database and redirect the user to another page. Follow the JSP page.


    <%@page import="EJB.getResponse"%>
    <%
    long paymentID = Long.parseLong(request.getParameter("paymentid"));
    String responsecode = "9999";
    getResponse g = new getResponse();
    if (request.getParameter("result") != null &&  request.getParameter("result").equals("CANCELED")) {
    String result = request.getParameter("result");
    String  threedsecure = request.getParameter("threedsecure");
    g.setThreedsecure(threedsecure);
    responsecode = "8888";
    g.setResponsecode(responsecode);
    g.setPaymentId(paymentID);
    g.printData();
    } else if (request.getParameter("error") != null) {
     String error = request.getParameter("error");
     String errortext = request.getParameter("errortext");
     g.setError(error);
     g.setErrortext(errortext);
     responsecode = "7777";
     g.setResponsecode(responsecode);
     g.setPaymentId(paymentID);
     g.printData();
     } else {
    String result = request.getParameter("result");
    String auth = request.getParameter("auth");
    long ref = Long.parseLong(request.getParameter("ref"));
    long tranid = Long.parseLong(request.getParameter("tranid"));
    String trackid = request.getParameter("trackid");
    String udf1 = request.getParameter("udf1");
    responsecode = request.getParameter("responsecode");
    String udf3 = request.getParameter("udf3");
    
    g.setAuth(auth);
    g.setPaymentId(paymentID);
    g.setRef(ref);
    g.setResult(result);
    g.setTranid(tranid);
    g.setTrackid(trackid);
    g.setUdf1(udf1);
    g.setResponsecode(responsecode);
    g.setUdf3(udf3);
    g.printData();
    }
    
    out.println("redirect=" + "http://mysite/Workshop/result.jsp?paymentID=" + paymentID + "&responsecode=" + responsecode);
    
    %>
    
    

    It's the bean:


    @ManagedBean
    @RequestScoped
    public class getResponse implements Serializable {
    
    private Long paymentId;
    private String result;
    private String auth;
    private Long ref;
    private Long tranid;
    private String trackid;
    private String udf1;
    private String responsecode;
    private String host;
    private String udf3;
    private String error;
    private String errortext;
    private String threedsecure;
    @EJB
    private ParticipantDAO participantDAO;
    
    Participant user;
    
    public void printData() {
        if (!responsecode.equals("00") && !responsecode.equals("000") &&
                !responsecode.equals("8888") && !responsecode.equals("7777")) {
            return;
        }
        System.out.println("paymentID: " + paymentId);
    
        if (responsecode.equals("00") || responsecode.equals("000")) {
            System.out.println("responsecode: " + responsecode);
            System.out.println("result: " + result);
            System.out.println("trackid: " + trackid);
            System.out.println("tranid: " + tranid);
            System.out.println("auth: " + auth);
            System.out.println("udf1: " + udf1);
            System.out.println("udf3: " + udf3);
            Date date = new Date();
            user = participantDAO.getByTrackid(trackid);
            user.setPayed(Boolean.TRUE);
            user.setPaymentAuth(auth);
            user.setPaymentCreditCard(udf3);
            user.setPaymentDate(date);
            user.setPaymentDetails(udf1);
            user.setPaymentID(paymentId);
            user.setPaymentResponseCode(responsecode);
            user.setPaymentTranid(tranid);
            user.setPaymentResult(result);
            participantDAO.modify(user);
        } else if (responsecode.equals("8888")) {
            System.out.println("threedsecure: " + threedsecure);
            System.out.println("result: " + result);
            System.out.println("CANCELED");
            user = participantDAO.getByPaymentId(paymentId);
            System.out.println(user.getEmail());
            if (user != null) {
                System.out.println("Write Result in DB");
                user.setPaymentResult("CANCELED");
                participantDAO.modify(user);
            }
        } else if (responsecode.equals("7777")) {
            System.out.println("NON AUTENTICATA");
            user = participantDAO.getByPaymentId(paymentId);
            user.setPaymentResult("NO AUTHENTICATED");
            participantDAO.modify(user);
        }
    
    
        //user = participantDAO.getByEmail(principal);
    }
    
    

    On the console, I see the prints, but I get the NullPointerException


    WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
     java.lang.NullPointerException
    at EJB.getResponse.printData(getResponse.java:72)
    at org.apache.jsp.notify_jsp._jspService(notify_jsp.java from :60)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)
    
    

    Where am I wrong?

    Resolved.

  • I threw backups time machine in finder - no space freed up.

    So, I realize after looking on these forums of discussion that what I did was stupid, BUT here's the deal...

    We have a backup disc that we have used for a couple of computers and I wanted to delete an old backup of one without having to change the computers, if you are using A laptop, I threw a couple old files to laptop B backup into the Finder. He asked that if I wanted to delete all the files that are locked, I said, go ahead.

    After throwing away ~ 400 GB of old stuff, space on the backup drive has not changed. I looked both to the trash and the. Record of cops on the drive and there is nothing there, even when I toggle the visibility of the file.

    I realize now I should have deleted the backups correctly, but how can I rectify my current situation - How can we recover the free space on the backup drive?

    Thank you in advance for your help!

    You can erase the external hard drive using the disk utility application (located in/Applications/Utilities). I strongly suggest making a backup to another drive before doing this. In fact, you should do that before doing anything else, because now you're sitting there with no backup at all.

    Disk utility (El Capitan): delete a volume

    Good luck.

  • Threw my ipod touch 4th generation

    Hello

    I have an old ipod touch 4th generation which I broke all the time. I threw the ipod touch in the field (long story) and it has not worked since. It lights and IV ' e tried to reload and reset but nothing works. I would like to get rid of it, but I have a few photos and videos in the photo album that I really want to keep. Is there a possible way to get photos and videos retrieved when its broken? Is there a way out of the chip memory inside and somehow get it from who? Can I take it to someone for repair? I really REALLY want photos and videos from there. Any suggestions or solutions?

    Thank you!

    If iTunes does not detect the iPod your only hope is a data recovery company. The flash storage is soldered to the logic board.

  • NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception

    Hello

    I am developing an application for a computer running windows 7 and the Atom processor.

    When I try to launch the application, I get the following error:

    NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception

    System.TypeInitializationException: the type initializer for ' NationalInstrumnets.UI.Internal.WaveformPlotElement caused an exception--> System.IO.FileNotFoundException: could not load file or assembly 'NationalInstruments.Common.Native.dll' or one of its dependencies.  The specified module could not be found.

    I see it in the c:\windows\Microsoft.Net\assembly\gac_32.

    Help, please.

    Thank you.


  • System.TypeInitializationException: The initializer for type for 'NationalInstruments.UI.Internal.WaveformPlotElement' threw an exception.

    Hello group

    I currently have a problem with an application I developed. I use VS2008 and c# with Measurement Studio Version 8.6.0.189. My application uses OR controls to display the tables and diagrams.

    I tested my application on my desktop and on other computers and virtual machines (including Windows 7 Beta, XP) and it works as I expected. For the installer, I used the normal generation of Microsoft tool in VS 2008.

    Now, my client has problem to run the application on a laptop with windows XP. The Setup works very well and install .NET 2.0 and my request as I expected. The customer can start the app, but when the program gets to a point where I intern create and initialize the elements of an WaveformGraph, I get the following exception:

    System.TypeInitializationException: The initializer for type for 'NationalInstruments.UI.Internal.WaveformPlotElement' threw an exception. ---> System.TypeInitializationException: the initializer for type for 'NationalInstruments.PrecisionTimeSpan' threw an exception. ---> System.IO.FileLoadException: could not load file or assembly 'NationalInstruments.Common.Native, Version = 8.6.35.131, Culture = neutral, PublicKeyToken = 18cbae0f9955702a' or one of its dependencies. Sharp application konnte nicht gestartet werden, weil Anwenungskonfiguration kreatin ist nicht die. Zur Problembehebung should die neu installieren application. (Exception from HRESULT: 0x800736B1)
    File name: 'NationalInstruments.Common.Native, Version = 8.6.35.131, Culture = neutral, PublicKeyToken = 18cbae0f9955702a'---> System.Runtime.InteropServices.COMException (0x800736B1): sharp application konnte nicht gestartet werden, weil Anwenungskonfiguration kreatin ist nicht die. Zur Problembehebung should die neu installieren application. (Exception from HRESULT: 0x800736B1)
    to NationalInstruments.PrecisionTimeSpan... ctor (Int64, UInt64 fractionalSecondTicks wholeSeconds)
    to NationalInstruments.PrecisionTimeSpan... cctor()

    -End of the exception stack trace internal-
    NationalInstruments.PrecisionTimeSpan.FromSeconds (Double value)
    to NationalInstruments.UI.Internal.WaveformPlotElement... cctor()

    -End of the exception stack trace internal-
    to NationalInstruments.UI.Internal.WaveformPlotElement... ctor (Object obj)
    at NationalInstruments.UI.WaveformPlot.CreateElement)
    to NationalInstruments.UI.ControlEntity... ctor()
    to NationalInstruments.UI.Plot... ctor()
    to NationalInstruments.UI.XYPlot... ctor()
    to NationalInstruments.UI.WaveformPlot... ctor()
    to MosesVideo.SchreiberControl... ctor (AnzeigeObjekte obj, index Int32, Globals g)
    at MosesVideo.MainWindow.CreateNewAnzeigeObjekt (Int32 & iObjektIndex, iType Int32, Boolean bReload)
    at MosesVideo.MainWindow.MainWindow_MouseUp (Object sender, MouseEventArgs e)
    at System.Windows.Forms.Control.OnMouseUp (MouseEventArgs e)
    at System.Windows.Forms.Control.WmMouseUp (Message & m, MouseButtons, Int32 clicks button)
    at System.Windows.Forms.Control.WndProc (Message & m)
    at System.Windows.Forms.ScrollableControl.WndProc (Message & m)
    at System.Windows.Forms.ContainerControl.WndProc (Message & m)
    at System.Windows.Forms.Form.WndProc (Message & m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m)
    at System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    This exception is thown, when I run the line

    plot [i] = new NationalInstruments.UI.WaveformPlot ();

    The same runns code on each machine, I have access to.

    What happens here?

    Concerning

    Stephan Gerhards

    Hi all

    Finally I found a solution. I had to manually add the "Microsoft_VC90_CRT.msm" and the MICROSOFT_VC80_CRT to my Installer and then it also works on all of my client.

    Concerning

    Stephan Gerhards

  • Event Viewer: the initializer for type for 'advancedsetttings' threw an exception

    I get an error "the initializer for type for 'advancedsetttings' threw an exception" when trying to view the subscriptions in the event viewer.  The machine is a windows 2008 server.  It worked before but just stoped working.  I tried loging in as a local administrator on the machine account and has not worked.  Also, it does work with an account that is a domain administrator.  That everyone knows, or knows how to solve this problem?

    Thank you.  With the help of the question please repost the question in Forum Windows Server

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

  • "Error 500: java.lang.NullPointerException.

    "Error 500: java.lang.NullPointerException" COSA MEANS MEAN? Pole MI ESCE QUESTA WRITTEN MENTRE PER UNA DOAMANDA GRAZIE

    Hello

    This is an English language Forum.

    Please go to

    http://answers.Microsoft.com/en-us/IE/Forum?TM=1373748955969&tab=all

    to select your language from this link English 

    You can also choose a region or language on this page:

    http://support.Microsoft.com/common/international.aspx

    Don

    Questo e UN forum in lingua inglese.

    If get di andare

    http://answers.Microsoft.com/en-us/IE/Forum?TM=1373748955969&tab=all

    by rates the lingua da questo link English 

    If Può anche rates una regione o lingua da questa pagina:

    http://support.Microsoft.com/common/international.aspx

  • _ERR_COMMAND_EXCEPTION CMN3101E user, the system is unavailable due to "java.lang.NullPointerException".

    I just had some problem to be able to print a PDF file that has sent me a reliable source of the school. He could not open with precision and would not print. I was told a few undesirable and the part of it said:

    User CMN3101E the system is unavailable due to "java.lang.NullPointerException".

    I then Googled that and found the I needed to have the video drivers Intel and not the versions of MS due to some problems. I went through all this mess by using Device Manager and switched 2 pieces of diff for Intel drivers Intel and not versions of MS. I also did an UPDATE MS after a reboot to ensure that another MS Update would not reinstall certain versions of MS and if he found them I wanted to mark them for future IGNORES and ignore them now.

    Still no go. I need help big time. Does anyone for a small iJEFF help today¿

    Hi Jeff,

    1. What is the brand and model of the printer?

    2. is the specific question in the PDF? Have you tried other files to print?

    See the articles:

    Resolve PDF printing problems

    http://helpx.Adobe.com/Acrobat/KB/troubleshoot-PDF-printing-Acrobat-Reader.html

    http://www.Adobe.com/cfusion/search/index.cfm?cat=support&term=Java%2Elang%2ENullPointerException&loc=en_US&self=0&LR=en_US&product=Acrobat

    Let us know if you have other questions about Windows in the future.

  • The type initializer threw an exception.

    Trying to open USPS Shipping Assistant. Get this message - the initializer for type for 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy' threw an exception.

    Hello

    I suggest you try to perform the clean boot and check if it helps:

    http://support.Microsoft.com/kb/310353

    NOTE: When you are finished troubleshooting, make sure turn the computer in mode normal startup such as suggested in the article.

    Check if that helps.

  • would have been said, that I threw my product key when I threw my box after buying my computer need HELP to activate my programs... is this possible without the keycode?

    Is it possible to recover the product key password without having to buy one for $125 to? Program Windows 7

    If you threw the box of MS Office and you had not activated Office you have learned an expensive lesson.

    I suspect that your new PC has made a preinstalled Office trial and you then installed the version of office that was purchased, and it has not been activated, so its key is not registered on your system

    If you have received for your purchase of MS Office there may be options.

  • NullPointerException when app running, but don't not during debugging

    When I run my app in the Simulator I get a nulpointerexception, but when I debug in the Simulator even I get no exception.  Has anyone seen this behavior before and how can I find the source of the exception?

    I tried this a couple of simulators.  There's a place in my code I know wherever I knocked a nullpointer but this exception is caught by the debugger with a catch (Throwable t) {...} line.  Catch (Throwable) does not work in run mode?

    I use JDE 5, 9550 and 9530 sims, eclipse 3.5.2 plugin 1.1 and compliance of java 1.5

    By adding an extra

    catch (NullPointerException e) {}

    block that now my exception gets handled.  The final catch blocks look like this:

    try{
    ...
    //code that throws nullpointerexception
    ...
    } catch (NullPointerException e) {
        lat=0;
        lon=0;
    catch (Throwable t) {
            lat=0;
        lon=0;
    }
    

    Seems to me the catch (Throwable t) should work in run mode too.  Is NullPointerException not a throwable in run mode?

    -Peter, I did not look into the timing stuff.

Maybe you are looking for