This appendix covers the following topics:
Customization Manager has a standards checker to check the that the files included in a custom package meet certain coding standards. This checker tests all code for standards compliance.
Some standards are mandatory and will result in failure when Customization Manager attempts to build the package. Other standards are recommended, and the standards checker will give a warning but the package will be built.
The standards in the following table must be met. If a file does not meet these standards then Customization Manager will not build the package containing it.
Standard Name | Description |
---|---|
Header Check | Each file must have an Oracle-compliant source header present. |
PLD File Location Standard | PLD files must be located somewhere under one of following directories: resource, plsql, graphs. |
SQL using CONNECT Standard | SQL files using a "connect" statement must have a valid dbdrv hint provided within the file. |
Java Destination Path Standard | For Java files within a package, the destination path must start with "java". |
Java Package Path Standard | For Java files within a package, the destination path for the Java file must match its package structure. |
The following table lists standards that if not met, will result in a Warning but the package will still be built.
Standard Name | Description |
---|---|
Java SOP Check | Java files must not use System.out.print |
Java System.gc() Check | Java files must not use System.gc |
SQL dual reference check | SQL files must not use System.dual, instead use dual |
PERL module location | Perl module must be located anywhere under perl directory |
PERL file location | Perl files must be located under one of following directories: bin, patch/[release]/bin,admin/template,admin/template/*. |
SQL comment standard | SQL file should not have -- as comment |
SQL file (!) check | SQL file should not have ! character |
PLS (!) check | PLS file should not have ! character |
JRAD halign check | JRAD XML files should not contain hAlign |
Java package name check | All Java classes must be in packages beginning with: oracle.apps.[prod_name] |
Java System.err Check Standard | Java files must not use System.err |
SQL file location check | SQL files must be located under one of following directories: admin/sql,admin/template,admin/template/*,patch/ [some dir]/sql,sql |
Drvx file location check | Drvx files must be located under one of following directories: patch/[some dir]/driver, admin/template,admin/template/* |
Driver File Location Standard | Driver files must be located under one of following directories: admin/driver,patch/[some dir]/driver, admin/template,admin/template/* |
LCT File Location Standard | LCT files must be located under one of following directories: admin/import,patch/[some dir]/import,upgrade/[some dir]/import,admin/template,admin/template/* |
LDT File Location Standard | LDT files must be located under one of following directories: admin/import,patch/[some dir]/import,help,,admin/template,admin/template/* |
PKG File Location Standard | Package files must be located under one of following directories: admin/sql,patch/[some dir]/sql,admin/template,admin/template/* |
RTF File Location Standard | RTF files must be located under : patch/115/publisher/templates |
XSS Location Standard | XSS files must be located under one of following directories: html,admin/template,admin/template/* |
HCT Location Standard | HCT files must be located under one of following directories: patch/[some dir]/import,admin/template,admin/template/* |
HDT Location Standard | HDT files must be located under one of following directories: patch/[some dir]/import,admin/template,admin/template/* |
PDT Location Standard | PDT files must be located under one of following directories: patch/[some dir]/import,admin/template,admin/template/* |
JavaScript Location Standard | JavaScript files must be located under one of following directories: html,patch/[some dir]/html,upgrade/[some dir]/html,admin/template,admin/template/* |
PrintStackTrace Check | Using printStackTrace is not recommended |
Workflow Location Standard | Workflow files must be located under one of following directories: admin/import,patch/[some dir]/import,admin/template,admin/template/* |
XDF Location Standard | XDF files must be located under one of following directories: admin/xdf,patch/[some dir]/xdf,patch/[some dir]/xdf/aw/US |
Absolute URL Check Standard | Check for absolute URLs |
Report Printer Def File | Report printer files must be located under one of following directories: reports,admin/template,admin/template/* |
Form Location Standard | Form files must be located under one of following directories: forms,admin/template,admin/template/* |
JAR Location Standard | Jar files must be located under one of following directories: java/3rdparty,java/3rdparty/stdalone,admin/template,admin/template/,patch/115/jar/bpel |
JSP Location Standard | JSP files must be located under one of following directories: html,html/jsp/[PROD],html/jsp/[PROD]/[MOD],html/jsp/[PROD]/[MOD]/[sub MOD],admin/template,admin/template/* |
Dependency Files Location Standard | Dependency files must be located under one of following directories: java/make,admin/template,admin/template/* |
Cmd file Location Standard | CMD files must be located under one of following directories: admin/template,admin/template/*,bin |
XML Location Standard | XML files must be located under one of following directories: html,java,mds,patch/115/publisher/defs,admin/template,admin/template/*,patch/115/manualsteps. |
XGM Location Standard | XGM files must be located under one of following directories: patch/[some dir]/xml/US,admin/template,admin/template/* |
XSL Location Standard | XSL files must be located under one of following directories: html,admin/xdf/xsl,patch/[some dir]/xdf/xsl,patch/[some |
ForceViewCheck | One must use FORCE in CREATE statements in view creation scripts |
Show Error Check | SQL scripts must not contain the Show errors command |
Absolute URL Check | Having absolute URLs is not recommended |
Pkg Replace Check | Use CREATE OR REPLACE PACKAGE for package creation. Do not omit OR REPLACE |
Pkg Create IS Check | Package creation must not use IS. Instead should always use AS |
Xml Parse Standard | XML files should be well-formed |
Control M Standard | Text files should not have control M [^M] character |
SQL NoLogging Check | Using NOLogging in SQL scripts is not recommended |
SQL Serveroutput Check | Using set serveroutput on in SQL scripts is not recommended |
Wfx File Naming Standard | WFX filename must end in s, e, or a, ie. [s|e|a].wfx. |
16.3 File Naming Standard | Filename should adhere to the 16.3 naming standard |
Set Scan Off Standard | Package creation scripts containing ampersand must have SET SCAN OFF |
Drop Table check | Drop table should not be used in SQL/PLSQL files as it can result in loss of data |
SQL Max Line LengthStandard | No line in a SQL file should be longer than 255 characters |
FNDSLOAD Check Standard | FNDSLOAD is obsolete. No dbdrv: hints should refer to FNDSLOAD |
Drop Column check | Drop Column should not be used in SQL/PLSQL files |
Long Raw check | LONG or LONG RAW columns should not be used |
Insert Column check | INSERT SQL statements, should explicitly list the columns about to insert |
FNDLOAD/FNDLOADSO syntax check | FNDLOAD/FNDLOADSO must have correct syntax |
Admin Dbdrv none check | All files under [PROD_TOP]/admin must have only dbdrv: none |
NLADD Sql Check | There should be no [PROD]NLADD.sql files in R12 patches |
FNDLOAD ldt phase | dbdrv: FNDLOAD ldt files must have correct phase |
Menu file location | Menu files must be located under one of following directories: resource,admin/template,admin/template/* |
WFX file location check | WFX files must be located under one of following directories: patch/[some dir]/xml,admin/template,admin/template/* |
Create single line check | In SQL files, CREATE command must occur on one line only. |
SQL exit check | SQL files must end with exit |
Package SpecBody Same file | The package specification and body should be in different files |
SQL Absolute path Check | SQL files should not have absolute path in a @ or @@ statements |
Calling SQL script check | Use start or @ when calling a SQL script within a SQL script. Do not use @@. |
Applsyspub Schema Check | Custom scripts are not allowed to modify APPLSYSPUB schema |
Custom File Naming Standard | All files involved in the package must be for a product prefixed with xx"" |
Pkg body creation Standard | Package body creation scripts should not be in pkh files |
Pkg spec creation Standard | Package Spec creation scripts should not be in pkb and plb files |
Mview Build deferred Standard | Materialized Views must be created with BUILD DEFERRED option |
Mview Parallel Standard | Materialized Views should not be created with parallel command |
Mview prebuilt Standard | Materialized Views must not be created with ON PREBUILT TABLE option |
Report Location Standard | Report files must be located under one of following directories: reports,admin/template,admin/template/* |
Import stmt Check | Java import statements must reference fully qualified Class names |
Language check in destination path | The destination path for a file entry in the package creation process should not have the language code as a suffix. The language should be specified separately. |
JRAD XML file type | During the package creation process, if an XML file is included with the file type as 'JRAD XML' (File type ID is 1005), then the destination path should start with 'mds'. |
Control-M characters in PLD files | If a PLD file contains a control-M character, then some issues may arise while applying a patch containing this PLD file. |
SQL whenever sqlerror exit failure rollback | A SQL Script should contain “WHENEVER SQLERROR EXIT FAILURE ROLLBACK;”. |
Java file empty catch block | An empty catch Block finds instances where an exception is caught, but nothing is done. |
Avoid returning from a finally block | In Java code, one should avoid returning from a finally block - this can discard exceptions. There should be no return statement from a finally block. |
Avoid catching null pointer exception | Java code should never catch a null pointer exception. A catch block may hide the original error, resulting in other more subtle errors. |
Java throwing exception in finally block | In Java, throwing exception in a finally block is confusing. It may mask an exception or a defect in the code, and it can also make code cleanup unstable. |
Java catching throwable | In Java, one should avoid catching throwable. This action is dangerous because such a catch can catch other things like OutOfMemoryError. |
Java class should not extend error | Errors are system exceptions. Classes should not extend them. |
Java files must have rcs_id | All Java files must have the following for source control ID:
public static final String RCS_ID = $Header$ |
Java class name check | All Java files should have a class with a name that is the same as that of the file name. |
Java empty if check | There should be no empty if statements in Java code. An empty if statement finds instances where a condition is checked but nothing is done about it. |
Java empty while check | There should be no empty while statements in Java code. |
Java empty finally block | There should be no empty finally blocks in Java code. Avoid empty finally blocks; these can be deleted. |
Java if without braces | In Java, if statements must use curly braces. Avoid using if statements without curly braces. |
Java while without braces | In Java, while statements must use curly braces. Avoid using while statements without using curly braces. Formats without curly braces are error-prone. |
Java switch must have default label | In Java files, switch statements should have a default label. |
Java empty synchronized | There should be no empty synchronized blocks. |
Java empty static initializer | There should be no empty static initializer blocks. |
JRAD files language must be US English | In a JRAD XML file, the language of the XML file should be US English and specified as "xml:lang = 'en-US'" |
Java Parameter (INI) extension and location standard | Java Parameter files should follow these standards:
-Identified by file extension: .ini -Location standard: 1.$<PROD_TOP>/admin/template 2.$<PROD_TOP>/admin/template/* |
JDBC TimeStamp Compliance | The proper column bind type should be used when sending/fetching DATE columns. Do not use Types.TIMESTAMP or OracleTypes.TIMESTAMP. |
Do not use ~FILE or ~PATH in .drvx files | ~FILE and ~PATH cannot be used in a dbdrv: command in a .drvx file, even within checkfile. A .drvx file is not loaded into the database. |
dbdrv: fdfcmp should not be called | The database driver should not call fdfcmp. |
Files with .drvx extension must contain 'dbdrv: command' | For each driver exception ( .drvx ) file the line dbdrv: command must exist. The command must be in all lowercase. The line dbdrv: none commands fail also. |
No drvx files should contain XDOLoader | For all new patches containing Oracle XML Publisher files, the dbdrv command should be added to the file directly instead of using a separate drvx file. |
No drvx files should contain dbdrv: PYLOAD | PYLOAD should not be in any automatically generated database driver. |
dbdrv: FFXBCP must have correct syntax | dbdrv: FFXBCP must have correct syntax:
exec ff bin FFXBCP bin &phase=last(+##) &ui_apps 0 Y( -S | -U | -SU | ) |
dbdrv: FFXMLC must have correct syntax | FFXMLC command must contain the following syntax:
exec ff bin FFXMLC bin (&phase=dat(+##)) &ui_apps 0 [yY] |
dbdrv: FNDLIBR must have correct syntax | FNDLIBR command must contain the following syntax:
exec fnd bin FNDLIBR bin <phase> FND FNDCPBWV &ui_apps SYSADMIN 'System Administrator' SYSADMIN |
dbdrv: java htmlLoad.class must have correct syntax | Java htmlLoad.class command must contain the following syntax:
exec java oracle/apps/per htmlLoad.class java -username &un_apps -password &pw_apps -database &jdbc_db_addr -file <.html file> |
dbdrv: java UnzipFile.class must have correct syntax | Java UnzipFile.class command must contain the following syntax:
exec java oracle/apps/ad/jri UnzipFile.class java The file must also have the .zip extension. |
dbdrv: LoadMap.class must have correct syntax | The syntax for LoadMap.class must be as follows:
exec java oracle/apps/ecx/loader LoadMap.class java &phase=dat &un_apps &pw_apps &jdbc_db_addr &fullpath_prod_path_file |
JRAD XML files must have file-version attribute | JRAD XML files must have a file-version attribute to indicate the version of the file. Following is a sample definition of file-version.
<page xmlns:jrad='http://xmlns.oracle.com/jrad' xmlns:oa='http://xmlns.oracle.com/oa' xmlns:ui='http://xmlns.oracle.com/uix/ui' version='9.0.3.7.0_428' xml:lang='en-US' file-version='$Header: AkTestAttachLinkPG.xml 115.0 2003/02/10 18:18:10 tmak noship $' xmlns='http://xmlns.oracle.com/jrad'> Note that the file-version attribute must have the correct filename and a version. |
Translation standard for JRAD files | In JRAD xml files the encoding should be UTF-8 and specified as: "encoding = 'UTF-8'" |
Do not end comments with the '-' character | Do not end comments with the '-' character, as this is the default Sql*Plus line continuation character. For lines with a series of '-', end the line with a '+' sign. |
11i file version standard | File version should start with '11' |
R12 file version standard | File version should start with '12' |
The following table lists the standards which are applicable only for Oracle E-Business Suite Release 12.2 Online Patching.
Object Type | Description | File Types |
---|---|---|
Table | A column type should not be ROWID. | .xdf, .odf |
Table | A column type must not be LONG. | .xdf, .odf |
Table | A column type must be a built-in type or a user-defined type owned by a non-editioned user. | .xdf |
Table | A base column name should be unique within the table within the first 27 bytes. | .xdf, .odf |
Table | A base column name may use the # character only to distinguish the column versions; for example, <col_name>#<version>. | .xdf, .odf |
Table | A table must be owned by an Oracle E-Business Suite product schema, not APPS. | .xdf |
Table | A table name must not use the '#' character. | .xdf, .odf |
Materialized View (MV) | Create/alter Materialized View definition using XDF | .sql , .pkb, pkh |
Constraint | Create/alter constraint definition using XDF or ODF | .sql, .pkb, .pkh, .pls |
Index | Create/alter the index definition using ODF or XDF. | .sql, .pkb, .pkh, .pls |
Table | Create/alter the table definition using ODF or XDF. | .sql, .pkb, .pkh, .pls |
Table | Do not modify application-managed tables in an online patch. | .xdf, .odf |
Constraint | A constraint name must contain an underscore ('_'). | .xdf |
Index | An index name must contain an underscore ('_'). | .xdf, .odf |
Trigger | A table trigger must be created on editioning view, not on the table. | .sql, .pkb, pls |
Table | DML statements must access tables via a table synonym or the editioning view. | All code |
VPD | A VPD policy must be created on the editioning view or table synonym, not on the table. | .sql |
Synonym | A table synonym must point to the editioning view, not to the table. | .sql, .pkb, .pls |
Synonym | Do not install synonyms in non-editioned schemas | .xdf, .odf |