I know there isn’t a true, requirement, that projects using Spring use Commons Collections. However, when looking at various examples I’ve found some interesting output in my logfiles. Very early in my logfiles I’m seeing a ClassNotFoundException on org.apache.commons.collections.map.LinkedMap. The message is at the DEBUG level; so I guess the code is looking for a LinkedMap class, not finding it, throwing the exception, and then using something else, most likely a java.util.Collection Map.
The main reason I’m asking this question is I would like to know if there is a benefit, possibly in performance, that I can gain in using the commons-collections.jar? The same question can be asked for a possible need to include edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap which you can see is also causing a ClassNotFound exception to be thrown.
See the log output below:
2007-09-21 11:24:23,754 DEBUG org.springframework.util.ClassUtils - Class [org.apache.commons.collections.map.LinkedMap] or one of its dependencies is not present: java.lang.ClassNotFoundException: org.apache.commons.collections.map.LinkedMap
2007-09-21 11:24:23,754 DEBUG org.springframework.util.ClassUtils - Class [edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap] or one of its dependencies is not present: java.lang.ClassNotFoundException: edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap
I am seeing this behaviour with the latest production release of Spring 2.0.6, and Java 1.5.0_11 running a simple HelloWorld type example. Is anybody else seeing this? Does anybody know what the story is here? If not, I’ll make sure and find out in December when I’ll have access to the Interface21 guys while attending The Spring Experience.
[tags]spring, ClassNotFoundException, LinkedMap[/tags]