Sample Files and Errata

Oracle JDeveloper 10g Handbook

by Dr. Avrom Faderman, Peter Koletzke, & Dr. Paul Dorsey 

Disclaimer Installing the Files Sample Data Websites Chapters from the 9i Edition About the
Sample Files
Sample Files 
and Errata

Disclaimer

The files on this page have been tested to the best of the authors' abilities and are intended only to supplement the hands-on practices in the Oracle JDeveloper 10g Handbook. These files have no warranty of usefulness or accuracy. The authors and any other entities making these files available are not responsible for any effects that may result from their use. The files accessible from the links below are offered as freeware in the public domain. The authors and publisher offer no technical support for users of these files. This code has been developed and tested with Oracle JDeveloper 10g release 9.0.5.1 production (build 1605), and checked with patch release 9.0.5.2 (build 1618).

 

Installing the Files

 

Unzip the file into a new directory (for example, C:\JDev10Practice). Open this file, INDEX.HTML, in your browser.

 [top]
Tip  
Some file links on this page will ask if you want to save or open the file. If the file displays in the browser, but you want to save it instead, select "Save Link As" (in Netscape) or "Save Target As" (Internet Explorer) from the right-click menu on the file link. 

Sample Data

The practices in this book use database objects in an Oracle8i, Oracle9i, or Oracle 10g database. The objects are owned by a sample user, HR. . 

 

You may install these sample database objects using one of these methods:

  • Use a sample schema installed by default in an Oracle9i or Oracle 10g database. The HR schema may already be installed in an available Oracle database. You or your database administrator may need to unlock the HR account using: ALTER USER hr ACCOUNT UNLOCK in SQL*Plus. Scripts to reinstall this schema are located in the ORACLE_HOME\demo\schema\human_resources directory (for Oracle9i and Oracle 10g).

  • Run the following script after creating the HR user and granting it CONNECT and RESOURCE privileges.

hr_install.sql

 

Should you want to recreate the schema, you can remove the objects in this schema by running hr_drop.sql. You can then re-run the install procedures described above to recreate the objects.

 [top]

Websites

The following list contains several of the key websites mentioned in the book. Appendix A contains a more extensive list of  websites where you can find additional information about technologies discussed in the book. 

 

Authors

Oracle Technology Network - Avrom's company. The main source of Oracle information about JDeveloper.

Avrom's Personal Home Page 

Quovera  - Peter's company web site.

Peter's Personal Home Page - Sample Oracle development files.

Dulcian, Inc. - Paul's company web site.

Other

International Oracle Users Group

Oracle Development Tools User Group

Netscape - Developer - JavaScript

Sun - Java - Reference for all Java technology 

WWW Consortium - HTML, XML

 

[top]

Chapters from 9i the Edition

 

The following files are Adobe Acrobat versions of Chapters 6 and 19 from the Oracle9i JDeveloper Handbook by the same authors. The subjects in these chapters are not discussed in the 10g edition, but have not changed significantly from the 9i edition. They are included should you require more information about the subjects. The steps in the practices refer to the 9i version of JDeveloper.

 

[top]

About the Sample Files

 

This section contains links to files organized by chapter and divided into the following categories:

  • Code snippets and other samples - The files in this section contain small pieces of code from the book chapters that you would otherwise have to key in. They also contain sample files that are supplements to the material in the book.  
  • Hands-on practice files - starting and ending files for the practices. Use the steps in the "Practice Files Installation" section below to set up the files.
  • Errata - last minute corrections and clarifications that are not in the book. Read these before attempting the hands-on practices. 

Using the Files From This Web Page

 

If the file link causes the file to be displayed when you would rather save it to the file system, right click the link, select Save Link As (in Netscape) or Save Target As (in Internet Explorer or Mozilla), and supply the directory and file name.

Note: So that these files may be displayed in your browser, TXT extensions have been added to some file names. To use one of these files, you can copy the text from the browser page and paste it into Notepad. Then save the file without the TXT extension. Alternatively, you can navigate to the directory in which the file resides (see the Location or Address field in the browser) and copy the text from that file.

[top]

 

Using the Practice Files 

 

Important Note
The instructions in the book are complete and you do not need to install any of the starting files to successfully complete the practices. The files in this archive are included in case you need to check your work, run practices out of order, or would like to see an example of the files that are created by the practice.

 

The practices require a connection called "HR." Instructions for creating that connection may be found in the Chapter 1 practice. Once you have set up the connection, use the following steps to install any of the practice files (listed in the table in the "Sample Files and Errata" section):

  1. Use the file with the "_start" suffix for the starting files needed for the practice. Use the file with the "_end" suffix for the completed files for the practice. The ending files for a particular practice may be required for another practice as noted in the book. Note the name of the workspace directory that will be created (in the table in the "Sample Files and Errata" section).
     
  2. Copy the Zip file into the JDEV_HOME\jdev\mywork directory. 
     
  3. If a workspace file of the same name is open in JDeveloper, close it. Close JDeveloper. Rename the directory in the file system for that workspace.
     
  4. Unzip the file. In the unzip dialog, specify that you want to extract into the current directory, want to extract all files, and want to "Use folder names" as in the dialog shown here: 



    (Do not select all files and extract because this will not create empty directories.) This will create a directory with the name shown in the table in the "Sample Files and Errata" section.
     
  5. If you want to run the files, you need to copy standard.jar to the project directory (for the practices in Chapters 1, 7, 12, 13. 14, 17, and 18 ) using the following technique:
Copying standard.jar 
Copy the file JDEV_HOME\jakarta-taglibs\jstl-1.0\lib\standard.jar into the directory: <workspace dir>\ViewController\ public_html\ WEB-INF\ lib.

"workspace dir" is the directory into which you installed the workspace files (where the .jws file is located). If the lib directory does not exist, create it before copying the file.

  1. In JDeveloper, select File | Open and double click the directory name. Do not select either of the two items that have the same name and a .zip extension.
     
  2. Select the workspace file inside that directory (with a .jws extension).
     
  3. Click each project (.jpr file) node and click the Rebuild toolbar button. The notes indicate which project to compile first.
     
  4. If there is a Model project in the workspace, select the Model.jpx file under that project (for example, ViewController.jpx). Select "Edit Model" from the right-click menu on that file. In the Connection page of the Business Components Project Wizard, specify your connection and click OK. This ensures that the connection to your HR schema will be used.
Note 
The starting and ending workspace directories for some practices contain a number (in the middle or end of the file name) if the workspace directory is used in another practice. The workspace filename usually matches the directory name but may not exactly match the name used in the book.

 

What to do if You Have Problems
There are several troubleshooting techniques and strategies mentioned in the introduction of the book.

If you receive a runtime error such as the following lines below, follow the instructions in the "Copying standard.jar" note above:

Error(1): "http://java.sun.com/jstl/core" is not a registered TLD namespace.
Error(1): Unable to load taghandler class: http://java.sun.com/jstl/core

Click Browse File System to view the directories and files linked from this page

 

[top]

Sample Files and Errata

See Notes section for footnote explanations. Workspace directories noted with an * require standard.jar as explained in the sidebar above "Copying standard.jar."

Chapter Code Snippets and Sample Files Hands-On Practice Files (workspace directory) Errata

1

none Ch01_end.zip 
(* LocDept)
none

2

none none none
3 none none none
4

none

none none
5 Ch05_Snippets.txt Ch05_end.zip
(JavaTest)
none

6

none none none

7

Ch07_Snippets.txt Ch07_1 end.zip
Ch07_unzip_to_C.zip
(LocDeptDeploy)   (Note 5)

Ch07_2_ end.zip
(* LocDeptDeploy) 

none

8

none Ch08_end.zip 
(DefaultBC)
none

9

none Ch09_end.zip
(HR)
none

10

Ch10_Snippets.txt Ch10_1_end.zip
(HR)

Ch10_2_end.zip
(HR)

Ch10_Corrections.txt

11

Ch11_Snippets.txt Ch11_1_end.zip
(HRApp)

Ch11_2_end.zip
(HRApp)

none

12

none Ch12_1_end.zip
(* HRApp)

Ch12_2_end.zip
(* HRApp)

Ch12_Corrections.txt

13

Ch13_Snippets.txt Ch13_1_end.zip
(* HRApp)

Ch13_2_end.zip
(* HRApp)

none
14 none

Ch14_1_end.zip
(* HREJB)

Ch14_2_end.zip
(* HRTopLink)

Ch14_3_end.zip   (Note 8)
(* GoogleWSApp)

Ch14_Corrections.txt
15 Ch15_Snippets.txt  Ch15_1_end.zip
(DeptEmp)

Ch15_2_end.zip
(CustomBeans)    (Note 1)

Ch15_Corrections.txt
16 Ch16_Snippets.txt  Ch16_start.zip    (Note 2)
(LayoutManagers)

FlowLayout Manager Hands-On Practice

Ch16_end.zip   (Note 3)
(LayoutManagers)

Ch16_Samples.zip   (Note 4)
(LayoutManagerSamples)

Ch16_Corrections.txt
17 Ch17_Snippets.txt  Ch17_1_end.zip    (Note 6)
(* StrutsPractice1)

Ch17_2_end.zip
(* StrutsPractice1)

Ch17_Corrections.txt
18 none

Ch18_end.zip 
(* LocationQuery)

none
19

none

Ch19_end.zip   (Note 7)
(LocationQuery)

none
App A

none

none

none

App B

none

none

none

App C

AppC_Snippets.txt 

none

none

App D

AppD_Snippets.txt  none

none

[top]

Notes

  1. Compile the Project project before compiling the TestOptions project. The TestOptions project contains a reference to the bean created in the Project project. If you use a directory structure other than C:\JDev10g as JDEV_HOME, you may need to edit the properties of the TestOptions project and change the path for the custom bean library. The practice indicates how this library is added and you can use those steps to modify the library's path. 
     
  2. This file contains starting projects for the two layout managers in the book's practice.
     
  3. This Zip file contains the results of all hands-on practices in the book (BorderLayout and GridBagLayout) as well as the results of the additional practice for FlowLayout manager.
     
  4. This Zip file contains applications that demonstrate layout managers other than those demonstrated  in the practices: BoxLayout, CardLayout, FlowLayout, GridLayout, OverlayLayout, PaneLayout, VerticalFlowLayout, and XYLayout. Each layout manager is represented by two files: one has a "Frame" suffix and contains the code to implement the layout manager example; the other has an "App" suffix and is used to run the frame file. The XYLayout project is not runnable. It  contains a demonstration of the differences between the "null" layout and XYLayout. Open the ReadMe.txt file in this project for details.
     
  5. The Ch07_unzip_to_C.zip file contains a CMD file that is used to start the application. Copy this Zip file into the C:\ directory and unzip using folder names. The CMD file will unzip into the C:\Loc directory. This file is referenced in the View project. If you want to run the JSP page or Java application in this practice outside of JDeveloper, you need to run the deployment steps outlined in each practice.
     
  6. Compile the Model project before compiling the ViewController projects. Be sure to copy standard.jar after unzipping both 1_end and 2_end files.
     
  7. To save space, the ViewController project that was created in Chapter 18's practice is omitted from this workspace. It is not required for the Chapter 19 practice. You can load that project from Ch18_end.zip, if you need it. This project does not require standard.jar.
     
  8. This file requires the Google Web APIs as described in this Important Note.

Last Updated 8-Sept-2004