Thursday, December 31, 2015

Deployment Steps for OA Framework on R 12.2.x or R 12.2.4


Steps to deploy custom OA Framework page on R 12.2.4

1) Copy class files on server
2) Create ZIP file
3) Make Jar file from the ZIP file created before
4) Bounce the services

1) Copy class files on server
==================================
Copy files to custom folder path on server.

2) To Make .ZIP file
==================================
A) Create a temporary custom.zip file which contains all the custom application's directories/files at non-standard location. Please follow the following steps:

    1) cd $JAVA_TOP

    2) zip -r customprod.zip. Where the list of all directory paths are present, relative to $JAVA_TOP, for custom application's java files at non-standard location.

    Command: zip -r xxtest.zip xxtest

    3) Generate & sign customprod.jar file.

    Command: adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass -keyPass

3) To Make .JAR file
==================================
example : adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/customprod.zip -outputFile $JAVA_TOP/customprod.jar -jar $CONTEXT_NAME 1 CUST jarsigner -storePass <KeyStore Password> -keyPass <Key Password>

Command:     adjava oracle.apps.ad.jri.adjmx -areas $JAVA_TOP/xxtest.zip -outputFile $JAVA_TOP/xxtest.jar -jar $CONTEXT_NAME 1 CUST jarsigner


4) Bounce the Apache and mid-tier service by using the following commands.
==================================
adapcctl.sh stop

adapcctl.sh start

admanagedsrvctl.sh stop oacore_server1

EnterWeblogic Password: <pwd>

admanagedsrvctl.sh start oacore_server1

EnterWeblogic Password: <pwd>

Wednesday, December 23, 2015

FNDLOAD for multi-language OR Multilingual

Some time we are facing situation where we have to move AOL objects in Oracle EBS Multilingual/Territory environment.
For example we want to move Lookups, Concurrent Programs, Messages etc with their translation also for Multilingual/Territory like English and Arabic.

In such scenario we have to download and upload LDTs for both languages.
Lets suppose we have to move Concurrent Program with both English and Arabic translations.

==============
DOWNLOAD
==============
Before downloading we have to set the export language style like,

For English           
-------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_US.ldt PROGRAM APPLICATION_SHORT_NAME="XXTST" CONCURRENT_PROGRAM_NAME="XXTST_CONCURRENT_PRG"

For Arabic           
-------------------------------------------------------------------------------
export NLS_LANG=ARABIC_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_AR.ldt PROGRAM APPLICATION_SHORT_NAME="XXTST" CONCURRENT_PROGRAM_NAME="XXTST_CONCURRENT_PRG"

==============
UPLOAD
==============
Similarly for Upload LDTs we have to set the language style.

For English           
-------------------------------------------------------------------------------
set NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_US.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE


For Arabic           
-------------------------------------------------------------------------------
set NLS_LANG=ARABIC_AMERICA.AR8MSWIN1256

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXTST_CONCURRENT_PRG_AR.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE



Sunday, December 6, 2015

Download file from Server in OA Framework

To download a file from server location.

In controller class call downloadFileFromServer method on any event.

//on button click in process form request
//call this method
            downloadFileFromServer(
                        pageContext,--pagecontext
                        "/xx/xxx/ssss/120devg.pdf",--full file path with file name and ext
                        "120devg.pdf" --file name with extension
            );


After process form request copy below methods in controller class,

/**
* @param pageContext the current OA page context
* @param file_name_with_path - this is fully qualified file name with its path on unix application
* server. eg "/xxcrp/xxapplcrp/mukul/abc.pdf"
* @param file_name_with_ext - this is file name with extension, you wanna display user
* for download. eg- i wanna display the abc.pdf file download with name five_point_someone.pdf
* then I can pass this as "five_point_someone.pdf"
*/
public void downloadFileFromServer(OAPageContext pageContext,
                                  String file_name_with_path,
                                  String file_name_with_ext) {
  HttpServletResponse response = (HttpServletResponse) pageContext.getRenderingContext().getServletResponse();
  if (((file_name_with_path == null) || ("".equals(file_name_with_path)))){
    throw new OAException("File path is invalid.");
  }

  File fileToDownload = null;
  try{
    fileToDownload = new File(file_name_with_path);
  }catch (Exception e){
    throw new OAException("Invalid File Path or file does not exist.");
  }

  if (!fileToDownload.exists()){
    throw new OAException("File does not exist.");
  }

  if (!fileToDownload.canRead()){
    throw new OAException("Not Able to read the file.");
  }

  String fileType = "application/pdf";
  response.setContentType(fileType);
  response.setContentLength((int)fileToDownload.length());
  response.setHeader("Content-Disposition", "attachment; filename=\"" + file_name_with_ext + "\"");

  InputStream in = null;
  ServletOutputStream outs = null;

  try{
    outs = response.getOutputStream();
    in = new BufferedInputStream(new FileInputStream(fileToDownload));
    int ch;
    while ((ch = in.read()) != -1){
      outs.write(ch);
    }
  }catch (IOException e){
    // TODO
    e.printStackTrace();
  }finally{
    try{
      outs.flush();
      outs.close();
      if (in != null){
        in.close();
      }
    }catch (Exception e){
      e.printStackTrace();
    }
  }
}




Source: http://mukx.blogspot.com/search?q=downloadFileFromServer

Oracle E-Business Suite | How to deploy cutom JAR file and use in OA Framework

There are two ways to deploy custom JAR file on Server.

Deploying on Custom path.


Steps :
1. Deploy your JAR file at some custom location in R12 server
i.e. –
/u01/app/apnac03r12/XX_TEST/

2. Open “orion-application.xml” file present at path –
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/

3. Edit “orion-application.xml” file to add JAR file path

i.e. –
<library path="/u01/app/apnac03r12/XX_TEST/jxl.jar" />


4. Bounce Apache Server




Deploying with Standard libraries.
 
Steps :
1. Place jxl.jar into

    $OA_HTML/WEB-INF/lib/


2. Bounce Apache Server