ArrayIndexOutOfBoundsException in SessionFactory, resolved after restart server only

We are receiving Arrayindexoutofboundexception at query list once in a month and this is getting solved only after server restart. The issue is occuring in production and not able to find the rootcause as the requests will be receiving everyday in huge amount but the error is occuring once in a while.
Error:
RuntimeException occurs. java.lang.ArrayIndexOutOfBoundsException: -127
at net.sf.hibernate.impl.SessionFactoryImpl.get(SessionFactoryImpl.java:255)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:288)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1572)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
Using sqljdbc41.jar, java 8 version.
Any help to find the root cause is appreciated.

1 Like

We are facing the issue once in a month in Production environment, Does anyone have idea over this?

You didn’t write the version you are using, so it’s almost impossible to help you, but from the package name in the stack trace I can only assume Hibernate ORM 3 or older. Maybe if you weren’t using a Hibernate ORM version that is 15+ years old you might find some help, but at this point, nobody knows the code of that version anymore.

1 Like

Thankyou @beikov for your response, we are using hibernate2.jar . Please let us know in case any other information is required. We are eagerly waiting for the rootcause at highest priority.

Good luck with that. I don’t think the source code is even available anywhere. You’re on your own.

1 Like

Do you think upgrading the jar to latest version that supports java 8 will solve this issue?

I guess yes, but even if it doesn’t solve your issue right away, if you seek help, you will have to upgrade to the latest version anyway.

1 Like

Thankyou so much for your response, as we are using Java 8 we would like to upgrade to 5x version that will be supporting this version

Hi Swathi/Bekinov,

We are facing similar issue in our production application. Currently we are using hibernate 3.0 and JDK8.

In one of our country we have upgraded to hibernate 4.3.8.
Please help me to understand if this issue is logged as a BUG in hibernate?
is there any specific release post which the issue was fixed?

Thanks in Advance

You have to update to the latest Hibernate ORM version if you want help from the community.