Thursday, December 8, 2016

Restart EBS instance if everything is down

Start EBS Instance
Manually restart server if nothing is working like SSH, DB etc

Check if database listener is up or not
> lsnrctl status

Start listener if required using following
> lsnrctl start <DBID>
Connect to database using sysdb
> sqlplus / as sysdba
> startup

stop all services from $ADMIN_SCRIPTS_HOME
start all services from $ADMIN_SCRIPTS_HOME

Wednesday, July 6, 2016

JRAD doc queries

Very useful which can help you find lot of issues related to missing intl txt or publication issue or identify corrupted ui template

--Debug the missing intl_text_id, find it in attribute values
select * from JDR_ATTRIBUTES where att_value like '%8581175%';

--use above component id to get document name
select jdr_mds_internal.getdocumentname(95614) from dual;

--use this to find the template element causing issue by checking sequence id
select * from jdr_components where comp_docid in (95614);

--use above jdr document name to find the content template
select * from cz_ui_templates where jrad_doc='/oracle/apps/cz/runtime/oa/webui/templates/regions/6448_162';

--check which page is referring this template
select * from cz_ui_page_elements where ctrl_template_id=6448;

select * from cz_localized_texts where localized_str like '%';

select * from cz_ui_defs where ui_Def_id in (62791);

select * from cz_ui_templates where ui_Def_id in (62791);

select * from fnd_new_messages where message_text like '%Message Text Here%';

Saturday, June 18, 2016

Why Target instance name is not shown in Publication LOV?

Many times, in CZGOLD instance environment, it is observed that cloned CZGOLD instance will not show cloned target instance while creating publication. Configurator uses below query to check if the remote instance should be visible in Publication LOV or not. You can check data based on this and correct as required.

In simple words, in cloned target instance's cz_servers table, if any server is having source_server_flag as 1, then that server's name in target must match with CZ instance's LOCAL server name. If there are multiple records with source_server_flag as 1, then it might create issue as well.

SELECT local_name, server_local_id
  FROM cz_servers
 WHERE server_local_id >= 0
   AND cz_model_migration_pvt.target_open_for ('P', fndnam_link_name, local_name)='1'

FUNCTION target_open_for (
   p_migration_or_publishing   IN   VARCHAR2,
   p_link_name                 IN   VARCHAR2,
   p_local_name                IN   VARCHAR2
   target_open            VARCHAR2 (1)    := '1';
   target_not_open        VARCHAR2 (1)    := '0';
   l_source_server_flag           VARCHAR2 (1);
   l_source_server_flag_for_pub   VARCHAR2 (1);
   l_sql_str              VARCHAR2 (2000);
   l_sql_str_for_pub      VARCHAR2 (2000);
   target_instance_for_pub VARCHAR2(2000);
   local_instance_name VARCHAR2(2000);


   IF (p_migration_or_publishing = MODE_PUBLICATION) THEN
       IF (p_local_name='LOCAL') THEN
         RETURN target_open;
       END IF;
   END IF;

   IF p_link_name IS NULL THEN
      RETURN target_not_open;
   END IF;

   l_sql_str :=
         'SELECT NVL(source_server_flag,''0''), local_name FROM cz_servers@' || p_link_name || ' ' ||
         'WHERE source_server_flag = ''1'' ';

                INTO l_source_server_flag, target_instance_for_pub;

   IF (p_migration_or_publishing = MODE_PUBLICATION) THEN

      SELECT instance_name
       INTO local_instance_name
      FROM cz_servers
       WHERE local_name = 'LOCAL';

       IF (local_instance_name=target_instance_for_pub) THEN
         RETURN target_open;
       END IF;
   END IF;

   RETURN target_not_open;

      RETURN target_open;
      RETURN target_not_open;

Saturday, May 21, 2016 is not compiling jsp files - not generating class files

Refer tree.dep in _pages directory.
Delete your file entries from this file and re-run file.

Saturday, May 14, 2016

Oracle Configurator - Publication Enabled Properties

Oracle Configurator build has introduced a new flag for PROPERTY object - PUBLICATION ENABLED. This property indicates whether the property and its values should be copied to target publication instance during model publication or not. This is introduced mainly for performance reasons because in certain cases, properties in OCD are not required in published target model data. By default, new build sets this property to False for all properties stopping them being published to target instance. This is sudden change by Oracle in 31.9 build, which many customers are not aware of. This causes customers wonder by model not working correctly in target instance after publication and upgrade to 31.9. I have seen persons debugging a log around this for days finally to figure out properties are not copied in target instance. Thanks to Oracle that there exists a note that can help customer identify the issue quickly if anyone has searched metalink. 

After Upgrading To Build 31.9, Unable to Access Properties in Published Models (Doc ID 2084634.1)

Let's discuss about scenarios when this flag should be enabled.
  • Set Publication Enabled to True, when the property is used in UI or CX code. This means you are accessing property value in CX code OR have display/enable condition in UI based on property or have UI node caption based on property.
  • Set Publication Enabled to False, when property is used only in CDL Rules like property based rules Or property is imported in Configurator from BOM model catalog/APC and not used anywhere. This is most likely the case and is major concern in publication process performance for customers who use large amount of attribute based classification (from APC or Catalog or OCD created) for rule. Whenever you generate logic, all logic rule details are translated to rule engine language and stored in cz_lce% tables. Hence, actual rule texts and rule data are not required for rule execution in target instance.

Tuesday, May 3, 2016

Configurator: AltBatchValidateUrl parameter in CZ_DB_SETTINGS

If you are getting error while Book Order process in Order Management, then you can look at debugging details here.

When we click on Configurator button in OM, Configurator uses BOM:Configurator URL of UI Manager profile option to find URL where configurator instance is hosted.

Book Order/Batch Validation uses same URL for batch validation purpose. If this URL is secured one (with https protocol), DBA can configure Alternate URL (usually non-secure, plain http) using cz_db_settings for quick validation process  - non-secure URL does not require wallet setup in db tier.

So, AltBatchValidateURL is not mandatory when we are using plain http URL for configurator UI launch. If not specified (cz_db_settings does not have entry for AltBatchValidateURL), configurator will use above profile URL for it. But when specified, it must be valid URL to find configurator host.

In current case, AltBatchValidateURL should match with BOM:Configurator URL of UI Manager profile option on the instance – that will be the correct entry for any host.

If BOM:Configurator URL of UI Manager is incorrect, then user will not be able to launch Configurator UI at all and will be quickly identified by any user.

Using Batch Validation and AltBatchValidateURL Correctly in an SSL Environment (Doc ID 458587.1)

Friday, February 19, 2016

Oracle Applications ERP Ebiz Authentication

Validate user/password for Ebiz Session

import oracle.apps.fnd.common.Const;

public class AppsAuth {
    public AppsAuth() {

    public static void main(String[] args) {
        //debug("Java System Properites : " + System.getProperties());
        String dbcFileName = System.getProperty(Const.DBCFILE);
        if (dbcFileName == null) {
            dbcFileName = System.getProperty(Const.JTFDBCFILE);
        debug("DBCFILE found : " + dbcFileName);
        if (dbcFileName == null) {
            dbcFileName = "/u02/VIS1213/inst/apps/VIS1213_ebs/appl/fnd/12.0.0/secure/VIS1213.dbc";
            System.setProperty(Const.DBCFILE, dbcFileName);
            System.setProperty(Const.JTFDBCFILE, dbcFileName);
            debug("DBCFILE set to : " + dbcFileName);

        CZWebAppsContext context = null;
        long startTime = System.currentTimeMillis();

        try {
            debug("Creating context");
            context = new CZWebAppsContext(dbcFileName);
            boolean valid = context.getSessionManager().validateLogin(args[0], args[1]);
            System.out.println("is valid : " + valid);
        } catch (Exception e) {
            debug("Error " + e.getStackTrace());
        } finally {
            if (context != null) {
                debug("Context Released");
            debug("Time taken to for the process : " + (System.currentTimeMillis() - startTime) + " ms");

    private static void debug(String message) {

Sunday, January 31, 2016

Using Custom styles in Configurator UI

You can define custom css classes in UI and use it anywhere in UI Element as style.

Add Raw text in the Page and add following in Text Expression. Notice the dot in beginning of class name. This is same as how you define style in standard HTML page using CSS.

.xxhighlight {
    font-weight: bold;
    background-color: yellow;

Now use above class in style class anywhere in UI element. You will only put xxhighlight in it.
Style = xxhighlight
You can learn more about adding custom style classes in google. You can add more attributes to classes as you want.

Now look and feel of customization and style will be limited to your imagination and not what Configurator UI is offering.