Bug 918564 - Duplicated classes in commons-beanutils-1.8.3-redhat-2.jar, commons-collections-3.2.1-redhat-2.jar
Summary: Duplicated classes in commons-beanutils-1.8.3-redhat-2.jar, commons-collectio...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Build
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: David Walluck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1036225
TreeView+ depends on / blocked
 
Reported: 2013-03-06 14:12 UTC by Rostislav Svoboda
Modified: 2019-02-15 13:32 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-29 20:03:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 899789 0 high CLOSED CLONE - Some org.apache.commons.collections classes in both commons-beanutils-1.8.0.jar , commons-collections-3.2.1.jar 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1036225 0 unspecified CLOSED commons-collections versus commons-beanutils class mismatch (EAP) 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker WFLY-1749 0 Minor Closed Switch from commons-beanutils to commons-beanutils-core 2018-10-04 09:17:12 UTC
Red Hat Knowledge Base (Solution) 2586421 0 None None None 2016-08-29 20:02:18 UTC

Internal Links: 899789 1036225

Description Rostislav Svoboda 2013-03-06 14:12:51 UTC
./modules/system/layers/base/org/apache/commons/beanutils/main/commons-beanutils-1.8.3-redhat-2.jar
./modules/system/layers/base/org/apache/commons/collections/main/commons-collections-3.2.1-redhat-2.jar

org.apache.commons.collections.ArrayStack                                                                   
org.apache.commons.collections.Buffer                                                                       
org.apache.commons.collections.BufferUnderflowException                                                     
org.apache.commons.collections.FastHashMap                                                                  
org.apache.commons.collections.FastHashMap$1                                                                
org.apache.commons.collections.FastHashMap$CollectionView                                                   
org.apache.commons.collections.FastHashMap$CollectionView$CollectionViewIterator                            
org.apache.commons.collections.FastHashMap$EntrySet                                                         
org.apache.commons.collections.FastHashMap$KeySet                                                           
org.apache.commons.collections.FastHashMap$Values

Comment 1 Rostislav Svoboda 2013-04-03 13:53:55 UTC
Paul, can you check it or is it item for Fernando?

Comment 2 Paul Gier 2013-04-11 17:02:14 UTC
Looks like this issue also happened in 6.0 (bug 899789).  Assigning to dwalluck since he normally builds commons-beanutils.

Comment 3 David Walluck 2013-04-11 18:25:27 UTC
Commons-Collections
-------------------
BeanUtils now ships with a small number of commons collections classes.
This is a temporary measure intended to allow BeanUtils core to be used with 
either commons-collections 2 or commons-collections-3 without a dependency on either.
It is intended that soon BeanUtils core will have no dependency on any commons collection
packaged classes.

Files
-----
src/main/java/org/apache/commons/collections/Buffer.java
src/main/java/org/apache/commons/collections/ArrayStack.java
src/main/java/org/apache/commons/collections/BufferUnderflowException.java
src/main/java/org/apache/commons/collections/FastHashMap.java
src/main/java/org/apache/commons/collections/package.html

But the pom already has an optional dependency on commons-collections.

Comment 4 David Walluck 2013-04-11 21:22:48 UTC
Note that there's already a jar split between commons-beanutils-bean-collections and commons-beanutils-core.

Here's how it is upstream:

(1) commons-beanutils: commons-collections, optional
(2) commons-beanutils-bean-collections: commons-collections, optional
(3) commons-beanutils-core: commons-collections, none

Now, I think (1) and (3) are correct for us. The problem is with (2), I think commons-collections should be made non-optional. Except I don't think we ship with jar anyway.

Do we really need commons-beanutils or should we be using commons-beanutils-core? If we only need commons-beanutils-core, then I don't think we need to depend on commons-collections for this dep at all.

Comment 5 David Walluck 2013-07-24 01:22:57 UTC
I will file an issue to try to get this fixed upstream by changing from commons-beanutils to commons-beanutils-core.

Comment 6 David Walluck 2013-07-24 01:40:36 UTC
Created <https://issues.jboss.org/browse/WFLY-1749>.

Comment 8 Nikoleta Hlavickova 2013-08-28 12:55:02 UTC
State in EAP 6.1.1 ER7 is the same as Rosta wrote in Description -- the same duplicated classes. The only change is that now there is commons-beanutils-1.8.3.redhat-3.jar instead of commons-beanutils-1.8.3-redhat-2.jar.

Comment 9 David Walluck 2013-08-28 21:04:54 UTC
(In reply to Nikoleta Ziakova from comment #8)
> State in EAP 6.1.1 ER7 is the same as Rosta wrote in Description -- the same
> duplicated classes. The only change is that now there is
> commons-beanutils-1.8.3.redhat-3.jar instead of
> commons-beanutils-1.8.3-redhat-2.jar.

This is expected. The status is not expected to change until <https://issues.jboss.org/browse/WFLY-1749> is handled upstream. But, I don't believe that there's a way to depend on an external bug.

In fact, we currently do not intend to remove the classes, but to switch the dependency from commons-beanutils, which has the classes, to commons-beanutils-core, which does not have the classes. 

One reason for doing this is that we wanted to reduce the changes here between the product an upstream. I basically agree with this as  a goal, except per my comment #4, it looks as if the Maven dependency flags for the commons-collections dependency may be somewhat wrong upstream.

Comment 13 David Walluck 2015-10-05 14:53:09 UTC
I believe it was fixed in the version linked, but pgier didn't see the need to apply the fix in later builds. According to him, I don't think it is necessary, but it's probably best to ask him.

Comment 15 Brad Maxwell 2016-08-29 20:03:51 UTC
Closing won't fix.  The issue is resolved upstream.  As the common beanutils and collections modules are marked private, the user should not depend on them directly.  Put the version of the jars wanted into the custom module or in another custom module to avoid using the private jboss module and to resolve the issue.


Note You need to log in before you can comment on or make changes to this bug.