[weld-issues] [JBoss JIRA] (WELD-1007) Weld SE startup fails.

Sam Corbett (JIRA) jira-events at lists.jboss.org
Mon Mar 12 08:15:55 EDT 2012


    [ https://issues.jboss.org/browse/WELD-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675929#comment-12675929 ] 

Sam Corbett commented on WELD-1007:
-----------------------------------

It appears this still doesn't handle all cases.  Loading class {{org.apache.activemq.network.DiscoveryNetworkConnector$1DiscoverNetworkBridgeListener}} throws this exception:

{code}
Exception in thread "main" com.google.common.collect.ComputationException: java.lang.ArrayIndexOutOfBoundsException: 2
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397)
	at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:163)
	at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:87)
	at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:116)
	at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
	at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70)
	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:133)
	at example.Runner.main(Runner.java:9)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
	at org.jboss.weld.introspector.jlr.WeldConstructorImpl.<init>(WeldConstructorImpl.java:107)
	at org.jboss.weld.introspector.jlr.WeldConstructorImpl.of(WeldConstructorImpl.java:66)
	at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:206)
	at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:119)
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:59)
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:50)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
	at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
{code}

When it throws this exception {{genericParameterTypes}} has length 2 and {{gi}} is 2.

The class is a non-static inner class declared in a method.  I've been unable to recreate the exception in a simple test case, but can attach a small Maven project that displays the problem when deployed to AS 7 if it would be useful.

Why not just loop over {{parameterAnnotations}} rather than {{parameterTypes}}?  The reference to the outer class is always the last argument and you can't annotate it.
                
> Weld SE startup fails.
> ----------------------
>
>                 Key: WELD-1007
>                 URL: https://issues.jboss.org/browse/WELD-1007
>             Project: Weld
>          Issue Type: Bug
>          Components: Java SE Support
>    Affects Versions: 1.1.1.Final, 1.1.2.Final, 1.1.3.Final
>         Environment: Arch Linux, Linux kernel 3.0.7
> java version "1.7.0_02-ea"
> Java(TM) SE Runtime Environment (build 1.7.0_02-ea-b11)
> Java HotSpot(TM) Server VM (build 22.0-b08, mixed mode)
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
>            Reporter: Konstantin Gribov
>            Assignee: Ales Justin
>             Fix For: 1.2.0.Beta1, 2.0.0.Alpha2
>
>         Attachments: weld-array-out-of-bounds.tar.gz, weld-se-test.tar.gz
>
>
> I use {{org.jboss.weld.environment.se.StartMain}} to bootstrap weld se environment. Project is compiled and packaged by maven. When starting assembly it fails with such stacktrace:
> {quote}
> Exception in thread "main" com.google.common.collect.ComputationException: java.lang.ArrayIndexOutOfBoundsException: 3
>         at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:218)
>         at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
>         at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
>         at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:128)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)
>         at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
>         at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
>         at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
>         at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:128)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)
>         at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
>         at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
>         at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
>         at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)
>         at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:95)
>         at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:134)
>         at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:191)
>         at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:368)
>         at org.jboss.weld.environment.se.Weld.initialize(Weld.java:92)
>         at org.jboss.weld.environment.se.StartMain.go(StartMain.java:46)
>         at org.jboss.weld.environment.se.StartMain.main(StartMain.java:59)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
>         at org.jboss.weld.introspector.jlr.WeldConstructorImpl.<init>(WeldConstructorImpl.java:113)
>         at org.jboss.weld.introspector.jlr.WeldConstructorImpl.of(WeldConstructorImpl.java:70)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:210)
>         at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)
>         at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)
>         at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
> {quote}
> When I try to run this project in IntelliJ IDEA it works fine with such exec command:
> {quote}
> /home/gross/soft/jdk1.7.0_02/bin/java -Didea.launcher.port=7537 -Didea.launcher.bin.path=/opt/idea/bin -Dfile.encoding=UTF-8 -classpath /home/gross/soft/jdk1.7.0_02/jre/lib/deploy.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/jce.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/jsse.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/rt.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/management-agent.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/javaws.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/plugin.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/resources.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/charsets.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/alt-rt.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/localedata.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/sunec.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/zipfs.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/dnsns.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/sunjce_provider.jar:/home/gross/soft/jdk1.7.0_02/jre/lib/ext/sunpkcs11.jar:/home/gross/crawler/app/target/classes:/home/gross/crawler/common/target/classes:/home/gross/.m2/repository/org/slf4j/slf4j-api/1.5.10/slf4j-api-1.5.10.jar:/home/gross/.m2/repository/org/jboss/resteasy/resteasy-jaxrs/2.2.2.GA/resteasy-jaxrs-2.2.2.GA.jar:/home/gross/.m2/repository/org/jboss/resteasy/jaxrs-api/2.2.2.GA/jaxrs-api-2.2.2.GA.jar:/home/gross/.m2/repository/org/scannotation/scannotation/1.0.3/scannotation-1.0.3.jar:/home/gross/.m2/repository/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar:/home/gross/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar:/home/gross/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/home/gross/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/home/gross/.m2/repository/commons-codec/commons-codec/1.5/commons-codec-1.5.jar:/home/gross/.m2/repository/org/apache/httpcomponents/httpclient/4.0.3/httpclient-4.0.3.jar:/home/gross/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar:/home/gross/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar:/home/gross/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar:/home/gross/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/home/gross/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.10/jcl-over-slf4j-1.5.10.jar:/home/gross/.m2/repository/org/apache/commons/commons-io/1.3.2/commons-io-1.3.2.jar:/home/gross/.m2/repository/org/apache/commons/commons-compress/1.1/commons-compress-1.1.jar:/home/gross/.m2/repository/org/apache/james/apache-mime4j-dom/0.8-SNAPSHOT/apache-mime4j-dom-0.8-SNAPSHOT.jar:/home/gross/.m2/repository/org/apache/james/apache-mime4j-core/0.8-SNAPSHOT/apache-mime4j-core-0.8-SNAPSHOT.jar:/home/gross/.m2/repository/org/jboss/weld/se/weld-se-core/1.1.2.Final/weld-se-core-1.1.2.Final.jar:/home/gross/.m2/repository/org/jboss/weld/weld-spi/1.1.Beta2/weld-spi-1.1.Beta2.jar:/home/gross/.m2/repository/org/jboss/weld/weld-api/1.1.Beta2/weld-api-1.1.Beta2.jar:/home/gross/.m2/repository/org/jboss/weld/weld-core/1.1.2.Final/weld-core-1.1.2.Final.jar:/home/gross/.m2/repository/com/google/guava/guava/r06/guava-r06.jar:/home/gross/.m2/repository/org/jboss/spec/javax/interceptor/jboss-interceptors-api_1.1_spec/1.0.0.Beta1/jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar:/home/gross/.m2/repository/org/jboss/interceptor/jboss-interceptor-spi/2.0.0.CR1/jboss-interceptor-spi-2.0.0.CR1.jar:/home/gross/.m2/repository/org/jboss/interceptor/jboss-interceptor-core/2.0.0.CR1/jboss-interceptor-core-2.0.0.CR1.jar:/home/gross/.m2/repository/org/slf4j/slf4j-ext/1.5.10/slf4j-ext-1.5.10.jar:/home/gross/.m2/repository/ch/qos/cal10n/cal10n-api/0.7.2/cal10n-api-0.7.2.jar:/home/gross/.m2/repository/javax/el/el-api/2.2/el-api-2.2.jar:/home/gross/.m2/repository/javax/enterprise/cdi-api/1.0-SP4/cdi-api-1.0-SP4.jar:/home/gross/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/gross/.m2/repository/org/jboss/resteasy/resteasy-jaxb-provider/2.2.2.GA/resteasy-jaxb-provider-2.2.2.GA.jar:/home/gross/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.4/jaxb-impl-2.2.4.jar:/home/gross/.m2/repository/javax/xml/bind/jaxb-api/2.2.3/jaxb-api-2.2.3.jar:/home/gross/.m2/repository/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar:/home/gross/.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar:/home/gross/.m2/repository/org/jboss/resteasy/resteasy-jettison-provider/2.2.2.GA/resteasy-jettison-provider-2.2.2.GA.jar:/home/gross/.m2/repository/org/codehaus/jettison/jettison/1.2/jettison-1.2.jar:/opt/idea/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.jboss.weld.environment.se.StartMain
> {quote}
> I think, it's dependencies interfere problem, but haven't yet found the solution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the weld-issues mailing list