`
sunasheng
  • 浏览: 118771 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

java.lang.ArrayIndexOutOfBoundsException: -1 报错行setSize(position[count-1]);

阅读更多

java.lang.ArrayIndexOutOfBoundsException: -1

at cn.m15.ipj.writable.MultiBytesWritable.readFields(MultiBytesWritable.java:187)
 
 
点击进入这个错误提示时:为MultiBytesWritable类的readFields方法
public void readFields(DataInput in) throws IOException 
{
	int count = in.readInt();
	position = new int[count];
	for(int i = 0; i < count; i++) {
		position[i] = in.readInt();
	}
	setSize(0); 	
    setSize(position[count-1]);//红色
    in.readFully(bytes, 0, size);
}
 
 注:红色行为报错行
 
原因:
        map方法中要写如reduce的key值不合理
解决方法:
        调整map方法中要写入reduce的key值
分享到:
评论

相关推荐

    AXMLPrinter2.jar解决ArrayIndexOutOfBoundsException问题

    AXMLPrinter2.jar解决ArrayIndexOutOfBoundsException问题,绝对有效

    java.lang.ArrayIndexOutOfBoundsException: 0 split转义字符问题

    (本人的博客愧对语文老师-&gt;又臭又长哈哈...java.lang.ArrayIndexOutOfBoundsException: 0 纳尼??? 好吧我把问题用一段简单的代码展示出来(只为复现问题) 我直接取System.out.println(strings[0]);代码片 原创文章

    AXMLPrinter2修改版 解决java.lang.ArrayIndexOutOfBoundsException 加批处理bat

    1、将xml文件放入layout中,点击start.bat即可编译成相应的txt文件。 2、亲测绝对好用。

    cdh-hive2.1.1版本orc格式表读取包数组越界替换包

    Caused by: java.lang.ArrayIndexOutOfBoundsException: 7 at org.apache.orc.OrcFile$WriterVersion.from(OrcFile.java:145) at org.apache.orc.impl.OrcTail.getWriterVersion(OrcTail.java:74) at org.apache....

    GIF图 java.lang.ArrayIndexOutOfBoundsException

    GIF图 java.lang.ArrayIndexOutOfBoundsException . 网上有一个是jdk1.7适用的。这个是改成1.6之后的。

    java 数组下标越界异常(ArrayIndexOutOfBoundsException)

    java 数组下标越界异常(ArrayIndexOutOfBoundsException) java 数组下标越界异常(ArrayIndexOutOfBoundsException)

    AXMLPrinter2.jar

    解决AXMLPrinter2反编译的时。 java.lang.ArrayIndexOutOfBoundsException: 128 的报错问题

    APK XML解析及反编译

    java.lang.ArrayIndexOutOfBoundsException: 128 at android.content.res.StringBlock.getShort(StringBlock.java:231) at android.content.res.StringBlock.getString(StringBlock.java:91) at android.content....

    java 异常总结

    java.lang.ArrayIndexOutOfBoundsException 数组索引越界异常。当对数组的索引值为负数或大于等于数组大小时抛出。 java.lang.ArrayStoreException 数组存储异常。当向数组中存放非数组声明类型对象时抛出。 java....

    Android APK 加密 解密工具

    Android APK 加密 解密工具 使用这个工具加密后 别人打开你的APK需要输入密码

    AXMLPrinter2错误修正版本

    java.lang.ArrayIndexOutOfBoundsException: 128 at android.content.res.StringBlock.getShort(StringBlock.java:231) at android.content.res.StringBlock.getString(StringBlock.java:91) at android.content....

    AXMLPrinter2.jar 反编译XML文件

    java.lang.ArrayIndexOutOfBoundsException: 82 at android.content.res.StringBlock.getShort(StringBlock.java:231) a t android.content.res.StringBlock.getString(StringBlock.java:91) at android.content....

    AXMLPrinter

    用来查看apk中的AndroidManifest.xml文件的工具,使用方法在jar包中的readme

    AXMLPrinter2ME.S.jar

    在http://download.csdn.net/detail/rowangame/9023311的基础上,增加忽略Magic Number和判断StyleOffset大小的语句,避免因修改Magic Number导致的解析错误,以及错误的StyleOffset导致的EOF Exception。

    AXMLPrinter2

    java.lang.ArrayIndexOutOfBoundsException: 128 at android.content.res.StringBlock.getShort(StringBlock.java:231) at android.content.res.StringBlock.getString( StringBlock.java:91) at android.content...

    AXMLPrinter2反编译错误

    java.lang.ArrayIndexOutOfBoundsException: 128 at android.content.res.StringBlock.getShort(StringBlock.java:231) at android.content.res.StringBlock.getString(StringBlock.java:91) at android.content....

    AxmlPrinter2 bug fix版本

    Fix AXMLPrinter2 bug: java.lang.ArrayIndexOutOfBoundsException 使用方法:java -jar AxmlPrinter2.jar xxxx.xml &gt; xxx.xml

    AXMLPrinter2.jar(20190916).zip

    此jar包修正了 AXMLPrinter2.jar java.lang.ArrayIndexOutOfBoundsException 的错误。 支持批量反编译,用以下代码保存为.bat文件即可: (将此BAT文件和AXMLPrinter2.S.jar放在同一个目录下,将要反编译的xml都放到...

    java编程常见问题

    42.java.lang.ArrayIndexOutOfBoundsException 数组索引越界异常。当对数组的索引值为负数或大于等于数组大小时抛出。 43.java.lang.ArrayStoreException 数组存储异常。当向数组中存放非数组声明类型对象时抛出。 ...

    AXMLPrinter2修改版

    解决AXMLPrinter2反编译的时候报错 java.lang.ArrayIndexOutOfBoundsException: 128

Global site tag (gtag.js) - Google Analytics