Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging JAR files in ColdFusion WEB-INF lib
    primarykey
    data
    text
    <p><strong>Context</strong><br/></p> <p>I'm working on a project where we use <a href="http://jung.sourceforge.net" rel="nofollow">JUNG libraries</a>. My custom java code and the Jung libraries are all placed under the wwwroot/WEB-INF/lib. </p> <p>Note that, Certain classes of JUNG depend on Apache commons-collections.jar which is also present in the same folder (given by default by CF).</p> <p><strong>Problem</strong><br/></p> <p>We are in plan to move from CF7 to CF10, so, I'm doing a pilot testing on all the code in the project and found that certain code (that uses the JUNG) are failing with a 'class not found' exception.</p> <p>On debug and checking the methods in the <em>commons-collections-2.1.jar</em> given in CF 10, I found that its different from the one present in CF 7. If I update the JAR to the latest commons-collections-3.2.1 version, the code works fine as it found all those classes needed.</p> <p>I can change my code base to suit the default <em>commons-collections-2.1.jar</em>, but that would result in atleast 2-3 months of dev-test cycle. I want to take it as last option and better avoid it if at all possible.</p> <p>Now, my questions are - </p> <ol> <li>What would be the problem if I change(update) the 2.1 with 3.2.1?</li> <li>What could be the parts of core CF that uses this JAR ?</li> <li>Why does CF uses this outdated 2.1 (i feel so) JAR version ?</li> </ol> <p><strong>Home work I did</strong><br/></p> <ul> <li><p><strong>Testing</strong> : For not effecting the rest of applications, I have created a separate instance, changed the JAR to the latest 3.2.1, hosted my application on it and done some testing. Everything seems fine as I have not encountered any problems. But, I worry that there may be areas in CF that depends on this JAR and might break.</p></li> <li><p><strong>cfusion\lib</strong> : I have found that the commons-collections-3.2.1 already exists in the main lib (cfusion\lib) folder. So, may be, changing the JAR in the WEB-INF/lib does not make any difference.</p></li> <li><p><strong>cfusion\wwwroot\WEB-INF\lib</strong> : I have read that any JAR files placed in this folder are used for the applications only and not by the CF itself. I may be wrong or completely misunderstood the meaning. Correct Me!</p></li> </ul> <p>Answers to this Q would help to my understanding of CF more as well as solve the problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThis seems odd. I am still running ColdFusion 9 and checked my settings for the commons-collections jar. It is using `commons-collections-3.2.1.jar` from the `/cfusion/lib/` folder. I cannot imagine that Adobe reverted back for ColdFusion 10. You say that you found the `commons-collections-3.2.1.jar` file in your `/cfusion/lib/` folder as well. If your server is not using that one then where is it pulling the `commons-collections-2.1.jar` file from? _Could someone verify which jar file is being used on your ColdFusion 10 installation?_
      singulars
    2. COcommons-collections-3.2.1.jar is being used in my CF10 (update 7) install as well (Mac OS 10.8.2).
      singulars
    3. CO*commons-collections-2.1.jar given in CF 10, I found that its different from the one present in CF 7* Different how? Because they both claim to be version 2.1. *class not found' exception* Can you edit your post to include the full stack trace? *What could be the parts of core CF that uses this JAR ?* Unfortunately it is hard to say. From the [project description](http://commons.apache.org/proper/commons-collections/) it is very general library involving Collections (think structures). So it and could be used anywhere. The main difference is 2.x supports older jvm's and 3.x requires jvm 1.5+
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload