Can't access parameter of java concurrent program

I'm trying to access a parameter value in my rtf template from the PO Output for Communication program, which is a java concurrent program. In my template I put a field with:
<?param@begin:P_report_type?>
but when I reference the parameter using $P_report_type it is not populated with the value passed to the program. Does param@begin work with a java concurrent program, or only with an RDF?
Thanks,
Gary

Duplicate thread.
How to find code behind application
How to find code behind application

Similar Messages

  • How can i get the source code from java concurrent program in R12

    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    Zulqarnain

    user570667 wrote:
    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Java Concurrent Program not able to access class present under CLASSPATH

    We are creating a Java Concurrent Program which is using third party web service. The client classes for the webservice have been placed in a jar file. This jar file has been added to the SYSTEM CLASSPATH. When we try to run the concurrent program it fails with a ClassNotFoundException giving the name of the webervice client. The webservice clients are being used by other java classes from OAF as well. From there it is easily accessible.
    The request is being submit using a custom responsibility called RAC Quoting Admin. The user logged in has the corresponding responsibiility. The request is being submitted as a single request and there are no parameters being passed to the request.
    Here are the steps that we used to create the Oracle Concurrent Program:
    1. First of all we wrote a Java class that implements oracle.apps.fnd.cp.request.JavaConcurrentProgram
    rac.oracle.apps.qot.quote.batch.SFDCInterface implements JavaConcurrentProgram
    2. The concurrent program has a method called public void runProgram(CpContext pCpContext) which has the logic to be executed.
    3. Then we create a concurrent program executable
    Path: Concurrent -> Program -> Executable.
    Executable: RAC Quoting SFDC Sync Executable
    Short Name: RacQotSFDCSyncEx
    Application: Quoting
    Description: RAC Quoting SFDC Synchronization batch program
    Execution Method: Java Concurrent Program
    Execution File Name : SFDCInterface
    Execution File Path : rac.oracle.apps.qot.quote.batch
    4. Create the Concurrent Program
    Path: Concurrent -> Program -> Define
    Program: RAC Quoting SFDC Sync CP
    Short Name: RACQOTSFDCSYNCCP
    Application: Quoting
    Description: RAC Quoting SFDC batch Synchronization Concurrent Program
    Executable: Name - RacQotSFDCSyncEx; Method - Java Concurrent Program
    5. This concurrent program is registered with a custom responsibility from which we run this concurrent program.

    Please post the details of the application release, database version and OS.
    We are creating a Java Concurrent Program which is using third party web service. The client classes for the webservice have been placed in a jar file. This jar file has been added to the SYSTEM CLASSPATH. When we try to run the concurrent program it fails with a ClassNotFoundException giving the name of the webervice client. The webservice clients are being used by other java classes from OAF as well. From there it is easily accessible.Please post the contents of the concurrent request log file here. You may also enable trace and submit the request again and post the contents of the log file.
    The request is being submit using a custom responsibility called RAC Quoting Admin. The user logged in has the corresponding responsibiility. The request is being submitted as a single request and there are no parameters being passed to the request.
    Here are the steps that we used to create the Oracle Concurrent Program:
    1. First of all we wrote a Java class that implements oracle.apps.fnd.cp.request.JavaConcurrentProgram
    rac.oracle.apps.qot.quote.batch.SFDCInterface implements JavaConcurrentProgram
    2. The concurrent program has a method called public void runProgram(CpContext pCpContext) which has the logic to be executed.
    3. Then we create a concurrent program executable
    Path: Concurrent -> Program -> Executable.
    Executable: RAC Quoting SFDC Sync Executable
    Short Name: RacQotSFDCSyncEx
    Application: Quoting
    Description: RAC Quoting SFDC Synchronization batch program
    Execution Method: Java Concurrent Program
    Execution File Name : SFDCInterface
    Execution File Path : rac.oracle.apps.qot.quote.batch
    4. Create the Concurrent Program
    Path: Concurrent -> Program -> Define
    Program: RAC Quoting SFDC Sync CP
    Short Name: RACQOTSFDCSYNCCP
    Application: Quoting
    Description: RAC Quoting SFDC batch Synchronization Concurrent Program
    Executable: Name - RacQotSFDCSyncEx; Method - Java Concurrent Program
    5. This concurrent program is registered with a custom responsibility from which we run this concurrent program.Have you completed all the steps as per MOS docs? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Program&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Java Concurrent Program issue

    Hello,
    I am fairly new the Java Concurrent Programs concept. I was just trying a simple Hello World example but I cannot seem to run it from the operating system. Here is my Hello World java program I created using Jdeveloper:
    package oracle.apps.fnd.cp.request;
    public class Hello implements JavaConcurrentProgram {
    public static final String RCS_ID = "$Header$";
    public void runProgram(CpContext ctx) {
    ctx.getLogFile().writeln("-- Hello World! --", 0);
    ctx.getOutFile().writeln("-- Hello World! --");
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
    It compiles fine in Jdev generating the class file. Here is what I did :
    1) Created directory under $JAVA_TOP as follows :
    mkdir $JAVA_TOP/oracle/apps/fnd/cp/sample
    2) moved the Hello.java file there under sample directory
    3) compiled java file using avac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java ( It compiles fine generating the class file )
    4) Now I wanted to test running it : I tried using jre command first as I saw in other posts but this is not working :
    jre -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
    Error :
    ksh: jre: not found
    Then I tried using the other way I saw on posts which is using the java command :
    java -cp $AF_CLASSPATH -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
    This gives me the following error :
    java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/sample/Hello (wrong name: oracle/apps/fnd/cp/request/Hello)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Can anyone tell me what I am doing wrong ? I have tried everything even tried ftp the class file from my local but I get the same error. Any help would be appreciated.
    Thanks

    Ajay,
    Yes you are right. I did not register my java program yet in the concurrent programs.
    I thought I could test it out from the operating system command line before registering it. But looking at your document you sent me it seems I have to do all the steps i.e. define concurrent program etc before I can test it from the operating system. If that's the case then what's the use of trying to test it via operating system using
    java -cp $AF_CLASSPATH -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
    Thanks
    Syed

  • Invoke Java Concurrent program from PL/ SQL

    Hi Experts,
    I 've a requirement to invoke a Java Concurrent program form PL/ SQL. I 've defined default values for some of the parameters in the Java Concurrent program definition and some parameters do not have a default value. I would like to provide only the mandatory attributes that do not have a default value set from my PL/ SQL code. Can you please suggest how this can be achieved?
    I tried giving null for those attributes. But, the java program takes a "" value instead of the default values. Any inputs here will be immensely helpful.
    Thanks,
    Ganapathi

    Updating the correct format to be used for reference:
    The correct format is:
    fnd_request.submit_request(
    application => 'PDT_CODE',
    program => 'PGM_NAME', --program IN varchar2 default NULL,
    start_time=> SYSDATE, --start_time IN varchar2 default NULL,
    sub_request => FALSE, --sub_request IN boolean default FALSE
    argument1 => rowdata,
    argument2 => xxx
    Note: the parameter name should be "argument1...n" (and not the actual argument name).
    But I noticed that for parameters that are missed out, the default values still do not take effect. Can anyone please confirm this behavior?
    Thanks,
    Ganapathi

  • Handling exceptions in EBS Java concurrent program

    Hi,
    I want to do exception handling in Java concurrent program, is there any standard set of exceptions already provided by EBS for concurrent programs or should I create my own Exception class for exception handling.
    Thanks!

    Hi Kashif, Thanks for replying.
    I am creating a Java concurrent program in EBS by implementing the interface - oracle.apps.fnd.cp.request.JavaConcurrentProgram
    EBS Version - 12.1.3
    DB - Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit
    OS - Oracle Linux Server release 6.2
    Also can I create a properties file to store messages and access the file from my concurrent program.
    Thanks!

  • Unable to import the package for java concurrent program

    Hi all
    i m trying to work on java concurrent program ,but when i tried to import these classes
    import oracle.apps.fnd.cp.request.CpContext;
    import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
    the compiler is throwing
    cannot access class oracle.apps.fnd.cp.request.CpContext; file oracle\apps\fnd\cp\request\CpContext.class not found
    it is not giivng the cp package
    please can somebody have idea ,what could be the reason .
    thanx in advance
    regards
    pratap

    Pratap,
    Please download the cpcontext files whose package structure is oracle.apps.fnd.cp.request.CpContext
    from the google or other search sites or download it from application unix server $JAVA_TOP/oracle/apps/fnd/cp/request/CPContext .
    If it is a class file then convert it to java file by using java decompiler.
    then plalce the file respective folder by creating folder of this name. e.g. if
    the package structure is oracle.apps.fnd.cp.webui the create folders in myproject folder in jdeveloper
    oracle, then under oracle folder cretae aapps folder and so on...
    Thanks,
    Kumar

  • Java.lang.OutOfMemoryError when running java concurrent program

    Hi,
    i had written a java concurrent program to create the content items into Oracle Content Manager (OCM). Process the records from interface table and create the content items into OCM by calling the API IBC_CITEM_ADMIN_GRP.upsert_item().
    I run the concurrent program with 2000 records in interface table, it's an one to one process, 563 records are processed and 563 content items are created successfully in OCM. After 563 records continuously throws the Exception
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EX - bundle validation others--');
    x_return_status := FND_API.G_RET_STS_ERROR;
    FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_ERROR');
    FND_MESSAGE.set_token('SITUATION', 'VALIDATION');
    FND_MSG_PUB.ADD;
    IF IBC_DEBUG_PVT.debug_enabled THEN
    IBC_DEBUG_PVT.end_process(
    IBC_DEBUG_PVT.make_parameter_list(
    p_tag => 'OUTPUT',
    p_parms => JTF_VARCHAR2_TABLE_4000(
    'x_return_status', '*** EXCEPTION *** [' || SQLERRM || ']'
    END IF;
    in IBC_CITEM_ADMIN_GRP.validate_attribute_bundle() API.
    Again running the concurrent program it process another 563 records. Can any one help me to fix this issue?
    i figured out the exception. When debug the error, i got the actual error message like this
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ArrayIndexOutOfBoundsException: -2048 < 0
    for this issue i increased the heap memory size up to 1024MB. Still i have the same issue. Can any one help to fix the issue?

    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.ArrayIndexOutOfBoundsException:
    -2048 < 0Aren't the null pointer and arrayindexoutofbounds, the ones which you get when you are trying to read beyond your array? (example: when your loop tries to access the 563rd element in your array, since your array index starts from 0)?
    May be if you can try to write out your elements in the array, you might see what it is croaking about.
    Thanks,
    Chiru

  • NoClassDefFoundError for Java Concurrent Program in Oracle Apps

    Hi,
    I am accessing the Oracle Apps application which is installed in local server(Within the network).
    I am trying to execute Java Concurrent Program in oracle apps (in Windows XP Professional). I did the following.
    1. Created the concurrent program executable with Execution file name
    as AvailableProg and Execution File Path as
    oracle.apps.fnd.cp.request (this is where AvailableProg resides)
    and Method as Java Concurrent Program.
    2. Created the concurrent program and set the Options as -cp JAVA_CON.
    3. Created a environment variable JAVA_CON (In Windows XP) with the
    values D:\apps.zip and
    D:\oracle.apps.fnd.cp.request.AvailableProg.class.
    4. Registered the concurrent program.
    5. While I submitted the request I got the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    oracle/apps/fnd/cp/request/Run.
    Can anybody help me in resolving this issue?
    Is there any documents available in executing java concurrent programs?
    Please do the needful..
    Thank You....

    Hi
    I am having the same issues. Here are the setup I have for all the variables:
    $ echo $AF_CLASSPATH
    /u001/oracle/deltacomn/util/jre/1.1.8/lib/rt.jar:/u001/oracle/deltacomn/util/jre/1.1.8/lib/i18n.jar:/u001/oracle/deltacomn/java/appsborg.zip:/u001/oracle/deltaora/8.0.6/forms60/java:/u001/oracle/deltacomn/java
    $ echo $JAVA_TOP
    /u001/oracle/deltacomn/java
    $ echo $AFJVAPRG
    /u001/oracle/deltacomn/util/jre/1.1.8/bin/jre
    $ echo $CLASSPATH
    /u001/oracle/deltacomn/util/jre/1.1.8/lib/rt.jar:/u001/oracle/deltacomn/util/jre/1.1.8/lib/i18n.jar:/u001/oracle/deltacomn/java/appsborg.zip:/u001/oracle/deltaora/8.0.6/forms60/java:/u001/oracle/deltacomn/java:/u001/oracle/deltaappl/ncr_custom/ncrx/1.0.0/java
    Please help.
    Thanks
    AE

  • Java Concurrent Program - connecting to MS SQL Server

    Hi,
    I hope this is correct forum to post this question.
    I am writing a JCP which will connect to a MS SQL Server DB, pull data from a table and populate this data into a custome table in EBS (R12.1.1) database. But I am facing some issues.
    When I run run this concurrent program from EBS, I get following exception message:
    Wed Aug 08 01:18:04 GMT 2012: In openConection()
    Wed Aug 08 01:18:04 GMT 2012: Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: openConection() ClassNotFoundException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: Before Calling processPrintMachineRecords()
    Wed Aug 08 01:18:04 GMT 2012: Exception:: java.lang.NullPointerException
    Wed Aug 08 01:18:04 GMT 2012: In closeSQLServerConnection().......closing JDBC Connection
    Wed Aug 08 01:18:04 GMT 2012: Connection object was null, hence skipping close
    Wed Aug 08 01:18:04 GMT 2012: After Calling processPrintMachineRecords()
    The I read somewhere on internet that I should set CLASSPATH in options field of concurrent program definition. So I provided classpath as follows:
    -cp /rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/apps.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/sqljdbc_4.0/enu/sqljdbc.jar
    In this classpath sqljdbc.jar contains the classes for connecting to MS SQL Server DB. However after giving classpath like this I started getting different error:
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/request/Run
    Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.cp.request.Run
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    It appears from the error message that after giving this CLASSPATH, program was not able to find the "Run" method itself. In otherwords, CLASSPATH screwed it further.
    Can anybody please point out what am I doing wrong here?
    Regards
    Java Code:
    package oracle.apps.custom.printmachine;
    import java.sql.*;
    import oracle.apps.fnd.cp.request.* ;
    import java.io.*;
    import oracle.apps.fnd.util.*;
    public class PrintMachineInterface implements JavaConcurrentProgram {
    public static final String M_SUCCESS = "SUCCESS";
    public static final String M_ERROR = "ERROR";
    public static final String M_WARNING = "WARNING";
    int mRequestStatus = -1;
    int max_number_of_records = 99999999;
    private String mSqlServerHost = "mysqlserver.domain.com";
    // Application Short Name
    private String applName;
    CpContext mCtx;
    LogFile logFile;
    OutFile outFile;
    Connection mConn = null;
    ReqCompletion lRC;
    public PrintMachineInterface(){
    // if no parameter value is specified for APPLNAME then use FND
    //as default value
    applName = "FND";
    private void logMessage(String str) {
    java.util.Date now = new java.util.Date();
    logFile.writeln(now.toString() + ": " + str, LogFile.STATEMENT);
    static String mInsertRecord = " Declare " + " BEGIN "
    + " INSERT INTO XXGFN_GBL_CE_PM_STAGE(ID, KEY, FILENAME, PRINTED_AT, CREATED_AT, DOCTYPE, LANGUAGE, OU, TRX_ID, DOC_ID, REQ_ID, TEMPLATE, PAGES, DOC_TEXT, TIMES_RECEIVED)"
    + " VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, substr(:14,2000), :15);"
    + " COMMIT;"
    + " END;";
    static Connection con = null;
    public void openConection() {
    logMessage( "In openConection()");
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    public void closeSQLServerConnection() {
    try {
    logMessage( "In closeSQLServerConnection().......closing JDBC Connection");
    if (con != null)
    logMessage( "Con is not null");
    con.close();
    logMessage( "Con Closed Successfully");
    else
    logMessage( "Connection object was null, hence skipping close");
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    } catch (Exception ex) {
    logMessage("Exception in closeSQLServerConnection() : " + ex);
    private void populate_staging_table(
    String p_id,
    String p_key,
    String p_filename,
    String p_printed_at,
    String p_created_at,
    String p_doctype,
    String p_language,
    String p_ou,
    String p_trx_id,
    String p_doc_id,
    String p_req_id,
    String p_template,
    String p_pages,
    String p_doc_text,
    String p_times_received
    PreparedStatement lStmt = null;
    logMessage("Populating data from PrintMachine history table");
    try {
    lStmt = mConn.prepareCall(mInsertRecord);
    lStmt.setString(1, p_id);
    lStmt.setString(2, p_key);
    lStmt.setString(3, p_filename);
    lStmt.setString(4, p_printed_at);
    lStmt.setString(5, p_created_at);
    lStmt.setString(6, p_doctype);
    lStmt.setString(7, p_language);
    lStmt.setString(8, p_ou);
    lStmt.setString(9, p_trx_id);
    lStmt.setString(10, p_doc_id);
    lStmt.setString(11, p_req_id);
    lStmt.setString(12, p_template);
    lStmt.setString(13, p_pages);
    lStmt.setString(14, p_doc_text);
    lStmt.setString(15, p_times_received);
    lStmt.execute();
    lStmt.close();
    } catch (SQLException s) {
    logMessage("Exception thrown w/ error message: "
    + s.getMessage());
    s.printStackTrace();
    finally {
    try {
    if (lStmt != null)
    lStmt.close();
    } catch (SQLException e) {
    logMessage("SQLException: " + e);
    private void processPrintMachineRecords() {
    int number_of_recs = 0;
    try {
    PreparedStatement stmt = con.prepareStatement("SELECT TOP 1000 ID, Key, Filename, PrintedAt, CreatedAt, Doctype, Language,OU, TransactionID, DocumentID, RequestID, Template, Pages, Documenttext, TimesReceived FROM PM_DATA.dbo.History" );
    ResultSet rst = stmt.executeQuery();
    while (rst.next()) {
    number_of_recs++;
    if (number_of_recs == max_number_of_records) break;
    populate_staging_table(
    rst.getString(1), rst.getString(2)
    ,rst.getString(3), rst.getString(4)
    ,rst.getString(5), rst.getString(6)
    ,rst.getString(7), rst.getString(8)
    ,rst.getString(9), rst.getString(10)
    ,rst.getString(11), rst.getString(12)
    ,rst.getString(13), rst.getString(14)
    ,rst.getString(15)
    stmt.close();
    rst.close();
    mConn.commit();
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    catch (Exception ex) {
    logMessage("Exception:: " + ex);
    closeSQLServerConnection();
    public void runProgram(CpContext pCpContext) {
    applName = "XXGFN";
    String l_file_path = null;
    mCtx = pCpContext;
    //get handle on request completion object for reporting status
    lRC = pCpContext.getReqCompletion();
    // assign logfile
    logFile = pCpContext.getLogFile();
    // assign outfile
    outFile = pCpContext.getOutFile();
    // get the JDBC connection object
    mConn = pCpContext.getJDBCConnection();
    l_file_path = ((new File(outFile.getFileName())).getParent() == null ? ""
    : (new File(outFile.getFileName())).getParent());
    // get parameter list object from CpContext
    ParameterList lPara = pCpContext.getParameterList();
    while (lPara.hasMoreElements())
    NameValueType aNVT = lPara.nextParameter();
    if ( aNVT.getName().equals("APPLNAME") )
    applName = aNVT.getValue();
    /** openConection() Opens the connection to SQL Server Database*/
    openConection() ;
    logMessage("Before Calling processPrintMachineRecords()");
    processPrintMachineRecords();
    logMessage("After Calling processPrintMachineRecords()");
    try{
    setCompletion(ReqCompletion.NORMAL, "Request Completed Normal");
    } catch (Exception e) {
    setCompletion(ReqCompletion.ERROR, e.toString());
    } finally {
    pCpContext.releaseJDBCConnection();
    * Sets the request completion status based on proper precedence. ERROR >
    * WARNING > NORMAL
    * @param pStatus
    * Status of the request.
    * @param pCompletionText
    * Request's completion text.
    public void setCompletion(int pStatus, String pCompletionText) {
    if ((pStatus == ReqCompletion.ERROR)
    || ((pStatus == ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))
    || ((pStatus == ReqCompletion.NORMAL)
    && (mRequestStatus != ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))) {
    mRequestStatus = pStatus;
    lRC.setCompletion(pStatus, pCompletionText);
    }

    ok
    i used Template.java as input
    useful MOS:
    How To Create a Java Concurrent Program? [ID 827563.1]
    Java Concurrent Program FAQ [ID 827575.1]
    i used
    //goto ms sql server 2008r2       
            try{
             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");        
             con = java.sql.DriverManager.getConnection( 
                                          "jdbc:sqlserver://1.2.3.4:1433;databaseName=test;selectMethod=cursor", 
                                          "test", "test");          
              if(con!=null) System.out.println("Connection Successful!");
            }catch(Exception e){
              e.printStackTrace();
              System.out.println("Error Trace in getConnection() : " + e.getMessage());
            }1.2.3.4 - ip of instance with sqlserver2008r2 :)
    in your code
    >
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    >
    try my case for Driver and Connection
    put result .class file to needed directory
    put sqljdbc4.jar to /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib
    and for concurrent program option
    -classpath /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes:/rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib/sqljdbc4.jaralso useful mos:
    Classpath Setting of Third Party Jar Files in R12 Java Concurrent Program (JCP) [ID 1292694.1]

  • Issue in Java concurrent program for Digital Signature Stamping

    Hi All,
    Im calling a Java concurrent program which does digital signature stamping on the PDF report generated.Program able to able to read the PDF file as input and also digital signature stored as file in the application but
    ends in error in create signature method , need help in this regard.
    Error:
    Parameter 0 is Request id of with out Digital signature file
    Parameter 1 is employee id of approver
    Parameter:0:99203256
    Parameter:1:1414603
    $$$$ start query fileinfo with callable statment
    programName>>>>>>>>BTPOPORPXML
    $$$$ Without digital Signature file Name $$$
    $/inst_top/finprod/apps/FINPROD_CPNQERPAAPZP10/logs/appl/conc/out/BTPOPORPXML_99203256_1.PDF
    PFX File Reading Start
    PFX File Reading Ends
    PFX File size is: 6460 Byte size is: 6460
    Elements present
    java.lang.NullPointerException
    at
    com.lowagie.text.pdf.PdfSignatureAppearance.getAppearance
    (Unknown Source)
    at
    com.lowagie.text.pdf.PdfSignatureAppearance.preClose
    (Unknown Source)
    at
    com.lowagie.text.pdf.PdfSignatureAppearance.preClose
    (Unknown Source)
    at com.lowagie.text.pdf.PdfStamper.close(Unknown
    Source)
    at
    btvl.oracle.apps.po.digsig.BTVLDigSign.runProgram
    (BTVLDigSign.java:151)
    at oracle.apps.fnd.cp.request.Run.main
    (Run.java:157)
    Edited by: 999033 on May 16, 2013 7:20 PM

    Hi Charls,
    I have successfully implemented at our end in 11i. Pl.try at your end.
    v_request_id := FND_REQUEST.SUBMIT_REQUEST (passed your arguments... );
    COMMIT;
    IF NVL( v_request_id , 0 ) = 0 THEN
    DBMS_OUTPUT.PUT_LINE( 'Item Assignment to Organization Program Not Submitted');
    p_status := 'FAILURE' ;
    p_err_msg := 'ERROR RAISED AFTER SUBMITTING THE IMPORT ITEM ORG.ASSIGNMENT CONCURRENT REQUEST ... ' ;          
    ELSE
    v_finished := FND_CONCURRENT.WAIT_FOR_REQUEST
    request_id => v_request_id,
    interval => 0,
    max_wait => 0,
    phase => v_phase,
    status => v_status,
    dev_phase => v_request_phase,
    dev_status => v_request_status,
    message => v_message
    LOOP
    EXIT WHEN ( UPPER(v_request_phase) = 'COMPLETE' OR v_phase = 'C');
    END LOOP;
    HTH                    
    Sanjay

  • How to call a BPEL process from Oracle Apps Java Concurrent program

    Hello,
    I need to trigger a BPEL process from Oracle Apps. Can anybody tell me how to do that? I have two triggering option--
    1. On button click from a Form 6i screen
    2. Using Java Concurrent program.
    Thanks in advance.
    Debkanta

    I am not sure how concurrent program works, but may be one of the way might work out, let me know if Java Concurrent Program works a bit different way
    - [if async] Through concurrent program, you can insert message token to db or aq, and BPEL can be instantiated from there
    or
    - If it supports pure java call, then you can look at multiple documents (e.g. http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial7-InvokingBPELProcesses.pdf) to invoke your process
    - You can also use oracle db utility to invoke soap operation and get the result back
    HTH,
    Chintan

  • Sourcing : Error while Running Java Concurrent Program

    Hi All,
    Navigations:
    Application: Sourcing
    Responsibility : Sourcing Buyer
    Concurrent Program : Generate and Store Sourcing response spreadsheet
    I am trying to run
    Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
    it completed with Error status.
    Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
    Please provide resolution on this.

    Thanks for your reply..
    Program: Generate and Store Sourcing response spreadsheet
    ShortName: PON_EXPORT_RESPONSE
    Application: Sourcing
    Executable: ExportResponseCp
    Method: Java Concurrent Program
    Responsibility : Sourcing Buyer.
    Has this ever worked? If yes, any changes been done recently?
    => No
    Is this the seeded concurrent program or a custom one?
    => Its seeded program.
    EBS: R12.1.3
    Login as Sourcing Buyer Responsibility :
    When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
    But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
    Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
    Thanks..

  • Java Concurrent Program .class file location

    Hi frnds,
    I need to know the .class file location of a java concurrent prog. I know the filename from concurrent program executables and my concurrent program filepath is oracle.apps.xxogl.f04.cp.file. But I dont know where the exact location of the file is. pls help me.
    I searched for the same and found the following article in many places which doesnt seem to help me much.
    http://geektalkin.blogspot.com/2008/03/oracle-apps-java-concurrent-program.html
    pls help. thanks in advance.
    Lisan

    Hi;
    pls file can be found like
    /apps_st/appl/bom/12.0.0/patch/115/sql/
    Contains SQL*Plus scripts used to upgrade data, and .pkh, .pkb, and .pls scripts to create PL /SQL stored procedures.
    Regard
    Helios

  • Java concurrent program class not found Exception in oracle apps

    Hi all,
    I done java concurrent program as per steps given by oracle.I am getting class not exception when i am submitting that concurrent program.
    My java file is under $JAVA_TOP specified folder.Those path from $JAVA_TOP i set in apps (System Adminstrator -->Executable) Execution file path.Can any body have faced this issue?
    Thanks

    Also go through the metalink Note:250964.1
    It goes through the complete process of creating a sample java conc process and implementing it.
    --Shiv                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for