tracker issue : CF-3776450

select a category, or use search below
(searches all categories and all time range)
Title:

reloadOnChange causes issue with classPath

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 06/16/2014

Components: Language, Java Integration

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / CF11 Update5

Priority/Frequency: Minor / Some users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Listed in the version 11.0.05.293506 Issues Fixed doc
Given that you are using javaSettings to load in JARs, if you use reloadOnChange=true, CF will not correctly update the classpath and load all the JARs. Credit for this find goes to Sandeep Paliwal. To correct this you will need to restart CF. (And obviously set reloadOnChange to false.)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3776450

External Customer Info:
External Company:  
External Customer Name: cfjedimaster
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

reloadOnChange is major when developing java classes.
Vote by External U.
11930 | June 16, 2014 07:23:02 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
11926 | February 20, 2015 09:25:51 AM GMT
It seems likely that the changes made for this issue are what caused bug CF-3956389. https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3956389
Comment by External U.
11927 | August 30, 2015 05:47:50 AM GMT
Hi Sandeep and Ray, For me, CF11 Update 4 (build 11,0,04,293328) correctly reloads all the JARs after I update 1 or more of them. Example steps: 1) THIS.javaSettings = {loadPaths=[expandPath("./mylib")], loadColdFusionClassPath=false, reloadOnChange=true, watchInterval=5} 2) ./mylib contains HelloWorld.jar and WorldHello.jar. HelloWorld.jar contains hello() method that returns "Hello World". WorldHello.jar contains hello() method that returns "World Hello". 3) calling both hello() methods returns the correct strings 4) I update both hello() methods to return "Hello World 2" and "World Hello 2" respectively, then recompile both and place the updated .jar files in ./mylib 5) calling both hello() methods returns the correct/updated strings From the ticket's description, I thought one of the JAR files would not get reloaded after step #4. Could I please get more details on how to reproduce the issue? Thanks!, -Aaron
Comment by External U.
11928 | November 20, 2015 03:50:42 AM GMT
Also, I noticed reloadOnChange treats newly-added .class and .jar files differently. When adding additional .class files, they are picked-up w/o restarting the server or application. When adding additional .jar files, they are not picked-up until the application or server has restarted. Is it possible for reloadOnChange to not require an application restart in the case of additional .jars? Thanks!, -Aaron
Comment by External U.
11929 | November 20, 2015 03:53:44 AM GMT