java.lang.NullPointerException

ZK-Tracker | dennis | 5 years ago
  1. 0

    If I remove the errorMessage binding, or add a load binding on value, then this error is not showing. {code:xml} <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.Bx2')" validationMessages="@id('vmsgs')"> <vlayout> <hlayout> <label value="@bind(vm.name)" /> </hlayout> <hlayout> Name : <textbox value="@save(vm.name) @validator(vm.validator1)" errorMessage="@load(vmsgs[self])" /> </hlayout> </vlayout> </window> {code} {code:java} public class Bx2 { String name; public Bx2() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public Validator getValidator1(){ return new AbstractValidator() { @Override public void validate(ValidationContext ctx) { String name = (String)ctx.getProperties("name")[0].getValue(); if(!"Lin".equals(name)){ addInvalidMessage(ctx, "the name have to equals to Lin, but is "+name); } } }; } } {code} {code:none} >>java.lang.NullPointerException >> at org.zkoss.bind.tracker.impl.TrackerImpl.addBeanMap(TrackerImpl.java:221) >> at org.zkoss.bind.tracker.impl.TrackerImpl.tieValue(TrackerImpl.java:192) >> at org.zkoss.bind.xel.zel.BindELResolver.tieValue(BindELResolver.java:131) >> at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:68) >> at org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:75) >> at org.zkoss.zel.impl.parser.AstValue.getTarget(AstValue.java:95) >> at org.zkoss.zel.impl.parser.AstValue.getValueReference(AstValue.java:326) >> at org.zkoss.zel.impl.ValueExpressionImpl.getValueReference(ValueExpressionImpl.java:279) >> at org.zkoss.xel.zel.ELXelExpression.getValueReference(ELXelExpression.java:62) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.getValueReference(BindEvaluatorXImpl.java:80) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.getValueReference(SavePropertyBindingImpl.java:129) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:141) >> at org.zkoss.bind.impl.PropertyBindingHandler.doValidateSaveEvent(PropertyBindingHandler.java:220) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:198) >> at org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1398) >> at org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1392) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1139) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 5 years ago | dennis
    java.lang.NullPointerException
  2. 0

    If I remove the errorMessage binding, or add a load binding on value, then this error is not showing. {code:xml} <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.Bx2')" validationMessages="@id('vmsgs')"> <vlayout> <hlayout> <label value="@bind(vm.name)" /> </hlayout> <hlayout> Name : <textbox value="@save(vm.name) @validator(vm.validator1)" errorMessage="@load(vmsgs[self])" /> </hlayout> </vlayout> </window> {code} {code:java} public class Bx2 { String name; public Bx2() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public Validator getValidator1(){ return new AbstractValidator() { @Override public void validate(ValidationContext ctx) { String name = (String)ctx.getProperties("name")[0].getValue(); if(!"Lin".equals(name)){ addInvalidMessage(ctx, "the name have to equals to Lin, but is "+name); } } }; } } {code} {code:none} >>java.lang.NullPointerException >> at org.zkoss.bind.tracker.impl.TrackerImpl.addBeanMap(TrackerImpl.java:221) >> at org.zkoss.bind.tracker.impl.TrackerImpl.tieValue(TrackerImpl.java:192) >> at org.zkoss.bind.xel.zel.BindELResolver.tieValue(BindELResolver.java:131) >> at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:68) >> at org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:75) >> at org.zkoss.zel.impl.parser.AstValue.getTarget(AstValue.java:95) >> at org.zkoss.zel.impl.parser.AstValue.getValueReference(AstValue.java:326) >> at org.zkoss.zel.impl.ValueExpressionImpl.getValueReference(ValueExpressionImpl.java:279) >> at org.zkoss.xel.zel.ELXelExpression.getValueReference(ELXelExpression.java:62) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.getValueReference(BindEvaluatorXImpl.java:80) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.getValueReference(SavePropertyBindingImpl.java:129) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:141) >> at org.zkoss.bind.impl.PropertyBindingHandler.doValidateSaveEvent(PropertyBindingHandler.java:220) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:198) >> at org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1398) >> at org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1392) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1139) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 5 years ago | dennis
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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 org.zkoss.bind.tracker.impl.TrackerImpl.addBeanMap()
    2. ZK Bind
      BindELResolver.getValue
      1. org.zkoss.bind.tracker.impl.TrackerImpl.addBeanMap(TrackerImpl.java:221)
      2. org.zkoss.bind.tracker.impl.TrackerImpl.tieValue(TrackerImpl.java:192)
      3. org.zkoss.bind.xel.zel.BindELResolver.tieValue(BindELResolver.java:131)
      4. org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:68)
      4 frames
    3. The ZK EL Library
      ValueExpressionImpl.getValueReference
      1. org.zkoss.zel.impl.parser.AstIdentifier.getValue(AstIdentifier.java:75)
      2. org.zkoss.zel.impl.parser.AstValue.getTarget(AstValue.java:95)
      3. org.zkoss.zel.impl.parser.AstValue.getValueReference(AstValue.java:326)
      4. org.zkoss.zel.impl.ValueExpressionImpl.getValueReference(ValueExpressionImpl.java:279)
      4 frames
    4. The ZKoss Common Library
      ELXelExpression.getValueReference
      1. org.zkoss.xel.zel.ELXelExpression.getValueReference(ELXelExpression.java:62)
      1 frame
    5. ZK Bind
      BinderImpl$CommandEventListener.onEvent
      1. org.zkoss.bind.impl.BindEvaluatorXImpl.getValueReference(BindEvaluatorXImpl.java:80)
      2. org.zkoss.bind.impl.SavePropertyBindingImpl.getValueReference(SavePropertyBindingImpl.java:129)
      3. org.zkoss.bind.impl.SavePropertyBindingImpl.getValidate(SavePropertyBindingImpl.java:141)
      4. org.zkoss.bind.impl.PropertyBindingHandler.doValidateSaveEvent(PropertyBindingHandler.java:220)
      5. org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:198)
      6. org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1398)
      7. org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1392)
      8. org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1139)
      8 frames
    6. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2741)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2712)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2653)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1699)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1484)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464)
      10 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    8. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      8. org.mortbay.jetty.Server.handle(Server.java:326)
      9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      10. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      14 frames
    9. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame