Simple question re: Avoiding null pointer errors

In my program, I ask the user to enter a 3-letter code, then try to determine whether that code belongs to one of a list of objects.
I keep getting null-pointer errors. I understand why, but don't know how to get around it. I don't know how to format my loop.
(Simple, I know. But I'm just starting out!)
Any help would be appreciated.

This may not come through clearly; my first day using this system.
The format I'm trying to use is this:
if (chosenCode.compareTo(airport[counter].getCode()) != 0)
counter++;
} while ((chosenCode.compareTo(airport[counter].getCode()) != 0) && (counter != size));
Trying to go through list until I find chosenCode.
Any suggestions?

Similar Messages

  • Null pointer error if not started with 1st in string

    hi, this little pratice is about building a simple shopping cart. the TOAD.JSP will display the item list and quantity, user could check item and input the quantity that they want. if the user input larger quantity than database, servlet will sent the back to TOAD.jsp and show message. now it works if selected from 1 item, but if selected 2nd or 3rd, it will have null pointer error over here:
    for(int i=0; i<ItemList.size(); i++)
    newit = (ItemBean)ItemList.get(i);
    if (item != null && item.equals(newit.getItem()) )
    %>
    <tr>
    <td ><input type="checkbox" name = "item" value="<%= newit.getItem() %>"><b><%= newit.getItem() %> </b><br></td>
    <td><input type=text name="<%= newit.getItem() %>Qty" value="<%= orderQty%>"></td>
    </tr>
    <tr><td colspan = 2>
    <font size="3" color="red">
    The item <%= newit.getItem() %> is NOT available in stock</font>
    </td>
    </tr>
    <%
    } else {
    %>
    <tr>
    <td ><input type="checkbox" name = "item" value="<%= newit.getItem() %>"><b><%= newit.getItem() %> </b><br></td>
    <td><b><input type=text name="<%= newit.getItem() %>Qty" value="<%= newit.getQty()%>"></b> </td>
    </tr>
    <%
    %>
    thanks for your time!

    You have prvided unsufficent information and poorly formatted code and as such no meaningful answer can given you at present.
    But here is the best that one can guess at.
    You have a null somewhere.
    Is it coming from this code? I am going to say no.
    Where does it come from? I don't know.
    Where should you look? In the code that does processing to see what happens when yuo have more than one item.
    What should you do next? Start putting in some debugging and tracing statements to see where you are heading off into the null abyss.

  • Using ExecuteWithParams and getting a null pointer error

    I'm new to Webcenter and have a question about using ExecuteWithParams. I want to know if anyone experienced a null pointer exception when using it. I was using the example from the followng page to create a parameter form to filter an adf table.
    http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/threesearchpages/threesearchforms_partthree.html?_template=/ocom/technology/content/print
    I created the named bind variable in the View Object editor, changed the query and dragged the ExecuteWithParams Operation onto my page. However, when I go to run the page I get the following error:
    javax.faces.el.EvaluationException: java.lang.NullPointerException     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)     at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.getLabel(LabelAndMessageRenderer.java:618)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:157)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:246)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeColumnChild(PanelFormRenderer.java:275)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:251)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:545)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:153)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:69)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)     at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderNamedChild(BaseRenderer.java:384)     at oracle.adfinternal.view.faces.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent(PageHeaderLayoutRenderer.java:259)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)     at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.PageLayoutRenderer.render(PageLayoutRenderer.java:76)     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:242)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:265)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:645)     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:568)     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)     at mdssys.viewcontroller._public__html._SoluminaOrderStatus_jspx._jspService(_SoluminaOrderStatus_jspx.java:943)     [SRC:/mdssys/ViewController/public_html/SoluminaOrderStatus.jspx:4]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.mds.jsp.MDSJSPFilter.doFilter(Unknown Source)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)     at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.NullPointerException     at oracle.adf.model.binding.DCVariableImpl.resolveSourceVariable(DCVariableImpl.java:64)     at oracle.adf.model.binding.DCVariableImpl.resolveResourceProperty(DCVariableImpl.java:142)     at oracle.jbo.common.VariableImpl.getLabel(VariableImpl.java:800)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.getLabel(JUCtrlValueBinding.java:1384)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:1726)     at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:156)     at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:649)     at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)     at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)     at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)     at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)     at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)     ... 97 more
    Can anyone help me with this?

    Please, post your question on JDeveloper forum (JDeveloper and ADF

  • Using DateAdd and getting Null Pointer Error

    I am using the following code below:
    <cfoutput query="getpeople">
    <cfset time2 = TimeFormat(getpeople.lunch_out_time,
    "hh:mm")>
    <!---<cfset time3 = DateAdd("h", 0, time2)> --->
    <cfset time4 = DateAdd("n", 10, time2)>
    I have commented out the adding 0 hours and am trying to add
    10 minutes to time2 a variable that is set by getting a value from
    a database however when I try and do this I get a
    The system has attempted to use an undefined value, which
    usually indicates a programming error, either in your code or some
    system code.
    Null Pointers are another name for undefined values.
    Please help, thanks!

    No the issue was that I had someone in the dateabase with no
    time listed so that was the issue. Took care of it and it's working
    fine now :-) Thanks for the thought.

  • Web Service scedule report NUll pointer Error

    I've managed to use the web service to scedule my report.
    The web service completes and mails the output but the final status is failed due to this error:
    System Message java.lang.NullPointerException
         at oracle.apps.xdo.servlet.scheduler.Util.getLocale(Util.java:127)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:596)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    Anyone any ideas why?

    This is the call to the web service, I've just changed the email accounts for this example.
    String username = "Administrator";
    String password = "Administrator";
    String reportAbsolutePath = "/Burst/BURST to EMAIL/BURST to EMAIL.xdo";
    ReportRequest repRequest = new ReportRequest();
    repRequest.setReportAbsolutePath(reportAbsolutePath);
    DeliveryRequest devRequest = new DeliveryRequest();
    ScheduleRequest schedRequest = new ScheduleRequest();
    schedRequest.deliveryRequest = devRequest;
    schedRequest.scheduleBurstringOption = true;
    schedRequest.notifyWhenFailed = true;
    schedRequest.notifyWhenSuccess = true;
    schedRequest.notifyWhenWarning = true;
    schedRequest.notificationTo = "###@***.org.uk";
    schedRequest.reportRequest = repRequest;
    schedRequest.saveDataOption = false;
    schedRequest.saveOutputOption= false;
    schedRequest.schedulePublicOption= false;
    schedRequest.useUTF8Option = false;
    schedRequest.userJobName ="BURST to EMAIL";
    schedRequest.repeatInterval =0;
    schedRequest.repeatCount =0;
    myPort.scheduleReport(schedRequest,username,password );

  • Null Pointer errors with Mapviewer Demo

    Here is the error:
    xml_response=<?xml version="1.0" encoding="UTF-8"?><oms_error>Message:null
    Thu Jan 16 15:14:43 MST 2003
    Machine Node Name: hoas9ias
    Severity: 0
    Description:
    java.lang.NullPointerException
         at oracle.spatial.mapserver.core.RealWorker.generateMapImage(RealWorker.java:267)
         at oracle.spatial.mapserver.core.RealWorker.process(RealWorker.java:95)
         at oracle.spatial.mapserver.MapServerImpl.renderMap(MapServerImpl.java:171)
         at oracle.spatial.mapserver.oms.doPost(oms.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:283)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:535)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:281)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:766)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
         at Long postings are being truncated to ~1 kB at this time.

    Here is the error:
    xml_response=<?xml version="1.0" encoding="UTF-8"?><oms_error>Message:null
    Thu Jan 16 15:14:43 MST 2003
    Machine Node Name: hoas9ias
    Severity: 0
    Description:
    java.lang.NullPointerException
         at oracle.spatial.mapserver.core.RealWorker.generateMapImage(RealWorker.java:267)
         at oracle.spatial.mapserver.core.RealWorker.process(RealWorker.java:95)
         at oracle.spatial.mapserver.MapServerImpl.renderMap(MapServerImpl.java:171)
         at oracle.spatial.mapserver.oms.doPost(oms.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:283)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:535)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:281)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:766)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
         at Long postings are being truncated to ~1 kB at this time.

  • Null point error while working with a window

    Hi all ,
                  On click of a button ina  awindow a new window which has only one view has to open.After getting opened the new window and upon performing some functioanlites in that it is giving the following error
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:269)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:237)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:149)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    this is the stack trace..can anyone plz help me out
    Regards
    Padma N

    Hi,
    Can you please post the lines of code where exactly you are getting the Exception.
    Regards,
    Sudhir

  • One more noob question... null pointer why?

    DoubleWrapper[] numbers = new DoubleWrapper[total];
    for (int i = 0; i < total; i++) {
    numbers.setDouble(getNumber(lowerbound,upperbound));
    doublewrapper is a class i made, obviously and get numbers returns a string
    what am i doing wrong?"
    thanks

    Arrays of objects start full o' null's. Initate the values in the array first.
    Object[] objects = new Object[ 10 ] ;
    for( int i = 0; i < objects.length; i++ ) {
        objects[i] = new Object();
    }

  • Simple question - set in & out points

    I have a LONG MP3 file that I need to pull specific parts out & save them as separate MP3s.
    How do I set the in & out points and export using Garageband?
    I'm assuming I would just position the in & out points at the beginning/end of the audio I want to export, choose "export" (or something) & it would write that portion of the master track to a new MP3...BUT I can't even see any place to create or move in & out markers.
    ...at least, this is how I would do it in Cubase. Does it work this way in Garageband?

    Hangtime is right, though this does require decoding and then recoding after editing. You could look at 'MP3 Trimmer':
    http://www.deepniner.net/mp3trimmer/
    which can top and tail the existing MP3 file and save the result out. It is $10.95.

  • Null Point Error

    Hi,
    I am developing Web Applications.
    I am running into a problem where whenever I make a modification to a java class that is part of the .war, the entire .war crashes. I then need to refresh my browser inorder for me to continue viewing my jsps. I was wondering if there was anyway for the rest of my jsp pages to work after I have made a change to a java class.
    Thank you.

    Hi,
    I am developing Web Applications.
    I am running into a problem where whenever I make a
    modification to a java class that is part of the
    .war, the entire .war crashes. I think what you mean is that the server is crashing (war file is just a compressed set of files/folders, like a zip file)
    I then need to
    refresh my browser inorder for me to continue viewing
    my jsps. Um, no, you just need to view a JSP that doesn't throw an error. But if you mean you have to start over or something after loosing your session, that would make sense if the server crashed or the servlet threw errors.
    I was wondering if there was anyway for the
    rest of my jsp pages to work after I have made a
    change to a java class.This makes no sense. The JSP pages will work regardless of what's going on, as long as the server is alive, even if the Java class is bad. I mean, unless the JSP's are dependent on bad Java classes that are breaking, you should be fine.

  • ViewDocument.jsp gets null pointer exception when using report token instead of docid for DHTML

    <p>The following command gets a null pointer error showing up in Tomcat log:</p><p>../../viewers/cdz_adv/viewDocument.jsp?sEntry=<%=strEntry%>&lang=en&iDocID=830&ViewType=I&kind=Webi</p><p>where sEntry is a valid report token </p><p>but works fine if the ViewType is H  or id=830 is used instead of sEntry.  When the above command is issued the drill columns are displayed correctly but no report is shown and a null pointer exception is encountered.</p>

    There is a Consulting Solution called BOInterface that Business Objects Global Services sells and that may help you if you are implementing your own "InfoView".
    A description is <a href="http://www.mnsoft.org/bointerface0.0.html">here</a>.
    Particularly, see the <a href="http://www.mnsoft.org/pmiv.0.html">Poor Man's InfoView</a> web application.
    Contact me via direct email for more information if this is interesting for you.
    HTH,
    M
    Matthias Nott -  Business Objects
    Service Line Leader Products EMEA
    [email protected]

  • Null pointer execption

    I am having trouble will a null pointer error in the following code
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.*;
    public class CustomerDB
    private static Connection connection = null;                                  
        private static Customer[] customerArray;
        public CustomerDB()                                                         //constructor
                connect();                                                          //calls the connection routine
                System.out.println("Connected");                                    //don't know if really connected, just lets me know I'm at this line
                System.out.println(connection.toString());                          // I do not understand why connection object is "Null" here
        public static void connect()                                               //connect to the database
                try
                    // load the JDBC-ODBC bridge driver
                    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                    // use the DriverManager to create a Connection object
                    String dbUrl = "jdbc:odbc:MurachDB";
                    String username = "Admin";
                    String password = "";
                    Connection connection = DriverManager.getConnection(dbUrl, username, password);
                    System.out.println(connection.toString());                      //connection is a valid object here ie. not 'null'
                catch(ClassNotFoundException e)
                    System.err.println("Database driver not found.");
                catch(SQLException e)
                    e.printStackTrace();
        public static void getCustomers()
            Customer p;
            int count = 0;
            try
                Statement statement = connection.createStatement();                 //this line errors because connection == "null"
                ResultSet rs = statement.executeQuery("SELECT * FROM Customers");    //select everything in Products table
                java.util.List list = new ArrayList();                              //put the results into an array
                while(rs.next())                                                    //read each row
                    String first = rs.getString("FirstName");
                    String last = rs.getString("LastName");
                    String email = rs.getString("eMailAddress");
                    p = new Customer(first, last, email);
                    customerArray[count] = p;
                rs.close();
                statement.close();
            catch(SQLException e)
                e.printStackTrace();  // for debugging
    }When I execute CustomerDB thisCustomer = new CustomerDB(); in main, i get the following
    sun.jdbc.odbc.JdbcOdbcConnection@173a10f
    Connected
    Exception in thread "main" java.lang.NullPointerException
    at CustomerDB.<init>(CustomerDB.java:17)
    at DBTesterDec7.main(DBTesterDec7.java:8)
    Press any key to continue...
    so it think connection has a value in connect(). Why is it connection null everywhere else?

    connect() declares a local variable called "connection" that shadows the instance variable. Don't declare the local variable in connect().

  • Null pointer exception when using CFCs on Solaris

    I am running Apache 2.0.52 and my web root is /htdocs. I have
    a multi-server installation of CF 7.0.2 on another partition:
    /apps/jrun4. Regular CFM files work fine; however, I receive the
    "The system has attempted to use an undefined value..." (null
    pointer) error whenever I attempt to use a CFC from within a CFM
    file or if I try to use Application.cfc -- Application.cfm works
    fine.
    For instance...I created two files in /htdocs/test: Test.cfc
    and tester.cfm
    Test.cfc contains:
    <cfcomponent>
    <cfset str = "Test">
    </cfcomponent>
    tester.cfm contains:
    <cfset temp = createObject("component", "Test")>
    When I run tester.cfm I get the error. I had some success
    when I created a mapping in CF Admin called /tester, pointing to
    /htdocs/test. I then changed the code in tester.cfm to:
    <cfset temp = createObject("component", "tester.Test")>
    And it worked! I also tried creating a CFC on the same
    partition as the CF install (/apps) and then referencing it in the
    tester.cfm code. That works too! However, that's a bandaid solution
    and half of one at that. If I try to use Application.cfc anywhere
    within /htdocs (web root), I get the null pointer error.
    Additionally, I have another server setup identically except
    for one difference: the web root is /apps/htdocs (same partition as
    CF). Everything works fine on it. Has anyone experienced this
    behavior before? Any ideas besides moving /htdocs to /apps/htdocs?
    Is this a known issue that the web root must reside on the same
    partition as the CF install?

    I am running Apache 2.0.52 and my web root is /htdocs. I have
    a multi-server installation of CF 7.0.2 on another partition:
    /apps/jrun4. Regular CFM files work fine; however, I receive the
    "The system has attempted to use an undefined value..." (null
    pointer) error whenever I attempt to use a CFC from within a CFM
    file or if I try to use Application.cfc -- Application.cfm works
    fine.
    For instance...I created two files in /htdocs/test: Test.cfc
    and tester.cfm
    Test.cfc contains:
    <cfcomponent>
    <cfset str = "Test">
    </cfcomponent>
    tester.cfm contains:
    <cfset temp = createObject("component", "Test")>
    When I run tester.cfm I get the error. I had some success
    when I created a mapping in CF Admin called /tester, pointing to
    /htdocs/test. I then changed the code in tester.cfm to:
    <cfset temp = createObject("component", "tester.Test")>
    And it worked! I also tried creating a CFC on the same
    partition as the CF install (/apps) and then referencing it in the
    tester.cfm code. That works too! However, that's a bandaid solution
    and half of one at that. If I try to use Application.cfc anywhere
    within /htdocs (web root), I get the null pointer error.
    Additionally, I have another server setup identically except
    for one difference: the web root is /apps/htdocs (same partition as
    CF). Everything works fine on it. Has anyone experienced this
    behavior before? Any ideas besides moving /htdocs to /apps/htdocs?
    Is this a known issue that the web root must reside on the same
    partition as the CF install?

  • Null Pointer when hiding view attribute

    Hi,
    Attached is my override of doDML of table media. The view object contains fields from tables media and idn. The primary key to both, and the link field is called udid. I try to hide the media.udid but I get a null pointer error.
    Do these line (also below) need the primary key of the media table (the table whose doDML the code is located)?
    EntityDefImpl home = IdnImpl.getDefinitionObject();
    IdnImpl idn = (IdnImpl)home.findByPrimaryKey(getDBTransaction(),getPrimaryKey());
    The point of the above code is to grab another field I need for a procedure(from table IDN). When I comment these lines out the error goes away. Procedure doesn't work, but it runs. It seems weird I know to go to another table to capture udid as you can see below, even though it's available to this table instance. The reason I did that (and chose to hide media.udid) is to have a primary key available to table IDN, so as to grab the other field I need (min_val).
    ANy thoughts? I haven't hid a view attribute before..
    Thanks.
    protected void doDML(int operation, TransactionEvent e)
    //super.doDML(operation, e);
    switch(operation)
    case DML_INSERT: {
    CallableStatement st = null;
    EntityDefImpl home[i]Long postings are being truncated to ~1 kB at this time.

    protected void doDML(int operation, TransactionEvent e)
    //super.doDML(operation, e);
    switch(operation)
    case DML_INSERT: {
    CallableStatement st = null;
    EntityDefImpl home = IdnImpl.getDefinitionObject();
    IdnImpl idn = (IdnImpl)home.findByPrimaryKey(getDBTransaction(),getPrimaryKey());
    String min_val = idn.getMinVal();
    Number udid = idn.getUdid();
    try
    String stmt = "BEGIN DA_YAMS.MED_INS(?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    st.setInt(1,udid.intValue());
    st.setString(2,getFileName());
    st.executeUpdate();
    stmt = "BEGIN DA_YAMS.IDN_INS(?,?);END;";
    DBTransaction idn_tr = getDBTransaction();
    st = idn_tr.createCallableStatement(stmt,1);
    st.setInt(1,udid.intValue());
    st.setString(2,min_val);
    st.executeUpdate();
    catch (SQLException s)
    throw new JboException(s);

  • JMS Receiver error: Null pointer received from QueueConnectionFactory JNDI

    Hello gurus,
    I need integrate PI 7.1 with EMS Tibco.
    I deployed the jar files:
    tibrvjms.jar
    tibjmsufo.jar
    tibjmsapps.jar
    tibjmsadmin.jar
    tibjms.jar
    tibemsd_sec.jar
    slf4j-simple-1.4.2.jar
    slf4j-api-1.4.2.jar
    jms.jar
    (and then restard the j2ee engine).
    Hi,
    I put the following parameters at the JMS Receiver Communication Channel in Integration Directory :
    Transport Protocol : Access JMS Provider with JNDI
    JNDI Lookup Name of QueueConnectionFactory : QueueConnectionFactory (and I try too with GenericConnectionFactory)
    JNDI Lookup Name of jms queue : SAPToTibcoQueue
    Name of JNDI initial context factory : com.tibco.tibjms.naming.TibjmsInitialContextFactory
    JNDI server address : tibjmsnaming://172.18.xxx.xx:7222
    In the RWB the JMS Channel is red with the following error message :
    "Receiver channel. Details: Null pointer received from QueueConnectionFactory JNDI lookup."
    Can someone help me?
    Thanks in Advanced!!

    HI,
    Can you try these below options.
    1) Can you please check whether you have deployed all the below jar files.
    crimson.jar
    jaxp.jar
    jcert.jar
    jms.jar
    jndi.jar
    jnet.jar
    jsse.jar
    jta-spec1_0_1.jar
    tibcrypt.jar
    tibjms.jar
    tibjmsadmin.jar
    tibjmsapps.jar
    tibrvjms.jar
    2) there is a service which is called either Classloader Viewer or Classpath Resolver on the server node in the J2EE Visual Admin. In that service you see a list of all deployed sdas, so you can check for jmsproviderlib. Then if you click on that to open, it should show you all the jar files that came in with the deployment.
    JMS Configuration - Tibco JMS ?
    Regards,
    Raju

Maybe you are looking for

  • Logical XOR operator in T-SQL (SQL Server 2000)

    Hi all.... I was wondering why SQL Server 2000 lacks a logical XOR operator. Do you have a ready to use function that implements it? How can I program one by myself? I know that A XOR B is equivalent to NOT A * B + A * NOT B. So I tried to create thi

  • Opening new window in xMII Portal navigation tree

    I'm doing a 5-level deep drilldown where each drilldown needs a new window (browser page). I do it with JavaScript and window.open(strURL); and xMII 11.5. This works well with "standalone" pages, but I would like to use xMII Portal navigation tree al

  • Will can replace Front Row and play podcast from itunes?

    One thing I did with Front Row pre-Lion that I can't do with Lion is watch video podcasts on my MacMini connected to my SDTV (no HDMI). Plex doesn't seem to have any connection to iTunes. Is there any Front Row replacement that will let me watch my v

  • Double tap on the crown will not return me to last app

    When I am on the Home view or on the watch view, double tapping the Crown will not take me back to the last app viewed.  Anyone else experience this?

  • Setting Up Mobile Accounts to For Users Who Already Exist

    Hi there, I work for a company with about 10 Macs, all laptops, all are on 10.5. They have never had a server and have asked me to set one up for them. I am in the process of setting up a server here with a new copy of OS X Server 10.5. Here's my que