Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3) B25386-01 |
|
Previous |
Next |
Failures of the Oracle ADF Model layer cannot be detected by the JDeveloper compiler, in part, because the page's data-display and method-execution behavior relies on the declarative Oracle ADF page definition files. The Oracle ADF Model layer utilizes those declarative files at runtime to create the objects of the Oracle ADF binding container.
To go beyond simple schema validation, you will want to routinely run and test your web pages to ensure that one of the following conditions does not exist:
The project dependency between the data model project and the user interface project becomes disabled.
By default, the dependency between projects is enabled whenever you create a web page that accesses a data control in the data model project. However, if the dependency is disabled and remains disabled when you attempt to run the application, an internal servlet error will be generated at runtime:
oracle.jbo.NoDefException: JBO-25002: Definition model.DataControls.dcx of type null not found
To correct the error, right-click the user interface project, choose Project Properties, and select Dependencies in the dialog. Make sure that the <ModelProjectName>.jpr option appears selected in the panel.
The DataBindings.cpx
file location changed but the web.xml
file still references the original path for the file.
By default, JDeveloper adds the DataBindings.cpx
file to the package for your user interface project. If a change to the location of the file is made (for example, due to refactoring the application), an internal servlet error will be generated at runtime:
oracle.jbo.NoXMLFileException: JBO-26001: XML File not found for the Container /oracle/<path>/DataBinding.cpx
To correct the error, open the web.xml
file and edit the path that appears in the <context-param>
element CpxFileName
.
Page definition files have been renamed but the DataBindings.cpx
file still references the original page definition filenames.
While JDeveloper does not permit these files to be renamed within the IDE, if a page definition file is renamed outside of JDeveloper and the references in the DataBindings.cpx
file are not also updated, an internal servlet error will be generated at runtime:
oracle.jbo.NoDefException: JBO-25002: Definition oracle.<path>.pageDefs.<pagedefinitionName> of type Form Binding Definition not found
To correct the error, open the DataBindings.cpx
file and edit the page definition filenames that appear in the <pageMap>
and <pageDefinitionUsages>
elements.
The web page file (.jsp
or .jspx
) has been renamed but the DataBindings.cpx
file still references the original web page's filename.
The page controller uses the page's URL to determine the correct page definition to use to create the ADF binding container for the web page. If the page's name from the URL does not match the <pageMap>
element of the DataBindings.cpx
file, an internal servlet error will be generated at runtime:
javax.faces.el.PropertyNotFoundException: Error testing property <propertyname>
To correct the error, open the DataBindings.cpx
file and edit the web page filenames that appear in the <pageMap>
element.
Bindings have been renamed in the web page EL expressions but the page definition file still references the original binding object names.
The web page may fail to display information that you expect to see. To correct the error, compare the binding names in the page definition file and the EL expression responsible for displaying the missing part of the page. Most likely the mismatch will occur on a value binding, with the consequence that the component will appear but without data. Should the mismatch occur on an iterator binding name, the error may be more subtle and may require deep debugging to isolate the source of the mismatch.
Bindings in the page definition file have been renamed or deleted and the EL expressions still reference the original binding object names.
Because the default error-handling mechanism will catch some runtime errors from the ADF binding container, this type of error can be very easy to find. For example, if an iterator binding (named findUsersByNameIter
) was renamed in the page definition file, yet the page still refers to the original name, this error will display in the web page:
JBO-25005: Object name findUsersByNameIter for type Iterator Binding Definition is invalid
To correct the error, right-click the name in the web page and choose Go to Page Definition to locate the correct binding name to use in the EL expression.
EL expressions were written manually instead of using the Expression Picker dialog and invalid object names or property names were introduced.
This error may not be easy to find. Depending on which EL expression contains the error, you may or may not see a servlet error message. For example, if the error occurs in a binding property with no runtime consequence, such as displaying a label name, the page will function normally but the label will not be displayed. However, if the error occurs in a binding that executes a method, an internal servlet error javax.faces.el.MethodNotFoundException:
<methodname>
will display. Or, in the case of an incorrectly typed property name on the method expression, the servlet error javax.faces.el.PropertyNotFoundException:
<propertyname>
will display. For information about displaying JSF trace messages to help debug these exception, see Section 16.6, "Tracing EL Expressions".
If the above list of typical errors does not help you to find and fix a runtime error, you can initiate debugging within JDeveloper in order to isolate the contributing factor. This process involves pausing the execution of the application as it proceeds through the phases of the Oracle ADF page lifecycle, examining the data received by the lifecycle, and determining whether that data is expected or not. To inspect the data of your application, you will work with source code breakpoints and Data window, as described in Section 16.4, "Understanding a Typical Oracle ADF Model Debugging Session".