java.lang.ArrayIndexOutOfBoundsException: 10

Oracle Community | anusplus | 7 years ago
  1. 0

    IndexOutOfBoundsException in LoginContext

    Oracle Community | 7 years ago | anusplus
    java.lang.ArrayIndexOutOfBoundsException: 10
  2. 0

    java.lang.ArrayIndexOutOfBoundsException on JDBCRealms

    Oracle Community | 9 years ago | rcastellow
    java.lang.ArrayIndexOutOfBoundsException: 31[/b]
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    JAAS + NIS Authentication

    Oracle Community | 1 decade ago | 843811
    java.lang.ArrayIndexOutOfBoundsException
  5. 0

    Sometimes, mostly after app-server restarts or simple ear-redeployments we encounter a bean creation issue: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fooBar' defined in class path resource [spring/foo-context.xml]: Initialization of bean failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: 10 The project consists of around 500 beans, 20% prototypes. Only some singletons are advised, using <aop:config> - Prototypes are injecting using org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean. If the issue occurs it always affects the first request and only the first request - all following requests pass. We were unable to reproduce the issue on a small-scale project. Nevertheless, we were able to trace the issue down to AspectJ and filed a bug: http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg12764.html https://bugs.eclipse.org/bugs/show_bug.cgi?id=337855 As a workaround, we replaced AspectJ with SpringAOP, which appears to be working well. While this certainly seems to be an AspectJ issue, the stacktrace below shows, that AbstractAdvisorAutoProxyCreator is also involved. This is rather surprising for me, since, as I said, only a few singletons are advised, yet it looks like AbstractAdvisorAutoProxyCreator is called during the ObjectFactoryCreatingFactoryBean.getObject() method which creates my AOP-free prototypes. Is this really intended and necessary? Full stacktrace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fooBar' defined in class path resource [spring/foo-context.xml]: Initialization of bean failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: 10 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean$TargetBeanObjectFactory.getObject(ObjectFactoryCreatingFactoryBean.java:146) at foo.bar.baz.a.b.c.foo(C.java:99) at foo.bar.baz.service.X.Y(Z.java:161) at foo.bar.baz.servlet.K.bar(M.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3587) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) java.lang.ArrayIndexOutOfBoundsException: 10 at java.util.ArrayList.add(ArrayList.java:352) at org.aspectj.weaver.ReferenceType.addDependentType(ReferenceType.java:115) at org.aspectj.weaver.ReferenceType.<init>(ReferenceType.java:95) at org.aspectj.weaver.TypeFactory.createParameterizedType(TypeFactory.java:43) at org.aspectj.weaver.reflect.JavaLangTypeToResolvedTypeConverter.fromType(JavaLangTypeToResolvedTypeConverter.java:88) at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getSuperclass(Java15ReflectionBasedReferenceTypeDelegate.java:148) at org.aspectj.weaver.ReferenceType.getSuperclass(ReferenceType.java:906) at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:144) at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:82) at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:238) at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200) at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254) at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean$TargetBeanObjectFactory.getObject(ObjectFactoryCreatingFactoryBean.java:146) at foo.bar.baz.a.b.c.foo(C.java:99) at foo.bar.baz.service.X.Y(Z.java:161) at foo.bar.baz.servlet.K.bar(M.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3587) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    Spring JIRA | 6 years ago | Tom Ziemer
    java.lang.ArrayIndexOutOfBoundsException: 10

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      10

      at javax.security.auth.login.LoginContext.invoke()
    2. Java RT
      LoginContext.login
      1. javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
      2. javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
      3. javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
      4. java.security.AccessController.doPrivileged(Native Method)
      5. javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
      6. javax.security.auth.login.LoginContext.login(LoginContext.java:579)
      6 frames