View Full Version : Viewport searched in app.view instead of Ext.container

20 Feb 2013, 7:07 AM
Hi all
I've got an application working well in local, but when put on the server, I reach this error on Firefox:

Error: [Ext.Loader] Failed loading 'app/view/Viewport.js', please verify that the file exists

On Chrome it is :

GET http://mydomain:myport/poc/app/view/Viewport.js?_dc=1361371819034 (http://fr-wst-vm-0828.groupinfra.com:14080/FrontStatsCedric/app/view/Viewport.js?_dc=1361371819034) 404 (Introuvable)

Some people who face this problem have to define a value for appFolder, but it's because their application folder is not "app" or is not at the root.
In my case, it is "app" and located in the same directory that "app.js" and "app.html", all of them are in the "poc" directory. On localhost it works very fine.

Any idea ?

20 Feb 2013, 8:46 AM
Does the file exist where it is trying to find it? If this is on a remote server, are you creating a build or uploading the source?

Other items that may cause this:
- dev machine is Windows and server is linux .. case sensitive dir/files
- dir/file owner/rights


20 Feb 2013, 10:28 AM
There is no file Viewport.js in my application. The loader should search it in ext-all-dev.js instead. The error occurs while trying to load my viewport, that extends Ext.container.Viewport.
So, the error concerns Viewport because it is, I guess, the first class of the framework that is loaded.

20 Feb 2013, 10:56 AM
Do you have the following in your app.js?

autoCreateViewport : true

Also .. are you uploading your code as is? not compressed? In using MVC, you should be using
ext.js (or ext-dev.js in dev) and not ext-all*.js

It would be helpful to see your app.js


21 Feb 2013, 1:02 AM
I've found the problem! There was actually a Viewport.js file in my local tomcat directory, that was'nt present anymore in my source folder. When publishing my application on tomcat, this file was not deleted.
So when putting my code on the server, this Viewport.js file was not here. That's why it didn't work.

I must have deleted by hand the Viewport.js file on my source folder, thinking that it was not used. I did't know that it was loaded automatically because of the "autoCreateViewport", that was indeed set to true.

Thank you for your help :)

21 Feb 2013, 1:30 AM
How can I pass the thread status to "Answered" now ?

21 Feb 2013, 5:45 AM
Click 'Mark Best Answered' link on right.