java.lang.NullPointerException

Java.net JIRA | karlkilden | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    See minimal example bean here: https://gist.github.com/4483188 or end of description. Used with: <h:inputText binding="#{exampleBean.text}" value="hi"></h:inputText> Note that my actual use case is rather constructing a whole table this way including inputTexts as children. It was however reproduce-able with just this sample. Stacktrace in first comment. package test; import javax.annotation.PostConstruct; import javax.enterprise.inject.Model; import javax.faces.component.behavior.AjaxBehavior; import javax.faces.component.html.HtmlInputText; import javax.faces.context.FacesContext; import javax.faces.event.AbortProcessingException; import javax.faces.event.AjaxBehaviorEvent; import javax.faces.event.AjaxBehaviorListener; @Model public class ExampleBean implements AjaxBehaviorListener { private HtmlInputText text; public HtmlInputText getText() { return text; } public void setText(HtmlInputText text) { this.text = text; } @Override public void processAjaxBehavior(AjaxBehaviorEvent event) throws AbortProcessingException { System.out.println("Ajax call"); } @PostConstruct private void setup() { HtmlInputText inputText = (HtmlInputText) FacesContext .getCurrentInstance().getApplication() .createComponent(HtmlInputText.COMPONENT_TYPE); AjaxBehavior ajaxBehavior = (AjaxBehavior) FacesContext .getCurrentInstance().getApplication() .createBehavior(AjaxBehavior.BEHAVIOR_ID); inputText.setId("input"); ajaxBehavior.addAjaxBehaviorListener(this); ajaxBehavior.setTransient(true); ajaxBehavior.setDisabled(false); inputText.addClientBehavior("focus", ajaxBehavior); text = inputText; } }

    Java.net JIRA | 4 years ago | karlkilden
    java.lang.NullPointerException
  2. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 6 years ago | Pallinder
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  3. 0

    J2ME (Java) - Null Pointer Exception caught in Display Class

    Stack Overflow | 6 years ago | Tom
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cloud Foundry v2 in Grails

    Stack Overflow | 3 years ago | angelo087
    java.lang.NullPointerException: Cannot invoke method getAt() on null object
  6. 0

    NullPointerException in MIDlet with left soft key

    Stack Overflow | 6 years ago | berry120
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callItemListener(), bci=57 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=57 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.decodeBehaviors()
    2. JSF
      HtmlBasicRenderer.decode
      1. com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.decodeBehaviors(HtmlBasicRenderer.java:215)
      2. com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.decode(HtmlBasicRenderer.java:117)
      2 frames
    3. JavaEE 7
      UIInput.processDecodes
      1. javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
      2. javax.faces.component.UIInput.decode(UIInput.java:757)
      3. javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1181)
      4. javax.faces.component.UIInput.processDecodes(UIInput.java:662)
      4 frames
    4. JSF
      PartialVisitContext.invokeVisitCallback
      1. com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506)
      2. com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
      2 frames
    5. JavaEE 7
      UIComponent.visitTree
      1. javax.faces.component.UIComponent.visitTree(UIComponent.java:1612)
      2. javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      3. javax.faces.component.UIForm.visitTree(UIForm.java:371)
      4. javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      5. javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      5 frames
    6. JSF
      PartialViewContextImpl.processPartial
      1. com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376)
      2. com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:252)
      2 frames
    7. RichFaces Core API
      ExtendedPartialViewContextImpl.processPartial
      1. org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:199)
      1 frame
    8. JavaEE 7
      UIViewRoot.processDecodes
      1. javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
      1 frame
    9. JSF
      LifecycleImpl.execute
      1. com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
      2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      3 frames
    10. MyFaces CDI JSF
      CodiLifecycleWrapper.execute
      1. org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:95)
      1 frame
    11. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      1 frame
    12. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      10 frames
    13. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      3 frames
    14. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      3. java.lang.Thread.run(Unknown Source)
      3 frames