Wednesday, August 8, 2018

X-APEX-STATUS-CODE Rest response in PLSQL

X-APEX-STATUS-CODE Rest response in PLSQL



BEGIN
ORDS.DEFINE_PARAMETER(
  p_module_name        => 'assetws',
     p_pattern            => 'transfer',
     p_method             => 'POST',
     p_name               => 'X-APEX-STATUS-CODE',
     p_bind_variable_name => 'status',
     p_source_type        => 'RESPONSE',
     p_param_type         => 'INT',
     p_access_method      => 'OUT',
     p_comments           => NULL);
 ORDS.DEFINE_PARAMETER(
     p_module_name        => 'assetws',
     p_pattern            => 'transfer',
     p_method             => 'POST',
     p_name               => 'alert',
     p_bind_variable_name => 'alert',
     p_source_type        => 'HEADER',
     p_param_type         => 'STRING',
     p_access_method      => 'IN',
     p_comments           => NULL);

END;

Maven update project dependencies


Maven update project dependencies


mvn dependency:resolve
Or  single dependency:
mvn dependency:get -Dartifact=groupId:artifactId:version


mvn clean install -U
-U means force update of dependencies.

Monday, August 6, 2018

can not create Oracle user ORA-65096: invalid common user or role name in oracle

ORA-65096: invalid common user or role name in oracle

can not create Oracle user 

Fix
alter session set "_oracle_script"=true;

How to Stop firewall in Linux, Oracle Linux

How to Stop firewall in Linux, Oracle Linux

Oracle Linux 7, Redhat 7

service firewalld stop
systemctl disable firewalld

Oracle linux 7, Redhat 6

chkconfig iptables off

Monday, July 30, 2018

Oracle APEX info message and error message from PL/SQL

Oracle APEX info message and error message from PL/SQL

Info message
pex_application.g_print_success_message := '<span style="color:green">'|| result ||'</span>';


Error message

DECLARE
 sMsg VARCHAR2(40) := 'aaa';
BEGIN
  apex_error.add_error (
    p_message          => sMsg,
    p_display_location => apex_error.c_inline_in_notification );
END;

Friday, July 27, 2018

Banner 9: Validate NULL for textbox



Banner 9: Validate NULL for textbox


In Form controller


@ActionTrigger(action="VALIDATE_NULL")
public void Ftmvend_ValidateNull()
{


FtvvendAdapter ftvvendElement = (FtvvendAdapter)this.getFormModel().getFtvvend().getRowAdapter(true);
if (ftvvendElement==null)
return;

if ( !ftvvendElement.getFtvvendTaxFormStatus().isNull() && ftvvendElement.getFtvvendTaxFormDate().isNull() )
{
errorMessage(GNls.Fget(toStr("DDD-0037"), toStr("FORM"), toStr("A status date must be entered for the related Tax Form Status.")));
goItem(toStr("FTVVEND_TAX_FORM_DATE"));
throw new ApplicationException();
}

}


In Block controller


@ActionTrigger(action="KEY-COMMIT", function=KeyFunction.SAVE)
public void ftvvend_Save()
{


FtvvendAdapter ftvvendElement = (FtvvendAdapter)this.getFormModel().getFtvvend().getRowAdapter(true);
if (ftvvendElement==null)
return;

executeAction("VALIDATE_NULL");
getTask().getGoqrpls().gCheckFailure();

commitTask();
getTask().getGoqrpls().gCheckFailure();
getTask().getGoqrpls().gCheckStatusQuery();
}

Banner 9: textbox live hint, validation



Ellucian Banner 9: textbox live hint, validation



set hint in task start of Form controller

getTask().getGoqrpls().gSsnSetItemHint(toStr("FTVVEND.PERS_SSN"));




GoqrplsServices in Common


public void gSsnSetItemHint(NString pItem)
{
//  -- Implemented in version 8.0
//  -- To be used in WHEN-NEW-ITEM-INSTANCE of data enterable SSN items
//  -- SSN may be a length of 9, 10, 11, 12, 13, 14 or 15 basedup the GUBINST_SSN_MAX_LENGTH value.
//  -- This routine will append to the SSN items autohint display
//  --
NString lvHint= NString.getNull();
NString lvAppendHint = GNls.Fget(toStr("GOQRPLS-0150"), toStr("LIB"), toStr("Maximum field length %01% characters."), getNameIn("GLOBAL.GUBINST_SSN_MAX_LENGTH"));
lvHint = getItemHint(pItem);
if ( inStr(lvHint, lvAppendHint).equals(0) )
{
if ( !lvHint.isNull() )
{
lvHint = lvHint.append("  ").append(lvAppendHint);
}
else {
lvHint = lvAppendHint;
}
setItemHint(pItem, lvHint);
}
}






AWS how to delete VPC when it has error with Network interface , Gateway decencies

   how to delete VPC when it has error with Network interface , Gateway decencies  in AWS 1. Check if it is running on EC2 instance then Sto...