Weld
  1. Weld
  2. WELD-1397

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

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Won't Fix Won't Fix
    • Affects Version/s: 2.0.0.CR1
    • Fix Version/s: None
    • Component/s: GlassFish Integration
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      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)

        Activity

        Hide
        Tang Yong
        added a comment -

        Jozef,

        I have a general and simple test sample(TestCDIInterterceptorInEar-ejb), the same issue happened.

        Could you please confirm it?

        Thanks
        --Tang

        Show
        Tang Yong
        added a comment - Jozef, I have a general and simple test sample(TestCDIInterterceptorInEar-ejb), the same issue happened. Could you please confirm it? Thanks --Tang
        Hide
        Reza Rahman
        added a comment -

        Disabling EclipseLink weaving got around the deployment problem, but I don't think this is a long term solution given GlassFish/EclipseLink defaults and the relative commonality of the JPA modeling use case.

        Show
        Reza Rahman
        added a comment - Disabling EclipseLink weaving got around the deployment problem, but I don't think this is a long term solution given GlassFish/EclipseLink defaults and the relative commonality of the JPA modeling use case.
        Hide
        Joseph Snyder
        added a comment -

        This is considered a stop-ship item for Java EE 7 release.

        Anyone who subclasses @Embeddable will run into the issue as GF ships with Weaving turned on by default for Eclipselink

        Show
        Joseph Snyder
        added a comment - This is considered a stop-ship item for Java EE 7 release. Anyone who subclasses @Embeddable will run into the issue as GF ships with Weaving turned on by default for Eclipselink
        Hide
        Jozef Hartinger
        added a comment -

        This looks like a bug in Eclipselink, not Weld.

        Show
        Jozef Hartinger
        added a comment - This looks like a bug in Eclipselink, not Weld.
        Hide
        Joseph Snyder
        added a comment -

        The bug in GF that caused this has been fixed. See http://java.net/jira/browse/GLASSFISH-20209

        Show
        Joseph Snyder
        added a comment - The bug in GF that caused this has been fixed. See http://java.net/jira/browse/GLASSFISH-20209

          People

          • Assignee:
            Jozef Hartinger
            Reporter:
            Joseph Snyder
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: