NullPointer Exception exception exit

Hi all

I get this error when refreshing a record:

The cause of this output exception was that: java.lang.NullPointerException.

78: MEETING = < cfqueryparam cfsqltype = "cf_sql_timestamp" value = "" #meetingDate # "/ >"

This is the code that defines the meetingDate:

< cfset meetingDate = trim (form.meeting) >

< cfif not isDate (meetingDate) >

< cfelseif DayOfWeek (Now ()) eq 5 >

< cfset meetingDate = dateAdd ("d", now())) 4, >

< cfelseif DayOfWeek (Now ()) eq 1 >

< cfset meetingDate = dateAdd ("d", now())) 3, >

< cfelse >

< cfset meetingDate = dateAdd ("d", now())) 2, >

< / cfif >

It works when I use this code, but I use certain conditions more now:

< cfset meetingDate = trim (form.meeting) >

< cfif not isDate (meetingDate) >

< cfset meetingDate = dateAdd ("d", now())) 2, >

< / cfif >

Why he doesn't raise the java error? Thank you

I thought it was the onrequestend, but it has been done for some reason, use OR with EQ that messed up, I just broke it so down instead of making

I did this:

Tags: ColdFusion

Similar Questions

  • The phones call log smart blackBerry does not / nullpointer exception

    I just noticed that the call log is followed not calls received or placed. It saves only the missed calls. I was also making the mistake:

    Uncaught:exception.Java.lang.nullpointer exception apparently since this issue started. Any thoughts on how to solve this problem? Thank you.

    I suggest (IF you want) to scroll to the top of the newspaper to call messages > Menu > view folders > call log > Menu > delete everything prior. This should remove the call log.

    You can also open the Desktop Manager > Backup/Restore > advanced and on the right pane will be your BB device databases. Find the call log and press CLEAR.

    Then, while power is on, remove the battery and restart the device.

    See if the problem persists.

  • ObjectChoiceField gives nullpointer Exception...

    Hello

    Here is my code, can anyone tell me where I was wrong

    try {}
    DocumentBuilderFactory docBuilderFactory is DocumentBuilderFactory. newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    InputStream inputStream is getClass () .getResourceAsStream ("NewFile.xml");.

    Doc document = docBuilder.parse (inputStream);
    doc.getDocumentElement () .normalize ();

    NodeList list = doc.getElementsByTagName ("*");
    String _nodeName = new String();
    String [] hname = new String [list.getLength ()];
    for (int i = 0; i)
    Element = (Element) list.item (i);
    _nodeName = element.getNodeName ();
    {if (_nodeName.equalsIgnoreCase ("Country"))}
    hname [i] = (String) element.getAttribute ("value");
    System.out.println ("'*"'"+ [i] hname m:System.NET.SocketAddress.ToString ());
                       
    }
    }
    ObjectChoiceField choice1 = new ObjectChoiceField ("country:", hname, 0);
    Add (Choice1);
    } catch (Exception e) {}
    System.out.println ("my Exception:" + e);
    }

    Thank you

    Check, this is the array of objects that you used in ObjectChoiceField has values.

  • Nullpoint exception when start JDeveloper 12.1.3 with SOA suite

    One met the exceptions below then start JDeveloper 12.1.3 with SOA suite? This led to I can not save the workspace, very bad.

    JDeveloper version: Build JDEVADF_12.1.3.0.0_GENERIC_140521.1008.S

    Version of the JDK: java version "1.7.0_80".

    trace of the stack as below:

    SEVERE:

    javax.naming.NamingException [Root exception is java.lang.NullPointerException]

    at oracle.adf.share.jndi.ContextImpl.throwNamingException(ContextImpl.java:671)
    at oracle.adf.share.jndi.ContextImpl.saveDocument(ContextImpl.java:968)
    at oracle.adf.share.jndi.ContextImpl.save(ContextImpl.java:986)
    at oracle.adf.share.dt.ConnectionNsChangeListener.refreshInternal(ConnectionNsChangeListener.java:242)
    at oracle.adf.share.dt.ConnectionNsChangeListener.refresh(ConnectionNsChangeListener.java:180)
    at oracle.adf.share.dt.ConnectionNsChangeListener.objectAdded(ConnectionNsChangeListener.java:43)
    ...
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    Caused by: java.lang.NullPointerException

    at oracle.jdevimpl.jps.JpsConfigUtilsImpl.getDefaultJpsContext(JpsConfigUtilsImpl.java:722)
    at oracle.jdevimpl.jps.JpsConfigUtilsImpl.getCredentialStoreLocation(JpsConfigUtilsImpl.java:1407)
    at oracle.adf.share.dt.security.providers.jps.CSFDTCredentialStore.checkInitCSFStore(CSFDTCredentialStore.java:333)
    at oracle.adf.share.dt.security.providers.jps.CSFDTCredentialStore.fetchCredential(CSFDTCredentialStore.java:588)
    at oracle.adf.share.dt.security.providers.jps.CSFDTCredentialStore.fetchCredential(CSFDTCredentialStore.java:578)
    at oracle.adf.share.security.credentialstore.CredentialStore.fetchCredential(CredentialStore.java:187)
    at oracle.adf.share.jndi.CredentialStoreHelper.fetchCredential(CredentialStoreHelper.java:104)
    at oracle.adf.share.jndi.ReferenceStoreHelper.saveCredentialsInternal(ReferenceStoreHelper.java:520)
    at oracle.adf.share.jndi.ReferenceStoreHelper.saveCredentials(ReferenceStoreHelper.java:476)
    at oracle.adf.share.jndi.ContextImpl.saveDocument(ContextImpl.java:957)
    ... more than 123

    Thanks guys,.

    finally found the problem, one that has created this app, forgot to add 3 files below to Git, after that I added these files, the problem disappeared.

    and I also applied the paths that you mentioned.

    src/META-INF/cwallet.sso

    src/META-INF/cwallet.sso.lck

    src/META-INF/jps-config.xml

    the sit of the guy in front of me has me a bar of chocolate.

    Thanks for the reply.

  • Nullpointer exception with version XMLParserv2 - 11.2.0.1.0 and JDK1.6

    Hello
    I get exception of null pointer when using XMLParserv2 - 11.2.0.1.0.jar with a database of Java and Oracle11g while XSL transformation. However the same code works with XMLParserv2 - 9.2.jar.

    Please provide the possible cause.

    >
    The XMLParserV2.jar is the version available in the lib folder where the database is installed. Its size is 1 350 KB
    >
    You must ensure that all of these jars are in the same series. If the Analyzer is in the dbhome/lib folder then the xsu jar should be there too.

    And, as I said, none of these files have a jar of xdb file so it could be the wrong version.

    I never had a response at all as to why Oracle delivered three different sets of pots with the DB as much as some of the jars show the same version but are actually different. I think that these dbhome/lib, xdk/lib and sqldeveloper/lib files and content are managed by different groups.

    You can also try different copies of these jar files to see if that solved the problem.

    Is there a reason why you can use JDK 1.5 and pots (file XMLParserv2 - 9.2.jar who used to work? He just put the versions jar to work in a project folder and add them to the classpath, you use rather than use those that are not ' work.

  • Design-&gt; engineer to the logic model: Nullpointer Exception

    Hello
    I imported into my physical data as a model of relationship model using import-> data dictionary. Made a subview (in the relational model) and reverse engineered model logic. Worked well.
    Now, I created several subviews (ard 10) in the relational model and when try to reverse engineer, get nothing on the screen.
    In \datamodeler\log\datamodeler.log < datamodeler > find the following exception:

    2011-10-25 12:22:39, 588 [main] INFO DataModelerAddin - Data Modeler Oracle SQL Developer 3.0.0.665
    2011-10-25 12:25:20, 344 [AWT-EventQueue-0] ERROR MDBAction - java.lang.NullPointerException

    Any help would be appreciated.
    Concerning

    P.S have about 90 tables in the relational model where I created subviews. Have also 2 more relational model with in the same design with the import of the tables right in it.

    Menu 'Design' is deleted - you can use double arrow to do the same thing - you do the visible relational/logic diagram.

    Philippe

  • NullPointer Exception in the OFA page

    Hello

    Here's the code I used.

    v_OnTheFlyViewObject.executeQuery ();
    line oracle.jbo.Row = v_OnTheFlyViewObject.first ();

    If (line! = null)
    {
    v_PONum = row.getAttribute (0) m:System.NET.SocketAddress.ToString ();
    System.out.println ("CO - v_PONum-" + v_PONum);
    v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString ();
    }


    The code has been compiled and the v_PONum was displayed. But for education v_POType, OAF wrong page with the exception of pointer zero. Is the statement v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString (); good. ?

    The request was:

    String v_OnTheFlyVOQuery = "sΘlectionner segment1 as PONum, attribute5 as POType from po_headers_all";

    How to get the value in column 2 of the 1st row?

    Thank you
    HP
    v_OnTheFlyViewObject.executeQuery();
    v_OnTheFlyViewObject.reset(); //NEW
    oracle.jbo.Row row = v_OnTheFlyViewObject.first();
    if(row != null)
    {
    v_PONum = row.getAttribute(0).toString();
    System.out.println("CO - v_PONum - " +v_PONum );
    v_POType = row.getAttribute(1)+"";
    }
    

    The code has been compiled and the v_PONum was displayed. But for education v_POType, OAF wrong page with the exception of pointer zero. Is the statement v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString (); good. ?

    It is a region of table, if yes then you can capture by making a loop on the view to this field object attribute.

    //Sample Code
    OAViewObject vo1 = (OAViewObject)am.findViewObject("EmployeeEOVO1");
    vo1.reset();
    if (vo1 != null)
    {
    do
    {
    if(!vo1.hasNext())
    break;
    vo1.next();
    EmployeeEOVORowImpl lcerl = (EmployeeEOVORowImpl)vo1.getCurrentRow();
    
    //Get value of VO attribute here
    v_PONum = lcerl.getAttribute(0)+"":
    
    //How to get the 2nd column value from the 1st row?
    
    v_POType = row.getAttribute(1)+"";
    
    OR
    v_POType = row.getAttribute("POType")+""; //VO Attribute attached with that column
    }while(true);
    }
    }
    

    See how loops through the View object to get its line
    http://oracleanil.blogspot.com/2009/04/auto-invoice.html
    http://oracleanil.blogspot.com/2010/09/OAF-passing-table-type-object-to-Oracle.html

    If this POType is just one element on the page, not within the region of the Table then use can capture its value by:

    String VPOtype = pageContext.getParameter("POType")+"";  //POType is the ID of the column created on page.
    

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • Deployment of OTA: multiple COD in a single JAD: NullPointer Exception

    Hi all

    I am trying to install application OTA. I managed to install for a single cod by changing JAD to point to the URL of the server. However, in my application, there are several files of COD and I want them all to be installed once. Therefore, based on the Knowledge Base Article I added

    RIM-COD-URL-n: >

    RIM-COD-size-n: >

    for all COD in single JAD files. Since I'm on signed code I updated param of size with the new file size of cod also.

    When I point to this URL of file JAD I get HTTP 500 error and watch details be java.lang.NullPointerException.

    Also I've added the project dependency while RIM-COD-Module-dependencies, although I tried without modification as well.

    Here's my full JAD file... I would like to know if I missed something...

    Manifest-Version: 1.0
    RIM-COD-Module-Name: SosAlert
    RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_locationapi,Objects,ApplicationServices,net_rim_xml
    MIDlet-Jar-Size: 2071
    MIDlet-1: ,,
    RIM-COD-Creation-Time: 1216305305
    MIDlet-Jar-URL: SosAlert.jar
    RIM-COD-URL-1: http://serverip/temp/ExternalJarsLib.cod
    RIM-COD-Size-1: 33904
    RIM-COD-URL-2: http://serverip/temp/Objects.cod
    RIM-COD-Size-2: 6840
    RIM-COD-URL-3: http://serverip/temp/ApplicationServices.cod
    RIM-COD-Size-3: 4536
    RIM-COD-URL: http://serverip/temp/SosAlert.cod
    RIM-COD-Size: 3716
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Version: 0.0
    MIDlet-Name: SosAlert
    MIDlet-Vendor: 
    MicroEdition-Profile: MIDP-2.0
    RIM-MIDlet-Flags-1: 0
    

    Thanks adavance.

    You shouldn't list your individial modules in the section of RIM-COD-Module dependencies.  Here are a few questions that might help:

    1. one of your folders of cod are in fact several cod (app.cod to app.zip fame and trying to extract).  If they are each extracted cod should be included as separate RIM-COD-URL/size-N in the jad.

    2. is the configuration of your server with the correct mime types?  The mimetype to a jad should be text/vnd.sun.j2me.app-descriptor and the mimetype for cod should be application/vnd.rim.cod

    3. Once you get the NullPointerException check your event log by clicking on the home screen and pressing Alt-LGLG.  There may be an entry in the "BOLD" which refers to the NullPointerException and a stack trace.  This can give us an idea as to why this is happening.

    4. try the Simulator and see if the output of the Simulator has nothing relevant.

    Also, let us know what jde you build with and which model of device/OS you are using when you receive these errors.

  • 4.0EA1 - Nullpointer exception when importing Designer

    Hello

    When importing the designer the following messgae is written to the datamodeler.log file:

    java.lang.NullPointerException

    at oracle.dbtools.crest.imports.oracledesigner.ODODomain.generate(ODODomain.java:274)

    at oracle.dbtools.crest.imports.oracledesigner.ODExtractionHandler.generateDesign(ODExtractionHandler.java:562)

    to oracle.dbtools.crest.imports.oracledesigner.ODExtractionController$ Runner.run (ODExtractionController.java:153)

    at java.lang.Thread.run(Thread.java:724)

    This occurs when the data type of a field is not filled in the designer.

    Best regards

    Joop

    Hi Joop,

    Thanks for reporting this.  I connected a bug on this issue.

    David

  • NULL point Exception in table

    Hi friends I have created an array of objects like this

    GridListDef gridListDef [] =new GridListDef[size];
    
    for(int k=0;k
    
    

    Why the setName method called JET nullpointer exception object?

    Because everything you do to initialize the table with a certain size and allocation of memory for her.

    Try adding the following at the beginning of the loop:

    gridListDef[k] = new GridListDef();
    

    Edit: a bit slow to post.

  • Persistent object Null pointer exception

    Hi all! This is my first time that you try to use persisted data and, as a result of the Bberry tutorial, I'm a JVM 104 "NullPointer Exception" when you try to synchronize and "setContents' in a new Bank persistence (so basically my"PersistentObject"is Null (as confirmed by the debug), which I suppose that logic since I have not stored all the data it again.) I guess I'm just curious as to why I get this error (and cannot just write something on the value "null"). Here is a code...

    public static PersistentObject levels = PersistentStore.getPersistentObject (0x3e1f605d47578703L);

    ...

    String [] level_info = {'0', '1'}; just to test

    Synchronized (levels) {//this is where I get the error of debugging of "NullPoint Exception", where levels = "null"

    levels.setContents (level_info);
    Levels.Commit ();

    }

    Thank you in advance for your help!

    I solved the problem by displaying the 4.6 JDE 'samples' tutorial persistentstoredemo...

    You can find it here on your PC:

    C:\Program search in Motion\BlackBerry JDE 4.6.0\samples\com\rim\samples\device\persistentstoredemo

    Thank you

    -Jordan

  • NULL Pointer Exception on this.getDBTransaction)

    Hello

    I'm getting null pointer exception trying to commit to DB in the module of the Application.

    I get the exception only when charging, never the exception on jdev local env and even on the server does not.

    Here is the code snippet where I get nullpointer exception.

    this.getDBTransaction () .commit ();

    < 4 July 2011 14:31:50 CEST > < WARNING > < oracle.adf.controller.faces.lifecycle.Utils > < BEA-000000 > < ADF: addition of the following JSF error: java.lang.NullPointerException
    java.lang.NullPointerException
    at com.ge.ohr.dm.common.GEDMGenericAppModuleImpl.updateDataInStepsTbl(GEDMGenericAppModuleImpl.java:119)
    at com.ge.ohr.dm.salary.service.SalaryAppModuleImpl.updateRequestorDataOnSave(SalaryAppModuleImpl.java:398)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:638)
    at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2136)
    at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3063)
    at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2143)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
    at com.ge.ohr.dm.bean.SalaryChange.performCommit(SalaryChange.java:2073)
    at com.ge.ohr.dm.bean.SalaryChange.PerformAutoSave(SalaryChange.java:2083)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke (unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke (unknown Source)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
    at org.apache.myfaces.trinidad.component.UIXPoll.broadcast(UIXPoll.java:98)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    >


    -Nanga

    then my bet, trying to secure your activation of the application.

  • Problems in the earpiece of the phone

    Hello everyone...

    I'm working on a project in which I have to take a real log all incoming and outgoing calls and missed calls...

    I use headset for this phone but I am little problems with it...

    (1) public void callInitiated (int callId) is called twice for each call...

     public void callIncoming(int callId) {
    
              checkCall2("call Incoming", callId); 
    
        }
    public void callInitiated(int callId) { 
    
             checkCall2("call Initiated", callId);
    
        }
    

    While I use the same function in public void callIncoming (int callId) that is running normally (once for each call).

    (2) I need to get the duration of calls when calls are complete... I use

    public void callDisconnected (int callId) &

    public void callEndedByUser (int callId)

    in the following way:

    public void callDisconnected(int callId) {
    
              PhoneCall callInfo = Phone.getCall(callid);
    
              int elapsedOut = callInfo.getElapsedTime();
    
              String  phoneNumberOut = callInfo.getPhoneNumber();
        }
    

    But his NullPointer Exception always launch for "callInfo '...

    I don't know why its happening... and if this is not the right way to do this, then please show me the right way... Help, please!

    Thank you in advance...

    bug callInitiated is known, we must put in place a protection device (timestamp or a Boolean in conjunction with the callId).

    But why don't you use the phoneloglistener? you get all the information you need, not you?

  • Passing an object of the UiApplication class reference

    Hi all

    I am very new to the development of BB and have struggled for hours on something that I think should be very simple. What I have, this is the main class that extends UiApplication and a second class that implements Runnable. From a method in the UiApplication class, I create an instance of the Runnable class. After that, I call a method to start from this class and pass an object originally from the UiApplication class reference - so that I can call a method, once completed the processing of the Runnable class.

    The problem I have, is that once past the object through a call to method reference, the reference instantly cancels and causes a NullPointer exception when trying to call a method in the original class. The structure is as below, but with all the surrounding code subscribed:

    public class MainApp extends UiApplication {
    
        MainApp _MainApp;
        OtherClass _OtherClass;
    
        public static void main(String[] args) {
        MainApp _MainApp = new MainApp();
        _MainApp.enterEventDispatcher();
        }
    
        private void createOtherClass() {
            _OtherClass = new OtherClass();
            _OtherClass.someMethod(_MainApp);
        }
    
        public void response() {
            // code here
        }
    }
    
    public class OtherClass implements Runnable {
    
        MainApp _MainApp;
    
        public void someMethod(MainApp MainAppRef) {
            _MainApp = MainAppRef;
            // _MainApp object reference is null here
    
            new Thread(this).run();
        }
    
        public void run() {
            // stuff here
            // once done, call a different method
            sendDetailsBack();
        }
    
        public void sendDetailsBack() {
            _MainApp.response(); // causes a NullPointerException
        }
    }
    

    I rewrote this to only show the code at the source of the problem. I don't quite understand why the object reference is not passed correctly - I have tried many other ways to call back to the UiApplication function, including static calls.

    Any help on how I do it is very appreciated!

    Will be

    I suspect that your problem is here:

    MainApp _MainApp = new MainApp();

    I think you meant just

    _MainApp = new MainApp();

  • Decoding of a byte in an image

    In my blackberry project, I'm talking to a .net web service that returns a class person. The person class consist of a firstname, lastname, and image file. In the service, I'm coverting the image into a string in base64; I am setting up the image as such property:

    Byte [] toEncodedBytes = System.Text.ASCIIEncoding.UTF8.GetBytes (pngFile);

    person.imageByte = System.Convert.ToBase64String (toEncodedBytes);

    The information is sent to the device blackberry with success and is placed in a similar class. I compared the Base64 string in the webservice and device and they are the same. However, I am not able to change my png to its original state. On the device, I have the following code:

    Byte [] imageBytes = person.imageByte.getBytes("UTF-8");

    BYTE [] b = Base64InputStream.decode (imageBytes, 0, imageBytes.length);

    EncodedImage myImage = EncodedImage.createEncodedImage (bs, 0, bs.length);

    BMF BitmapField = new BitmapField();

    bmf.setImage (myImage);

    Add (BMF)

    When I run the present, I get an java.lang.nullpointer exception. I can print the values of the object very well but I have a problem to convert the base64 back string to a real image and display. For any help or suggestion would be wornderful and greatly appreciated.

    OK, I thought about it. My problem with the service. In the service, I was sending the path string. Duh! In any case, I fixed the problem by making the System.IO.File (path); I now get my picture on the BlackBerry to a web service using ksoap2. Thank you.

Maybe you are looking for