JDeveloper: Controlling which Resources (Files) are Copied into the Projects Output Directory

Some projects need resource files available in the output directory together with the class files. This is a fairly common task, however it’s not obvious how to archive this for all types of resources.

IF you never have had the problem, that a resource file you used in your project did not turn up in the output directory, you probably have used only default resource files like ‘properties’, ‘wsdl’ or ‘XML’ files. These files are copied into the output path by default.

Lets assume you have a resource e.g. a tiff file (*.tiff) or a TrueType font (*.ttf) which you need in your project and finally in the jar or adflib you build from the project. Lets add a dummy file ‘MyFont.ttf’ in a new folder named ‘res’ under the base path of the model projcect ‘de.hahn.blog.controlresourcefiles’. After this the model application looks like

Model Project after adding Font File

Model Project after adding Font File

No problem with this. Now if you compile the model project and check the output path Q:\QT\BlogControlResourceFiles\CRFModel\classes in this sample, you’ll notice that the folder ‘res’ and file ‘MyFont.ttf’ is not in the directory tree

Output Path after Compile

Output Path after Compile

If you check the path configuration of the project, it shows that the folder and the file should have been there

Project Path

Project Path

Well, the problem is an other configuration for the project. If you check the compiler node in the project properties you see that there is a filter which defines which file types are copied into the output path of the project

Project Compiler  Settings

Project Compiler Settings

As you see there is no entry for type ‘.ttf’ which means that files with this suffix are not copied into the output directory. The solution to the problem is to simply add the suffix ‘.ttf’ to the filter and compile the project again. After this the file ‘MyFont.ttf’ can be found in the projects output directory.

If you have any resource of a type (file suffix) you want to automatically copied into the projects output directory, you simple add the missing suffix to the filter.

JDeveloper First trap when installing a new JDeveloper version

One of my tasks is to evaluate new JDeveloper versions. I have to say that it’s one of the tasks I really do like as I get the chance to try out new things :). OK I have to check if current applications are still running first.

I started installing JDev on my development machine, checked out the sources of the current applications and started compiling them and building adf libraries. At one point I got the below error message:

Error: An unreported error occurred in Appc. No errors were reported, but the tool returned a failure result code: 1.
Warning: <11.05.2012 16:40 Uhr MESZ> <Error> <J2EE> <BEA-160141> <Could not initialize the library C:\..\..\..\oracle_common\modules\oracle.jsf_2.0\jsf-ri-20.war. Please ensure the deployment unit is a valid library type (war, ejb, ear, plain jar). \..\..\..\oracle_common\modules\oracle.jsf_2.0\jsf-ri-20.war (Das System kann den angegebenen Pfad nicht finden) with : \..\..\..\oracle_common\modules\oracle.jsf_2.0\jsf-ri-20.war>
Warning: <11.05.2012 16:40 Uhr MESZ> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.> 
Warning: [J2EE:160147]One or more libraries could not be processed. See error above.

Interestingly the message complains about a war file ‘jsf-ri-20.war’ at a location which I never use for JDev. I never install JDev on drive C on a Windows system. All applications are installed on a different drive (P in my case). The reason for this is the the ‘system11.’ folder was created in my personal ‘application data’ folder which resides on drive C. As this path has spaces on my Windows system I normally move the ‘system11.’ on drive P. To archive this I set the environment variable JDEV_USER_DIR to ‘P:\jdeveloper\system’. When starting JDev the next time the ‘system11.’ is generated in the folder ‘P:\jdeveloper\system’.

After this change I tried again and got the same error, only this time the path started with ‘P’. The path to the jar file C:\..\..\..\oracle_common\modules\ made me think again. This path is normally part of the ADF Runtime installation on a WLS server. In this case the integrated WLS which comes with JDev.

Well, at the time I tried to compile a project containing an ADF Task-Flow into an adf library. Interestingly the rebuild process somehow needs access to the ‘jsf-ri-20.war’. Problem is that I had not created the integrated WLS. This is done the first time you start the integrated WLS (debug or normal).

After starting the integrated WLS the first time the path gets created and my ADF Task-Flow compiles OK.

I installed JDev in various version hundreds (more or less) of times but never stumbled upon this.

Patch Numbers for ADF Runtime Libraries Update to

After the release of the new JDev version I ask support for the patch numbers for the ‘Sherman Update 2’, which seams to be the official name.
Support just answered my question:

The 2 patches are :


But I need confirmation if it can be installes on top of WLS
as from the crertification matrix it is only certified on top of WLS :
Oracle JDeveloper Certification Information

So lets hope we can somehow update the WLS 10.3.5 server with installed ‘Sherman Update 1’ 🙂

UPDATE May-10-2012:
Got this from support regarding upgrade of an existing WLS 10.3.5 server:

There was a confusion if could be installed on top of WLS as per the cerfification matrix
http://www.oracle.com/technetwork/developer-tools/jdev/jdev11gr2-cert-405181.html#Application_Servers is only certified for WLS

I got confirmation that ADF requires the Application Development Runtime libraries.
ADR can be installed on WLS 10.3.5 or WLS 10.3.6
So can be installed on top of WLS

UPDATE May-19-2012:

I got some more info about the possible upgrade path from Oracle I like to share:

Q1) Are the ADF ADF Runtimes certified against WLS 10.3.5?

Yes and we’ve updated the cert matrix to reflect this: http://www.oracle.com/technetwork/developer-tools/jdev/jdev11gr2-cert-405181.html

Q2) Is there a patchset to move from or to

No. As you’ve correctly identified, the only way is to install the Runtimes then apply the patch.

The release notes do highlight this fact, but do not mention that there isn’t a patch from to http://www.oracle.com/technetwork/developer-tools/jdev/11gr2update2-1592225.html#deploy. I’ll seek to get a clarification put in the release notes.

Q3) If is a patch on top of are all of the features available to

No. The patch overrides functionality in so customers should not assume this.

The answer to Q3) is probably the interesting one as it makes clear that even as we update from, we don’t get the features introduced with in JDev 😦
One other implication is that you can’t run applications from both versions on one WLS 10.3.6 server.