Monday, July 13, 2009

Error Running "populateImages" Ant Target of the Oracle FOD Infratructure Application

I wonder why my FusionOrderDemo StoreFrontModule user interface do not display the product images. I re-run the MasterBuildScript build.xml of the Infrastructure application bundled in the FusionOrderDemo_R1 and noted that the populateImages target raises an exception and that is another "timezone region not found error". I have encountered this of error before and documented it in my earlier blog but even though that I already set the appropriate "-Duser.timezone=GMT" java option on the Run properties of each of the project, the error still persisted. It seems that JDeveloper do not read the java options that I've set when the class is called from Ant.

To cut the story short, here are the steps that solved the problem:

1) Open the build. xml file @ DatabaseSchema>Resources>build.xml.

2) Replace the script of the populateImages target with the following:
<target name="populateImages" depends="compileImagesApp">
    <java classname="oracle.fodemo.share.imageloader.LoadImages" fork="true" failonerror="true" >
      <classpath refid="schema.classpath"/>
      <classpath refid="oracle.jdbc.path"/>
        <pathelement location="classes/"/>
      <arg value="${jdbc.url}"/>
      <arg value="${db.demoUser}"/>
      <arg value="${db.demoUser.password}"/>
      <arg value="${imageHome}"/>
      <jvmarg value="-Duser.timezone=GMT"/>
3) Open the ImageLoaderServiceAMImpl class @ DatabaseSchema>ApplicationSources>oracle.fodemo.share>imageloader>ImageLoaderServiceAMImpl

4) Look for something like the following code:
imagesUrl = getClass().getClassLoader().getResource(imageDirectory + subDirectory); // imagesUrl = new URL("file:///C:\\JDeveloper\\tutorial\\FusionOrderDemo_R1\\Infrastructure\\DBSchema\\Images\\thumbnails\\");

5) Comment this code: imagesUrl = getClass().getClassLoader().getResource(imageDirectory + subDirectory);

6) Uncomment this code: /
/ imagesUrl = new URL("file:///C:\\JDeveloper\\tutorial\\FusionOrderDemo_R1\\Infrastructure\\DBSchema\\Images\\thumbnails\\");

7) Replace the above directory "C:\\JDeveloper\\tutorial" with the absolute address of your directory containing the FusionOrderDemo_R1 folder.

8) Re-run the build.xml file of the MasterBuildScript project.

Tags: FusionOrderDemo_R1, JDeveloper, 11g, Fusion Order Demo


  1. Hi Rommel,

    I ran into the same problem. Your solution seems to be a bit complicated; what you should do is: go to Project Properties->Ant->Process and put -Duser.timezone=(your time zone without braces or quotes) in the Java Options next to That's where jDeveloper reads the Java options when it runs Ant not in the Run/Debug/Profile.



  2. Wow! This is good to know.