Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1397

java.lang.ArrayIndexOutOfBoundsException: 1 at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverFromClass(HierarchyDiscovery.java:99)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • None
    • 2.0.0.CR1
    • GlassFish Integration
    • None

      Deploy the attached war. The below exception trace occurs. HierarchyDiscovery.discoverFromClass does the following:
      Type[] genericInterfaces = clazz.getGenericInterfaces();
      Class<?>[] interfaces = clazz.getInterfaces();
      for (int i = 0; i < interfaces.length; i++)

      { discoverTypes(processAndResolveType(genericInterfaces[i], interfaces[i])); }

      getGenericInterfaces and getInterfaces do not always return the same number of interfaces and in this case causes the exception below

      java.lang.ArrayIndexOutOfBoundsException: 1
      at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverFromClass(HierarchyDiscovery.java:99)
      at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverTypes(HierarchyDiscovery.java:70)
      at org.jboss.weld.util.reflection.HierarchyDiscovery.<init>(HierarchyDiscovery.java:51)
      at org.jboss.weld.util.reflection.HierarchyDiscovery.<init>(HierarchyDiscovery.java:44)
      at org.jboss.weld.annotated.enhanced.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:54)
      at org.jboss.weld.annotated.enhanced.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:33)
      at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
      at org.jboss.weld.annotated.slim.backed.BackedAnnotated.getTypeClosure(BackedAnnotated.java:27)
      at org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated.getTypeClosure(AbstractEnhancedAnnotated.java:202)
      at org.jboss.weld.util.Beans.getTypes(Beans.java:446)
      at org.jboss.weld.bean.attributes.BeanAttributesFactory$BeanAttributesBuilder.<init>(BeanAttributesFactory.java:107)
      at org.jboss.weld.bean.attributes.BeanAttributesFactory$BeanAttributesBuilder.<init>(BeanAttributesFactory.java:89)
      at org.jboss.weld.bean.attributes.BeanAttributesFactory.forBean(BeanAttributesFactory.java:66)
      at org.jboss.weld.bootstrap.AbstractBeanDeployer.createManagedBean(AbstractBeanDeployer.java:268)
      at org.jboss.weld.bootstrap.BeanDeployer.createClassBean(BeanDeployer.java:238)
      at org.jboss.weld.bootstrap.BeanDeployer.createClassBeans(BeanDeployer.java:202)
      at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:265)
      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:495)
      at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:212)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:595)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:482)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:410)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:401)
      at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
      at java.util.TimerThread.mainLoop(Unknown Source)
      at java.util.TimerThread.run(Unknown Source)

              rhn-engineering-jharting Jozef Hartinger
              jjsnyder Joseph Snyder (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: