powered by Jive Software

ArrayIndexOutOfBoundsException

Hello,

An ArrayIndexOutOfBoundsException is occurred occasionally in Openfire.

I do not understand this cause.

Openfire version 3.6.0a (jre: 1.6.0_03, memory: -Xmx1024m)

Windows 2003 x86 in VMware

The following providers are used.

JDBCAuthProvider, LdapUserProvider, LdapVCardProvider, DefaultGroupProvider

client: smack library 3.0.4

openfire error.log:

2009.04.28 17:12:32 [org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHand ler.java:110)

]

java.lang.ArrayIndexOutOfBoundsException

2009.04.28 18:01:34 [org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHand ler.java:110)

]

java.lang.ArrayIndexOutOfBoundsException

2009.05.01 13:08:56 [org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHand ler.java:110)

]

java.lang.ArrayIndexOutOfBoundsException: 793

at java.lang.Long.valueOf(Unknown Source)

at org.jivesoftware.openfire.nio.ConnectionHandler.updateWrittenBytesCounter(Conne ctionHandler.java:196)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageSent(ConnectionHandler.j ava:144)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageSent(Abs tractIoFilterChain.java:579)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(Abstra ctIoFilterChain.java:320)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(Ab stractIoFilterChain.java:653)

at org.apache.mina.common.IoFilterAdapter.messageSent(IoFilterAdapter.java:85)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(Abstra ctIoFilterChain.java:320)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(Ab stractIoFilterChain.java:653)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageSent(ProtocolCodecFilte r.java:198)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageSent(Abstra ctIoFilterChain.java:320)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageSent(Ab stractIoFilterChain.java:653)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :241)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Unknown Source)

JDK Long.valueOf code:

> public static Long valueOf(long l) {
>      final int offset = 128;
>      if (l >= -128 && l <= 127) { // will cache
>          return LongCache.cache[(int)l + offset];
>      }
>         return new Long(l);
> }

Long.valueOf is thread safe.

  1. Why is not some StackTrace completely output?

  2. Why is the exception occurred.

Thanks.