View Full Version : Renamed class not found on application startup
27 Feb 2012, 2:48 PM
I updated to 298 this morning and deployed my site and it failed trying to find app/store/patientorderstore.js. Checking the disk there was a PatientOrderStore.js in the right place.
Testing from the browser I could not open all-lowercase filename but I could load the mixed-case name (PatientOrderStore.js). I suspect that I had originally made the class name all lowercase because when I looked in designer.js and in the Application file within metadata it was defined with all lowercase.
I closed the designer and updated the Application file within the metadata directory and redeployed and everything started working again.
27 Feb 2012, 10:50 PM
Not sure if there is a bug or just a note?
28 Feb 2012, 8:09 AM
If you can repro its a bug. A project that was working failed and lacking understanding of the internals it took me nearly an hour to fix it.
It is likely though that the bug is in an earlier version.
I think the repro steps would be:
1. Create a store with all lowercase as the name
3. Modify name for initial caps
4. Deploy again to see if there are issues
I am using a IIS 7 server
28 Feb 2012, 7:47 PM
I guess what I had meant was I needed more data as I wasn't fully grasping your original post. 2nd post gets me a lot closer to understanding what you had wanted to do but perhaps not what you had done. Repro steps seem good but this seems to work for me.
step 3: Modify name for initial caps - assume you mean modify userClassName?
ExtJS or Touch20?
So you had updated the userClassName yet it did not update the stores property on the Application e.g. designer.js?
Or it would not let you update the userClassName at all?
Or deploy wasn't updating the files on webserver?
28 Feb 2012, 7:53 PM
Yes it was the userClassName that I changed. Note I often forget to set the storeId because that is not as readily visible.
In the end to fix the issue I went to the Application file under .metadata and modified the entry under "stores" from patientorderstore to PatientOrderStore and then re-deployed.
When I modified the userClassName the mixed-case name does not seem to have propigated to the Application file. I had changed the class name under the previous version (288?) but never had a problem until I upgraded to the latest version.
The file PatientOrderStore.js was propigated to the web server but was not found while loading the application (I never saw the initial UI). I am not sure under what circumstances the server (IIS 7) is case sensitive but for some reason I was getting file not found looking for app/store/patientorderstore.js. It was not an exception thrown by the loader but a failure of the server to find the file.
I am not able to reproduce this with the current version but I am sure that when I ran into the problem that the userClassName and the name of the Store in the Application file were not the same. It is entirely possible that I changed the storeId as well but that does not seem to effect the Application file.
29 Feb 2012, 8:14 AM
Crystal clear now. It's possible this was a bug and it's fixed now as you can't reproduce it. I can tell you this has nothing to do with IIS or the webserver per se. It's case sensitive which is correct.
The application should have been updated when you updated the userClassName.
Let's keep an eye on it.
29 Feb 2012, 9:13 AM
Just out of curiosity I tried modifying the metadata file back to all lowercase and the project deployed but failed with the following error:
Uncaught Error: The following classes are not declared even if their files have been loaded: 'PgxPortal.store.patientorderstore'. Please check the source code of their corresponding files for possible typos: 'app/store/patientorderstore.js
This is a totally pathological case and I don't think that it is exactly what I saw. It just illustrates that if there are corner cases where you can blunder into an inconsistent component definition it is very tough to figure out. It seems that there are pre-deploy consitency checks and this might be something to look for.
Thanks very much,
5 Mar 2012, 1:04 PM
Yeah editing the metadata files is not supported! ;p
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.