Is there a Spring dependency on Commons Collections?

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 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 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 [] or one of its dependencies is not present: java.lang.ClassNotFoundException:

2007-09-21 11:24:23,754 DEBUG org.springframework.util.ClassUtils - Class [] or one of its dependencies is not present: java.lang.ClassNotFoundException:

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]

20 thoughts on “Is there a Spring dependency on Commons Collections?”

  1. I can’t say for sure… but from my experience I’ve only had a need for classes in the package when using JRuby from Spring… so my guess it is a dependency JRuby requires on that part, not Spring.

    As for commons-collections, no clue. I really wouldn’t be surprised though. 😉

    Thanks, James

  2. Hi Erik

    Spring does not have a hard dependency on the commons collections classes. What you are seeing is just DEBUG level messages… if you have a look at the source code for the CollectionFactory class (which calls into the ClassUtils class), you will see that Spring attempts to use the ‘best’ Collection implementation that it can find based on the JVM version and what is available on the classpath.

    In short, you can safely ignore these DEBUG messages. Alternatively, you can raise a JIRA issue… historically Juergen has been quick to tone down Spring’s sometimes excessive logging in response to such issues being raised.

    Cheers Rick

  3. Thanks for the comment Rick… The DEBUG message was fairly clear that things were ok, but the fact that I saw the ClassNotFoundException got me worried.

    I don’t want to go as far as raising a JIRA task but maybe I’ll just post something to the Spring Forums.

    Thanks again…

  4. Hi,

    I am using spring 1.2.6 for our application, i am getting the following exception while retriving jsp page using java 1.6 “java.lang.ClassCastException: cannot be cast to java.util.HashMap”

    I am using HashMap in JSP and in java class.same cade was working fine with java 5 when we used java 6 we got ClassCastException.

    can any one help why it worked with java 5 and not working with java 6.

  5. Hi admin, i found this post on 19 spot in google’s search results. You should decrease your bounce rate in order to rank in google. This is major ranking factor nowadays. There is very handy wp plugin which can help you.

    Just search in google for: Lilas’s Bounce Plugin

  6. If you are an app developer and necessity mechanical marketing then this article is championing you. We forearm app downloads, app installs and app reviews so your app can retrieve the exposure it deserves. We have helped thousands of customers to reach more users pro their portable app. We grow your app verifiable users, and then your app choice reach the google play chart. This works in behalf of all motorized developers.

    mobile marketing case studies

  7. RE:Is there a Spring dependency on Commons Collections? – Erik’s… Hmm… НПП Валок Крановые и трамвайные колёса

  8. Buying a used or new auto can be a difficult method unless you know what you will be undertaking. By teaching yourself about vehicle store shopping before you decide to head to the car dealership, you may make points much easier on your own. The following advice will help your upcoming store shopping vacation be a little more enjoyable.

    Constantly provide a auto technician alongside when buying a whole new motor vehicle. Automobile merchants are notorious for selling lemons and you do not need to be their following victim. Provided you can not obtain a auto mechanic to consider autos with you, at the very least be sure that you have him look at your closing choice before you purchase it.

    Know your limitations. Prior to starting buying for your automobile or truck, choose how much you can manage to shell out, and stick to it. Don’t forget to incorporate fascination with your estimations. You will probably spend around twenty percent as an advance payment at the same time, so be well prepared.

    Before attending a dealership, know what sort of vehicle you desire. Research each one of you possibilities ahead of store shopping so you can determine what works the best for your financial allowance and family requirements. Shop around to determine just how much you ought to be paying for a possible automobile.

    Before signing any agreement take the time to go through every single range, such as the small print. If you have anything listed that you just do not recognize, do not indication till you purchase an respond to that you simply understand. Unsavory salesmen are able to use a contract to place several fees which were not talked about.

    If you maintain the preceding advice in your mind the very next time that you simply go buying a automobile, you will end up more likely to get a good offer. Buying a vehicle lacks to become a head ache. Simply use the guidelines from this article and you could receive the vehicle you want in a good value.

  9. позы для фотографирования пар фотосессии беременных с мужем . новогодняя фотосессия в студии идеи профессиональные фото беременных фото для беременных фотосессия беременность фото беременных пар новогодняя фотосессия влюбленных . фотографа на крестины недорого в москве фотосессия беременных с мужем и ребенком фотосессия для беременных москва фотосессия в студии недорого москва. новогодняя фотосессия для беременных семейная съемка в студии идеи фото для беременных идеи фотосессии для беременных .

  10. зимняя фотосессия в студии фотосессия беременных семейная фотосессия с малышом фотосессия для беременных в Москве цены. фотосессии девушек беременная png фотостудия счастье москва фотограф новорожденных москва . беременность фотосессия идеи идеи фото беременных . фотосессия малышей до года фотосессия беременность идеи фотосессии для беременных стильная фотосессия на улице фотографии беременных с мужем идея для фотосессии беременной

Leave a Reply

Your email address will not be published. Required fields are marked *