If you are working with latest production release of JDeveloper IDE/ADF 11g R2 (11.1.2.1.0), you may face very strange issue related to ADF application compilation. JDeveloper may report that it can't find previously deleted files (for example ADF BC components). Why it still looks for un-existing (removed by developer) files and fails compilation process?
JDeveloper IDE 11g R2 provides application file caching feature, to speed up design time development and file load in the IDE. However, it looks like it fails to clean up file cache after files are removed from the application, still is trying to reference old files during compilation process and fails.
You will face file cache problem (this can be really frustrating), if log window reports something similar for deleted files (unable to copy to output directory):
It says - failed to find file, hey but this file was removed by me, just few minutes ago - JDeveloper, you should update your cache :)
Ah, Clean All and IDE restart will not help you this time - I did it multiple times with no luck. As you can see from the screenshot above, compiler complains about DepartmentsLovView object - this object was present before, but I removed it from the application - compilation should not fail (but it fails).
But there is always solution - open Application Properties wizard, there is IDE Performance Cache setting:
It specifies IDE cache location, application file cache is stored inside .data folder. If you go and remove .data folder - compilation completes successfully.
JDeveloper IDE 11g R2 provides application file caching feature, to speed up design time development and file load in the IDE. However, it looks like it fails to clean up file cache after files are removed from the application, still is trying to reference old files during compilation process and fails.
You will face file cache problem (this can be really frustrating), if log window reports something similar for deleted files (unable to copy to output directory):
It says - failed to find file, hey but this file was removed by me, just few minutes ago - JDeveloper, you should update your cache :)
Ah, Clean All and IDE restart will not help you this time - I did it multiple times with no luck. As you can see from the screenshot above, compiler complains about DepartmentsLovView object - this object was present before, but I removed it from the application - compilation should not fail (but it fails).
But there is always solution - open Application Properties wizard, there is IDE Performance Cache setting:
It specifies IDE cache location, application file cache is stored inside .data folder. If you go and remove .data folder - compilation completes successfully.
19 comments:
Andrejus,
this "bug" can be seen in almost all 11g versions. We had this error in 11.1.1.2.0, 11.1.1.3.0 and 11.1.1.4.0 too.
We never found a way to reproduce this behavior, so we did not file an SR on it.
Our solution is an ant task to delete the .data and the classes folders.
As we use ant tasks for building out applications this was the natural solution for us.
Timo
Hi Timo,
Versions previous to 11g R2 (11.1.1.2.0) are not using caching, so it might be something else (.data is available only starting from 11.1.1.2.0).
Yes, .data is generated only when application was opened in JDeveloper 11g R2 IDE, building from Ant command line should be fine.
Regards,
Andrejus
It seems that Jdeveloper sometimes fails to compile BC objects (i.e. VO's) because it suddenly starts to search for them in a different model project.
Sometimes it is possible to "teach" jdeveloper of a REAL project by first opening the associated EO, and then - a VO. One can check if this class was learned by looking at "General" tab in VO - it should display correct model project.
Sometimes it is necessary to restart jdeveloper. However, this may be not related to Caching at all - as Andrejus wrote, restarts did not help him. They help me, so my problems may be caused by a different bug.
Yes, I experienced something similar as you are describing as well (however its hard to reproduce with test case). Most likely this is related to something else in compilation process, sometimes it is necessary to restart JDeveloper - thats right.
Andrejus
Hi Andrejus, thank u! ..problem solved. gracias.
EspaƱol
Gracias muy buena informacion muy puntual,me dio ese error y no sabia a que se debia pero con tu post ya se soluciono gracias.
Ingles
Thank you very very good information on time, gave me this error and did not know it was due but with your post already been solved thanks.
Thank you, Thank you, Thank you, I was 1 houres on this.
You are the best :D
My problem is everything complies successfully but the "Unable to copy to output directory" errors occur when I run the application.
I repeatedly removed the .data folder and recompiled the whole app.
Any idea?
Error: Unable to copy to output directory,.. Model Bundle.properties not found
Close your jDeveloper application
and delete folder from C:\Users\username\AppData\Roaming\JDeveloper
or
Rename your c:\JDeveloper folder
Ali Chauhan
There is no need to clean full application deployment folder. Just delete .data cache folder as per blog description.
Andrejus
Andrejus, this is just one more example of your site saving the day for me. Thank you so much for sharing your insights with us. Your blog continues to be one of THE essential ADF sites on the web, as it has been for several years.
Thanks a lot for such great feedback ! This inspires me to write new interesting topics !
Andrejus
Really Great.............Problem Solved. Thanks
I don't see a .data directory on linux. Running 12.1.3. Any idea where this would be?
You should enable hidden folders view.
Andrejus
This post solved my problem. Using Jdev 12.1.3.0.0
Thank you,issue resolved.
I still see it in 12.1.3
Thank you,issue resolved...
Post a Comment