[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier Carl Harris WFLY-7025 - it's already linked - see Issue Links above... Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier I see. Your solution seems to be fine. It should be ok to return PropertyBean.class or even the extension class for such synthetic beans. Anyway, I will create a WildFly issue to fix the problem with non-unique bean deployment archive id. Thanks for report! Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris edited a comment on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier They were JDK classes. My extension (https://github.com/soulwing/pinject) does property injection into fields like String, primitives, and other types that have a simple textual representations that can be put in a properties file. {{Bean.getBeanClass}} was returning the target type of the injection point. Now it returns the class of the POJO that holds the derived property value; {{Bean.getTypes}} returns the targeted type , anyway .Looking at https://github.com/wildfly/wildfly/blob/a8db4da1415a1b497d73c7e3c9717906ca88896c/weld/src/main/java/org/jboss/as/weld/deployment/WeldDeployment.javait appears that integration is creating a new BDA for each individual bean class that isn’t found on a module class loader. In {{getBeanDeploymentArchive}} if it doesn't find the class on one of the module class loaders, it returns {{null}}. In {{createAndRegisterAdditionalBeanDeploymentArchive}} it falls through to line 208 where (based on comments at line 205) it looks like the intent was to ignore classes from the bootstrap class loader. If the class has no class loader, it doesn't put the BDA in the map, but it does add it to the list of BDAs -- i.e. we get a new BDA with the same ID for each class on the bootstrap class loader, and Weld doesn't like that. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier They were JDK classes. My extension (https://github.com/soulwing/pinject) does property injection into fields like String, primitives, and other types that have a simple textual representations that can be put in a properties file. Bean.getBeanClass was return the target type of the injection point. Now it returns the class of the POJO that holds the derived property value; Bean.getTypes returns the targeted type. Looking at https://github.com/wildfly/wildfly/blob/a8db4da1415a1b497d73c7e3c9717906ca88896c/weld/src/main/java/org/jboss/as/weld/deployment/WeldDeployment.java it appears that integration is creating a new BDA for each individual bean class that isn’t found on a module class loader. In getBeanDeploymentArchive if it doesn't find the class on one of the module class loaders, it returns null. In createAndRegisterAdditionalBeanDeploymentArchive it falls through to line 208 where (based on comments at line 205) it looks like the intent was to ignore classes from the bootstrap class loader. If the class has no class loader, it doesn't put the BDA in the map, but it does add it to the list of BDAs – i.e. we get a new BDA with the same ID for each class on the bootstrap class loader, and Weld doesn't like that. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris edited a comment on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier They were JDK classes. My extension (https://github.com/soulwing/pinject) does property injection into fields like String, primitives, and other types that have a simple textual representations that can be put in a properties file. {{Bean.getBeanClass}} was return returning the target type of the injection point. Now it returns the class of the POJO that holds the derived property value; {{Bean.getTypes}} returns the targeted type.Looking at https://github.com/wildfly/wildfly/blob/a8db4da1415a1b497d73c7e3c9717906ca88896c/weld/src/main/java/org/jboss/as/weld/deployment/WeldDeployment.javait appears that integration is creating a new BDA for each individual bean class that isn’t found on a module class loader. In {{getBeanDeploymentArchive}} if it doesn't find the class on one of the module class loaders, it returns {{null}}. In {{createAndRegisterAdditionalBeanDeploymentArchive}} it falls through to line 208 where (based on comments at line 205) it looks like the intent was to ignore classes from the bootstrap class loader. If the class has no class loader, it doesn't put the BDA in the map, but it does add it to the list of BDAs -- i.e. we get a new BDA with the same ID for each class on the bootstrap class loader, and Weld doesn't like that. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier Carl Harris Just out of curiosity, what was the bean class previously? Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier Thanks for the tip! I was able to change the return value of `Bean.getBeanClass` for the synthetic beans to a class provided by my extension, and since that's on a deployment/module class loader, everybody's happy. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier Hi Carl, what are the bean classes (i.e. results of Bean.getBeanClass()) for all those synthetic beans registered through AfterBeanDiscovery? Looks like they're loaded by the bootstrap class loader. So probably JDK classes? Anyway, it looks like an integration issue - BeanDeploymentArchive.getId() must be unique. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris edited a comment on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier I have an portable CDI extension that seems to be broken as a result of this change. The extension creates beans dynamically during the {{ProcessInjectionPoint}} event callbacks, and then adds all of them to the bean manager (via {{AfterBeanDiscovery.addBean}}) after bean discovery is complete.In Wildfly 10.1 (Weld 2.3) when I deploy a web application that uses this CDI extension, errors such as the following appear. Note that the number of instances of ` {{ [beanDeploymentArchiveId=bootstrapBDA.additionalClasses] ` }} in the error message corresponds directly to the number of beans produced by my extension.I'm unsure of whether my extension needs to do something different or whether Weld needs to do something different.{noformat}Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163: Non-unique bean deployment identifier detected: - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.wildfly.extension.messaging-activemq:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.jts:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=/content/demo-1.1.0-SNAPSHOT.war], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=deployment.demo-1.1.0-SNAPSHOT.war:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.resteasy.resteasy-cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=com.sun.jsf-impl:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jberet.jberet-core:main.additionalClasses]"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"demo-1.1.0-SNAPSHOT.war\".WeldStartService"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined{noformat} Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris edited a comment on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier I have an portable CDI extension that seems to be broken as a result of this change. The extension creates beans dynamically during the {{ProcessInjectionPoint}} event callbacks, and then adds all of them to the bean manager (via ` {{ AfterBeanDiscovery.addBean ` }} ) after bean discovery is complete.In Wildfly 10.1 (Weld 2.3) when I deploy a web application that uses this CDI extension, errors such as the following appear. Note that the number of instances of `[beanDeploymentArchiveId=bootstrapBDA.additionalClasses]` in the error message corresponds directly to the number of beans produced by my extension.I'm unsure of whether my extension needs to do something different or whether Weld needs to do something different.{noformat}Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163: Non-unique bean deployment identifier detected: - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.wildfly.extension.messaging-activemq:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.jts:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=/content/demo-1.1.0-SNAPSHOT.war], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=deployment.demo-1.1.0-SNAPSHOT.war:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.resteasy.resteasy-cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=com.sun.jsf-impl:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jberet.jberet-core:main.additionalClasses]"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"demo-1.1.0-SNAPSHOT.war\".WeldStartService"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined{noformat} Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris edited a comment on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier I have an portable CDI extension that seems to be broken as a result of this change. The extension creates beans dynamically during the {{ProcessInjectionPoint}} event callbacks, and then adds all of them to the bean manager (via `AfterBeanDiscovery.addBean`) after bean discovery is complete.In Wildfly 10.1 (Weld 2.3) when I deploy a web application that uses this CDI extension, errors such as the following appear. Note that the number of instances of `[beanDeploymentArchiveId=bootstrapBDA.additionalClasses]` in the error message corresponds directly to the number of beans produced by my extension.I'm unsure of whether my extension needs to do something different or whether Weld needs to do something different.{ { noformat} } Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163: Non-unique bean deployment identifier detected: - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.wildfly.extension.messaging-activemq:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.jts:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=/content/demo-1.1.0-SNAPSHOT.war], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=deployment.demo-1.1.0-SNAPSHOT.war:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jboss.resteasy.resteasy-cdi:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=com.sun.jsf-impl:main.additionalClasses], - BeanDeployment [beanDeploymentArchiveId=org.jberet.jberet-core:main.additionalClasses]"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"demo-1.1.0-SNAPSHOT.war\".WeldStartService"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined{ { noformat} } Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Carl Harris commented on WELD-2165 Re: Detect non-unique BeanDeploymentArchive/BeanManager identifier I have an portable CDI extension that seems to be broken as a result of this change. The extension creates beans dynamically during the ProcessInjectionPoint event callbacks, and then adds all of them to the bean manager (via `AfterBeanDiscovery.addBean`) after bean discovery is complete. In Wildfly 10.1 (Weld 2.3) when I deploy a web application that uses this CDI extension, errors such as the following appear. Note that the number of instances of `[beanDeploymentArchiveId=bootstrapBDA.additionalClasses]` in the error message corresponds directly to the number of beans produced by my extension. I'm unsure of whether my extension needs to do something different or whether Weld needs to do something different. noformat Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000163 : Non-unique bean deployment identifier detected: BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator.cdi:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.wildfly.extension.messaging-activemq:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.jboss.jts:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.jboss.as.jsf:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.hibernate.validator:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=/content/demo-1.1.0-SNAPSHOT.war], BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses], BeanDeployment [beanDeploymentArchiveId=deployment.demo-1.1.0-SNAPSHOT.war:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=org.jboss.resteasy.resteasy-cdi:main.additionalClasses], BeanDeployment [beanDeploymentArchiveId=bootstrapBDA.additionalClasses],
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated an issue Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Component/s: Bootstrap and Metamodel API Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated an issue Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Alhough it's the responsibility of an integrator, we should check the uniqueness and abort container initialization ( to avoid weird bugs during runtime) . Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated WELD-2165 Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Status: Pull Request Sent Resolved Resolution: Done Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated WELD-2165 Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Status: Open Pull Request Sent Git Pull Request: https://github.com/weld/core/pull/1375 Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated an issue Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Summary: Detect duplicate bean archive and non-unique BeanDeploymentArchive/ BeanManager identifiers identifier Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated an issue Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Alhough it's the responsibility of an integrator, we should check the uniqueness to avoid weird bugs. Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2165) Detect non-unique BeanDeploymentArchive/BeanManager identifier
Title: Message Title Martin Kouba updated an issue Weld / WELD-2165 Detect non-unique BeanDeploymentArchive/BeanManager identifier Change By: Martin Kouba Fix Version/s: 2.3.5.Final Fix Version/s: 3.0.0.Beta1 Add Comment This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues