You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2016/08/02 07:01:20 UTC

[jira] [Commented] (OWB-1138) PassivationCapable bean id is not unique: PRODUCERMETHOD#class

    [ https://issues.apache.org/jira/browse/OWB-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403506#comment-15403506 ] 

Mark Struberg commented on OWB-1138:
------------------------------------

Somehow this rings a bell. 
Can you please try to compile OpenWebBeans from source and run your project with this version?
You can find information about how to check out and build OWB over here: http://openwebbeans.apache.org/source.html

To give you some info about how this might have happened:
In the original BeansDeployer code (where we evaluate the scanned classes) we did maintain a Set<Class> beanClasses; 
And if you happened to have the same class in the classpath twice, then the first one was overwritten. This frequently happens when yo debug in your IDE. In that case you might pick up the classes from the built jar (through your maven integration) but also from the original target/classes folder (through your IDE integration).

In OWB-1.6.3 we moved from a simple Set<Classes> to a Map<BeanArchive, Set<Classes>>. The reason was that we sometimes need additional information per classpath entry (beanDiscoveryMode 'scoped'). A while back I fixed this and do a duplicate-detection as part of OWB-1130. Granted, the ticket comment could have been better ;) 


> PassivationCapable bean id is not unique: PRODUCERMETHOD#class
> --------------------------------------------------------------
>
>                 Key: OWB-1138
>                 URL: https://issues.apache.org/jira/browse/OWB-1138
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.6.2, 1.6.3
>         Environment: Java 8, CDI 1.2, Deltaspike 1.7.0 servlet 3.1.0, jsf-api 2.2.13, Hibernate 5.1.0.Final running on embedded Tomcat 8, Netbeans 8.1 IDE on Windows 10.
>            Reporter: Robert F. Peake
>            Assignee: Mark Struberg
>              Labels: newbie
>             Fix For: 1.6.4
>
>
> OWB 1.6.3 throws exception in thread "main" org.apache.webbeans.exception.DuplicateDefinitionException: PassivationCapable bean id is not unique: PRODUCERMETHOD#class at
> org.apache.webbeans.container.BeanManagerImpl.addPassivationInfo(BeanManagerImpl.java:406).
> Downgrading to OWB 1.6.2 throws error reported in OWB-1101:
>     AmbiguousResolutionException: There are more than one WebBeans
>     with name : csfFLOWDISCOVERYCDIHELPER
> In both instances, error is thrown following WARNING: Ignoring class [org.apache.deltaspike.cdise.tck.control.VersionControlRule] because it could not be loaded with NoClassDefFoundErrors for org/junit/runners/model/Statement and org/junit/rules/TestRule.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)