struts2 ognl java.lang.NoSuchMethodException Ljava.lang.String
来源:互联网 发布:相对湿度算法 编辑:程序博客网 时间:2024/05/02 20:35
在做项目应用中用,映射后台的一个Long类型的字段。。当这个字段输入过长的时候,死都报异常
ognl.MethodFailedException: Method "setScoreTo" failed for object com.admin.dto.pojo.AppraiserLV@93466f [java.lang.NoSuchMethodException: com.admin.dto.pojo.AppraiserLV.setScoreTo([Ljava.lang.String;)]
struts找不到Appraiser中的setScoreTo(String)方法。
原因应该是,当Long字段输入过长时候,struts把Long转换了String,。所以就找不到这个方法了。
Long的最大长度只有19位。。
java中一些基本类型的长度和最大最小值
基本类型:byte 二进制位数:8
包装类:java.lang.Byte
最小值:Byte.MIN_VALUE=-128
最大值:Byte.MAX_VALUE=127
基本类型:short 二进制位数:16
包装类:java.lang.Short
最小值:Short.MIN_VALUE=-32768
最大值:Short.MAX_VALUE=32767
基本类型:int 二进制位数:32
包装类:java.lang.Integer
最小值:Integer.MIN_VALUE=-2147483648
最大值:Integer.MAX_VALUE=2147483647
基本类型:long 二进制位数:64
包装类:java.lang.Long
最小值:Long.MIN_VALUE=-9223372036854775808
最大值:Long.MAX_VALUE=9223372036854775807
基本类型:float 二进制位数:32
包装类:java.lang.Float
最小值:Float.MIN_VALUE=1.4E-45
最大值:Float.MAX_VALUE=3.4028235E38
基本类型:double 二进制位数:64
包装类:java.lang.Double
最小值:Double.MIN_VALUE=4.9E-324
最大值:Double.MAX_VALUE=1.7976931348623157E308
基本类型:char 二进制位数:16
包装类:java.lang.Character
最小值:Character.MIN_VALUE=0
最大值:Character.MAX_VALUE=65535
- struts2 ognl java.lang.NoSuchMethodException Ljava.lang.String
- Exception in thread "main" java.lang.NoSuchMethodException: xxx.main([Ljava.lang.String;)
- struts2:java.lang.NoSuchMethodException异常
- struts2 java.lang.NoSuchMethodException异常
- Java.lang.String & [Ljava.lang.String
- java.lang.ClassNotFoundException: [Ljava.lang.String解决办法
- java.lang.ClassNotFoundException: [Ljava.lang.String解决办法
- java.lang.AbstractMethodError: ... Ljava/lang/String
- struts2 ognl.OgnlException: target is null for setProperty(null, "pageNO", [Ljava.lang.String;@c3bb57)
- 使用Struts2获取请求参数:Ljava.lang.String; cannot be cast to java.lang.String
- struts2的java.lang.NoSuchMethodException异常处理
- struts2的java.lang.NoSuchMethodException异常处理
- struts2的java.lang.NoSuchMethodException异常处理
- struts2的java.lang.NoSuchMethodException异常处理 \
- struts2的java.lang.NoSuchMethodException异常处理
- struts2的java.lang.NoSuchMethodException异常处理
- struts2错误java.lang.NoSuchMethodException: action.*.create()
- struts2的java.lang.NoSuchMethodException异常处理
- 设置光标位置
- jedisPool.getResource()方法长时间无响应并且不报错
- 转:Java中用HttpsURLConnection访问Https链接的问题
- 字符编码
- java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/Strin
- struts2 ognl java.lang.NoSuchMethodException Ljava.lang.String
- WSServletContextListener jax-ws 源码分析
- happens befor 原则?
- org.xml.sax.SAXParseException: Content is not allowed in trailing section
- Exception in thread "main" java.lang.LinkageError错误的解决
- Android WebView开发问题及优化汇总
- com.bea.xml.XmlException: failed to load java type corresponding to e=web-app@ht
- java file 海量文件处理
- java 线程池详解