Closed graben closed 10 years ago
If using jandex annotation scanning trys to read testng annotations while on junit
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: WELD-SE-000015: Unable to load annotation: org.testng.annotations.BeforeClass at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258) at com.google.common.cache.LocalCache.get(LocalCache.java:3990) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878) at org.jboss.weld.environment.se.discovery.WeldSEClassFileInfo.containsAnnotation(WeldSEClassFileInfo.java:250) at org.jboss.weld.environment.se.discovery.WeldSEClassFileInfo.containsAnnotation(WeldSEClassFileInfo.java:83) at org.jboss.weld.bootstrap.FastProcessAnnotatedTypeResolver.containsRequiredAnnotation(FastProcessAnnotatedTypeResolver.java:229) at org.jboss.weld.bootstrap.FastProcessAnnotatedTypeResolver.resolveProcessAnnotatedTypeObservers(FastProcessAnnotatedTypeResolver.java:217) at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:75) at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97) at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:65) at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalStateException: WELD-SE-000015: Unable to load annotation: org.testng.annotations.BeforeClass at org.jboss.weld.environment.se.logging.WeldSELogger_$logger.unableToLoadAnnotation(WeldSELogger_$logger.java:142) at org.jboss.weld.environment.se.discovery.WeldSEClassFileServices$AnnotationClassAnnotationLoader.load(WeldSEClassFileServices.java:68) at org.jboss.weld.environment.se.discovery.WeldSEClassFileServices$AnnotationClassAnnotationLoader.load(WeldSEClassFileServices.java:50) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252) at com.google.common.cache.LocalCache.get(LocalCache.java:3990) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878) at org.jboss.weld.environment.se.discovery.WeldSEClassFileInfo.containsAnnotation(WeldSEClassFileInfo.java:250) at org.jboss.weld.environment.se.discovery.WeldSEClassFileInfo.containsAnnotation(WeldSEClassFileInfo.java:83) at org.jboss.weld.bootstrap.FastProcessAnnotatedTypeResolver.containsRequiredAnnotation(FastProcessAnnotatedTypeResolver.java:229) at org.jboss.weld.bootstrap.FastProcessAnnotatedTypeResolver.resolveProcessAnnotatedTypeObservers(FastProcessAnnotatedTypeResolver.java:217) at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:75) at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97) at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:65) at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744)
I did a dirty try on base of the latest 2.2.1 release to solve this issue: Solution weld 2.2: API Change from Bootstrap to CDI11Bootstrap Solution jandex: Splitup testng support
Hi. I don't know about Jandex. Is it used by default in Weld 2.2?
I have committed some fixes to HEAD for weld 2.2. Can I ask you to give it a go?
Weld tries to use jandex by default for anntotation scanning as it is much faster and less memory consuming. It is also mandatory if you set discovery-scanning mode to annotation.
I'll try the patched head and give you feedback.
Most the time I get this exception:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpUpgradeHandler at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class.getDeclaredMethods(Class.java:1962) at org.jglue.cdiunit.internal.WeldTestUrlDeployment.(WeldTestUrlDeployment.java:231) at org.jglue.cdiunit.internal.Weld11TestUrlDeployment. (Weld11TestUrlDeployment.java:28) at org.jglue.cdiunit.CdiRunner$1.createDeployment(CdiRunner.java:74) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:128) at org.jglue.cdiunit.CdiRunner.createTest(CdiRunner.java:94) at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241) at org.jglue.cdiunit.CdiRunner.methodBlock(CdiRunner.java:122) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
But there still some more exception I do not find the root cause yet.
Reduced errors by exluding sub libs
<dependency>
<groupId>org.jglue.cdi-unit</groupId>
<artifactId>cdi-unit</artifactId>
<version>${cdi-unit.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>weld-se</artifactId>
<groupId>org.jboss.weld.se</groupId>
</exclusion>
<exclusion>
<groupId>com.mockrunner</groupId>
<artifactId>mockrunner-servlet</artifactId>
</exclusion>
</exclusions>
</dependency>
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type WeldListener with qualifiers @Default at injection point [BackedAnnotatedField] @Inject @ApplicationScoped private org.jglue.cdiunit.ContextController.listener at org.jglue.cdiunit.ContextController.listener(ContextController.java:0) at org.jboss.weld.logging.ValidatorLogger_$logger.injectionPointHasUnsatisfiedDependencies(ValidatorLogger_$logger.java:221) at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:370) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744)
java.lang.NoClassDefFoundError: com/mockrunner/mock/web/MockServletInputStream at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2570) at java.lang.Class.getDeclaredFields(Class.java:1903) at org.jglue.cdiunit.internal.WeldTestUrlDeployment.(WeldTestUrlDeployment.java:221) at org.jglue.cdiunit.internal.Weld11TestUrlDeployment. (Weld11TestUrlDeployment.java:28) at org.jglue.cdiunit.CdiRunner$1.createDeployment(CdiRunner.java:74) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:128) at org.jglue.cdiunit.CdiRunner.createTest(CdiRunner.java:94) at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241) at org.jglue.cdiunit.CdiRunner.methodBlock(CdiRunner.java:122) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
You'll need to leave mockrunner as a dependency.
Also I'm guessing that you are using servlet 3.0 rather than 3.1.
The root issue here is that weld 2.2 adds a dependency on Servlet 3, so I upgraded CDI unit to 3.1, but this won't work for clients using older servlet specs as new methods are added with types that are not present in older versions.. I'm going to have to split MockServletRequest in to several different versions that support the various different servlet versions.
Hmm. Can I ask you to try HEAD now? Also please remove any exclusions you have for sub libs.
Well, I still don't get why you upgrade to servlet 3.1 rather than stay on 3.0? The mockrunner causes issues with xerces vs. internal jdk xerces for me:
Apr 06, 2014 7:07:26 PM com.sun.xml.internal.bind.v2.util.XmlFactory createParserFactory SCHWERWIEGEND: null org.xml.sax.SAXNotRecognizedException: http://javax.xml.XMLConstants/feature/secure-processing at org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source) at com.sun.xml.internal.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:114) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:139) at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276) at org.hibernate.validator.internal.xml.ValidationXmlParser.unmarshal(ValidationXmlParser.java:118) at org.hibernate.validator.internal.xml.ValidationXmlParser.parseValidationXml(ValidationXmlParser.java:78) at org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration(ConfigurationImpl.java:287) at org.hibernate.validator.internal.cdi.ValidationExtension. (ValidationExtension.java:121) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at org.jboss.weld.util.ServiceLoader.prepareInstance(ServiceLoader.java:240) at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:214) at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:182) at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:153) at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:297) at org.jboss.weld.bootstrap.ExtensionBeanDeployer.addExtensions(ExtensionBeanDeployer.java:109) at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:331) at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:134) at de.graf.asset.core.console.ConsoleTest.testStartAnsichtDepot(ConsoleTest.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:134) at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:73) at mockit.integration.junit4.internal.MockFrameworkMethod.invokeExplosively(MockFrameworkMethod.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at mockit.internal.util.MethodReflection.invokeWithCheckedThrows(MethodReflection.java:106) at mockit.internal.mockups.MockMethodBridge.callMock(MockMethodBridge.java:85) at mockit.internal.mockups.MockMethodBridge.invoke(MockMethodBridge.java:44) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
There are much exceptions following that might be false friends.
After exluding xerces from cdi-unit sax exception disappeared but two are still remaining:
org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void xxx.before() xxx@4276bd6 at com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.getEnumConstants(ReflectionNavigator.java:533) at com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator.getEnumConstants(ReflectionNavigator.java:47) at com.sun.xml.internal.bind.v2.model.impl.EnumLeafInfoImpl.calcConstants(EnumLeafInfoImpl.java:132) at com.sun.xml.internal.bind.v2.model.impl.EnumLeafInfoImpl.getConstants(EnumLeafInfoImpl.java:196) at com.sun.xml.internal.bind.v2.model.impl.EnumLeafInfoImpl.link(EnumLeafInfoImpl.java:203) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.link(ModelBuilder.java:442) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.link(RuntimeModelBuilder.java:118) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:451) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:285) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl. (JAXBContextImpl.java:124) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1143) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:147) at java.lang.reflect.Method.invoke(Method.java:483) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:247) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234) at javax.xml.bind.ContextFinder.find(ContextFinder.java:462) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type WeldListener with qualifiers @Default at injection point [BackedAnnotatedField] @Inject @ApplicationScoped private org.jglue.cdiunit.ContextController.listener at org.jglue.cdiunit.ContextController.listener(ContextController.java:0) at org.jboss.weld.logging.ValidatorLogger_$logger.injectionPointHasUnsatisfiedDependencies(ValidatorLogger_$logger.java:221) at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:370) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744)
I've dropped the Servlet version to 3.0
Also I have pulled in the specific classes from mockrunner that are needed, so it is no longer a dependency.
Please can you try HEAD again?
Still the same exceptions. I do not find the root cause for jaxb failing in some circumstances after updating to cdi-unit head. 2.2.1 with dirty fix works fine. :(
Hello, can you please post the current exception you are getting? I don't really understand how CDI unit could be causing the JAXB issues as there are now no additional dependencies added. Also if possible could you send me your effective pom? You can send direct to my email address: bryncooke@gmail.com
I have added a jandex test case and as far as I can tell the latest version of CDI-Unit is working (3.0.1). Please can you confirm that this is still an issue?
Well, it might work but I still have the problem with TestNG missing when running non cdi-unit tests.
Opened new issue for this as it is not directly related to weld 2.2/jandex. https://github.com/BrynCooke/cdi-unit/issues/55
There seem to be several issues with Weld 2.2 itself and Jandex for annotation scanning.