zoukankan      html  css  js  c++  java
  • [struts]freemarker.beans: Key "location" was not found on instance of java.lang.NullPointerException

    产生如下错误的原因可能是
    1) service 中没有set方法(不能有get方法)
    2) hql有错误

    3) Serivce class有问题

    Mon Dec 10 09:30:24 2012 GMT  1577-0@:0 [DEBUG] (http-8443-1) freemarker.cache: "org/apache/struts2/dispatcher/error.ftl"["en_US",UTF-8,parsed] using cached since jar:file:/-swit1na.2914861.65878039.211061463/lib/struts2-core-2.3.1.2.jar!/org/apache/struts2/dispatcher/error.ftl didn't change.
    Mon Dec 10 09:30:24 2012 GMT  1577-0@:0 [DEBUG] (http-8443-1) freemarker.beans: Key "location" was not found on instance of java.lang.NullPointerException. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), localizedMessage=java.beans.PropertyDescriptor@202b7127, cause=java.beans.PropertyDescriptor@3119c114, getMessage=public java.lang.String java.lang.Throwable.getMessage(), getCause=public java.lang.Throwable java.lang.Throwable.getCause(), equals=public boolean java.lang.Object.equals(java.lang.Object), hashCode=public native int java.lang.Object.hashCode(), class=java.beans.PropertyDescriptor@b3f08512, fillInStackTrace=public synchronized native java.lang.Throwable java.lang.Throwable.fillInStackTrace(), stackTrace=java.beans.PropertyDescriptor@c3bf726d, message=java.beans.PropertyDescriptor@87411220, getStackTrace=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace(), setStackTrace=public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]), java.lang.Object@6762687={public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])=[Ljava.lang.Class;@6f189138, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@35e62c83, public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()=[Ljava.lang.Class;@1a74681a, public java.lang.Throwable java.lang.Throwable.getCause()=[Ljava.lang.Class;@505e9087, public java.lang.String java.lang.Throwable.getMessage()=[Ljava.lang.Class;@7062b849, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@6130fa43, public java.lang.String java.lang.Throwable.getLocalizedMessage()=[Ljava.lang.Class;@567e768e, public synchronized native java.lang.Throwable java.lang.Throwable.fillInStackTrace()=[Ljava.lang.Class;@89990ff, public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)=[Ljava.lang.Class;@19fe59c2, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@9b6dce3, public java.lang.String java.lang.Throwable.toString()=[Ljava.lang.Class;@445fc010}, toString=public java.lang.String java.lang.Throwable.toString(), java.lang.Object@528786e7=freemarker.ext.beans.MethodMap@6a3a7d81, initCause=public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable), printStackTrace=freemarker.ext.beans.MethodMap@2605d6a3, getLocalizedMessage=public java.lang.String java.lang.Throwable.getLocalizedMessage()}

    调试方法:

    安装firebug -> enable -> script/html debug + console 查看信息

  • 相关阅读:
    博弈论(SG函数):HNOI 2007 分裂游戏
    博弈论(二分图匹配):NOI 2011 兔兔与蛋蛋游戏
    博弈论(男人八题):POJ 1740 A New Stone Game
    动态规划(树形DP):HDU 5834 Magic boy Bi Luo with his excited tree
    杂项(最小表示法):HZOI 2015 Glass Beads
    如何避免死锁
    死锁的四个必要条件
    线程安全和可重入函数之间的区别和联系
    信号量 sem_undo设置
    linux管道的容量和内部组织方式
  • 原文地址:https://www.cnblogs.com/lizmy/p/2812431.html
Copyright © 2011-2022 走看看