Sunday, November 27, 2011

JDeveloper 11g R2 IDE Application Performance Caching and Compilation Failures

If you are working with latest production release of JDeveloper IDE/ADF 11g R2 (, 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.


Timo said...

this "bug" can be seen in almost all 11g versions. We had this error in, and 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.


Andrej Baranovskij said...

Hi Timo,

Versions previous to 11g R2 ( are not using caching, so it might be something else (.data is available only starting from

Yes, .data is generated only when application was opened in JDeveloper 11g R2 IDE, building from Ant command line should be fine.


Justasg said...

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.

Andrej Baranovskij said...

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.


Roberto said...

Hi Andrejus, thank u! ..problem solved. gracias.

Radamanthys17 said...

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.

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.

Alex said...

Thank you, Thank you, Thank you, I was 1 houres on this.
You are the best :D

Anonymous said...

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?

Anonymous said...

Error: Unable to copy to output directory,.. Model not found

Close your jDeveloper application
and delete folder from C:\Users\username\AppData\Roaming\JDeveloper


Rename your c:\JDeveloper folder

Ali Chauhan

Andrej Baranovskij said...

There is no need to clean full application deployment folder. Just delete .data cache folder as per blog description.


Anonymous said...

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.

Andrej Baranovskij said...

Thanks a lot for such great feedback ! This inspires me to write new interesting topics !


Unknown said...

Really Great.............Problem Solved. Thanks

Unknown said...

I don't see a .data directory on linux. Running 12.1.3. Any idea where this would be?

Andrej Baranovskij said...

You should enable hidden folders view.


Blogger said...

This post solved my problem. Using Jdev

Anonymous said...

Thank you,issue resolved.

Unknown said...

I still see it in 12.1.3

Anonymous said...

Thank you,issue resolved...