Finding path of java concurrent program
Hi All
I am working with iRecruitment Recruiter responsibility.
Here I can create new vacancies.
After creating vacancies they should approved by one manager
When I create vacancy and submit that vacancy for approval
It stored in one table hr_api_transactions.
and when manager approved that particular vacancy then that vacancy
stored in another table per_all_vacancies.
But problem is that vacancy which stored in hr_api_transactions table
it removes from that table.
I want know who transfer that vacancy's information from hr_api_transactions to per_all_vacancies table resp.
I think there is some java concurrent program who transfers vacancy's information from one table to another table.
if there is no java concurrent program, then who do that work?
Duplicate thread.
How to find code behind application
How to find code behind application
Similar Messages
-
Error finding/creating AM from Java Concurrent Program
Hi All,
Here is what I am attempting to do in a Java concurrent program
--------------- Code Start - Error description in the code snippet comments ---------------
public void runProgram(CpContext pCpContext)
DBTransactionImpl mDBTransactionImpl
= new DBTransactionImpl(pCpContext.getJDBCConnection());
OAApplicationModule am = null;
// At this point I tried to call various methods on DBTransactionImpl
// And each method call, causes the CP to error with a different exception
// Calling findApplicationModule() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.findApplicationModule(DBTransactionImpl.java:4840)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:101)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
am = mDBTransactionImpl.findApplicationModule(IMPORT_UNITS_AM_INS);
// Calling createApplicationModule() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.createApplicationModule(DBTransactionImpl.java:4954)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:109)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
am = mDBTrx.createApplicationModule( IMPORT_UNITS_AM_INS
,IMPORT_UNITS_AM_DEF);
// Calling isConnected() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.isConnected(DBTransactionImpl.java:4335)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:65)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
if (mDBTransactionImpl.isConnected())
// Log the fact that DBTrx is connected
--------------- Code End - Error description in the code snippet comments ---------------
Would someone be kind enough to tell me what is it that I am doing wrong here?
Thanks a ton!
KH
Message was edited by: Kiran
kiran.k.hegdeKiran,
How did you convert/cast the CpContext into an AppsContext to supply to createRootAM?
Would you maybe share some more code?
Update
No need for that, a simple
public void runProgram( CpContext ctx )
String amName;
String methodName;
OAApplicationModuleFactory amF = new OAApplicationModuleFactory();
OAApplicationModule am = amF.createRootOAApplicationModule( ctx, amName );
am.invokeMethod( methodName );
will do...
Message was edited by:
TyskJohan -
How to get Source code of a Schedular Java concurrent program in Payments
Hi Experts,
I am very new to Java Concurrent program.
I need java source code of a schedule java concurrent program.Following are the details of Executable.
Executable :Format Payment Instructions
Short Name :IBY_FD_PAYMENT_FORMAT
Application : Payments
Execution Method :Java Concurrent Program
Execution File Name:FDExtractAndFormatting
Execution File Path : oracle.apps.iby.scheduler
I searched in execution file path,but i am unable to find required java source.
Please someone help regarding this issue..
It's Urgent Issue.
Regards
AmarHi Srini,
Thanks for reply...
In the attached template of concurrent program "Format Payment Instructions", i need to add voucher number in the template.
How can i do this?how to decompile the executable?
It is a check printing.
Please give me suggestions..
Regards
Amar -
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 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?
ThanksAlso go through the metalink Note:250964.1
It goes through the complete process of creating a sample java conc process and implementing it.
--Shiv -
How to integrate a class with template.java - Java Concurrent Program. 11i
Hello, I have a java class I got from a vendor. This java class needs to run through as concurrent program. As per metalink note *How To Create a Java Concurrent Program? [ID 827563.1]* it says that, we must require template.java to wrap around the custom class. I have done that in the following java code. However, being a new java guy, I really dont know how to connect these two classes and constructor.
Any suggestions about how do I make these classes work in order to run from a concurrent program?
package oracle.apps.fnd.cp.request;
import oracle.apps.fnd.util.*;
import oracle.apps.fnd.cp.request.*;
import java.io.BufferedReader;
import java.io.IOException;
import javax.net.ssl.SSLSocketFactory;
public class cyberBatch implements JavaConcurrentProgram {
// Optionally provide class constructor without any arguments.
// If you provide any arguments to the class constructor then while running the program will fail.
public void runProgram(CpContext pCpContext) {
ReqCompletion lRC = pCpContext.getReqCompletion();
String CompletionText = "";
// This class is to upload files but can be expanded to download files also.
public class SSLFileTransfer {
Properties props =
new Properties(); // stores properties from property file
* SSLFileTransfer(): constructor
public SSLFileTransfer() {
* init(): initialization (load property file)
* @param propsFile properties needed for file transfer
public void init(String propsFile) {
try {
props.load(new BufferedInputStream(new FileInputStream(new File(propsFile))));
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);
* usage()
public static void usage() {
System.out.println("USAGE: java SSLFileTransfer <full path property file name>");
System.exit(-1);
* getFactory(): get factory for authentication
* @throws IOException if exception occurs
private SSLSocketFactory getFactory() throws IOException {
try {
SSLContext ctx;
KeyManagerFactory kmf;
KeyStore ks, ks1;
char[] passphrase =
props.getProperty("passPhrase").toCharArray();
ctx = SSLContext.getInstance("TLS");
kmf = KeyManagerFactory.getInstance("SunX509");
ks = KeyStore.getInstance("PKCS12", "BC");
ks1 = KeyStore.getInstance("JKS");
ks.load(new FileInputStream(props.getProperty("key")),
passphrase);
ks1.load(new FileInputStream(props.getProperty("keyStore")),
passphrase);
kmf.init(ks, passphrase);
TrustManagerFactory tmf =
TrustManagerFactory.getInstance("SunX509");
tmf.init(ks1);
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
return ctx.getSocketFactory();
} catch (Exception e) {
e.printStackTrace();
throw new IOException(e.getMessage());
* getHost(): Get host from property file
private String getHost() {
return props.getProperty("host", "localhost");
* getPort(): Get port from property file
private int getPort() {
return Integer.parseInt(props.getProperty("port"));
* sendRequest(): Send request (file) to the server
* @param out stream to send the data to the server
* @throws Exception if an error occurs.
private void sendRequest(PrintWriter out) throws Exception {
String path = props.getProperty("path");
out.println("POST " + path + " HTTP/1.0");
final String BOUNDARY = "7d03135102b8";
out.println("Content-Type: multipart/form-data; boundary=" +
BOUNDARY);
String uploadFile = props.getProperty("uploadFile");
String authString =
props.getProperty("bcUserName") + ":" + props.getProperty("bcPassword");
String encodedAuthString =
"Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes());
out.println("Authorization: " + encodedAuthString);
final String CRLF = "\r\n";
StringBuffer sbuf = new StringBuffer();
sbuf.append("--" + BOUNDARY + CRLF);
sbuf.append("Content-Disposition: form-data; name=\"upfile\"; filename=\"" +
uploadFile + "\"" + CRLF);
sbuf.append("Content-Type: text/plain" + CRLF + CRLF);
FileReader fi = new FileReader(uploadFile);
char[] buf = new char[1024000];
int cnt = fi.read(buf);
sbuf.append(buf, 0, cnt);
sbuf.append(CRLF);
sbuf.append("--" + BOUNDARY + "--" + CRLF);
int sz = sbuf.length();
out.println("Content-Length: " + sz);
out.println();
out.println(sbuf);
out.flush();
// Make sure there were no surprises
if (out.checkError())
System.out.println("SSLFileTransfer: java.io.PrintWriter error");
* readResponse(): reads response from the server
* @param in stream to get the data from the server
* @throws Exception if an error occurs.
private void readResponse(BufferedReader in) throws Exception {
boolean successful = false;
String inputLine;
while ((inputLine = in.readLine()) != null) {
if (inputLine.startsWith("HTTP") &&
inputLine.indexOf("200") >= 0)
successful = true;
System.out.println(inputLine);
System.out.println("UPLOAD FILE " +
(successful ? "SUCCESSFUL" : "FAILED") +
"!!!\n");
* upload(): upload file to server
* @throws Exception if an error occurs.
public void upload() throws Exception {
try {
SSLSocketFactory factory = getFactory();
SSLSocket socket =
(SSLSocket)factory.createSocket(getHost(), getPort());
PrintWriter out =
new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())));
BufferedReader in =
new BufferedReader(new InputStreamReader(socket.getInputStream()));
socket.startHandshake();
sendRequest(out);
readResponse(in);
out.close();
in.close();
socket.close();
} catch (Exception e) {
e.printStackTrace();
throw e;
* main(): main method to start file transfer
* @param args command line arguments (property file, see usage())
* @throws Exception if an error occurs.
public static void main(String[] args) throws Exception {
if (args == null || args.length != 1)
usage();
SSLFileTransfer fileXfer = new SSLFileTransfer();
fileXfer.init(args[0]);
fileXfer.upload();
lRC.setCompletion(ReqCompletion.NORMAL,CompletionText) ;
}Thanks,
RI believe the OP is aware of this :) -- Re: Oracle 11i - 11.5.10.2 - and Java
Thanks,
Hussein -
How to Compile & Deploy the Java Concurrent Program File
Hi,
There is a requirement to create the Java Concurrent Program in Oracle eBusiness. I am able to create the Java Concurrent Program file. But unable to do the following things:
1.Since it is custom file, which location I will deploy the file?
2. How to compile the file?
3. In the execution file path and executable file name what should I specify for JCP?
Please guide me.
ThanksPlease see (How to register and execute Java Concurrent Program ?in Oracle Applications R11i ? [ID 186301.1]) for the complete steps (i.e. define concurrent program and add it to the request group, .etc.) -- This is also applicable to R12.
You may also see:
Classpath Setting of Third Party Jar Files in R12 Java Concurrent Program (JCP) [ID 1292694.1]
Integrating Custom Applications with Oracle Applications [ID 176852.1]
Java Concurrent Program FAQ [ID 827575.1]
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 -
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,
GaryDuplicate thread.
How to find code behind application
How to find code behind application -
Question related to Java Concurrent Program
Hi Friends,
I have a basic question related to Java Concurrent Program in the Oracle application. I would like to know the how Java concurrent program is executed in Oracle applications.Also, want to know where can I find the document for the AOL packages for Java concurrent program. Document for packages like oracle.apps.fnd.cp.request.* , oracle.apps.fnd.util.*.
Please let me know.
-Thanks,
SatyaYou may also check:
Note: 250964.1 - How to Register Sample Java Concurrent Program
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=250964.1
Note: 186301.1 - How to register and execute Java Concurrent Program ?in Oracle Applications R11i?
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=186301.1 -
Testing Java Concurrent Program on the command line in Windows
I'm using the suggestions in:
http://blogs.oracle.com/xmlpublisher/2007/05/02
to test my Java concurrent program on the command line. Our production environment is running on Unix. I've been able to test it successfully on the Unix environment from the command line. However, it fails when I try to test it on the Windows command line with the following stack trace:
Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps
.jtf.base.resources.FrameworkException: IAS Cache initialization failed
at oracle.apps.jtf.cache.IASCacheProvider.init(IASCacheProvider.java:225
at oracle.apps.jtf.cache.CacheManager.activateCache(CacheManager.java:14
44)
at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:752)
at oracle.apps.jtf.cache.CacheManager.<clinit>(CacheManager.java:378)
at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
at oracle.apps.fnd.cache.Cache.<init>(Cache.java:89)
at oracle.apps.fnd.cache.AppsCache.<init>(AppsCache.java:86)
at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
at oracle.apps.fnd.profiles.Profiles.<clinit>(Profiles.java:241)
at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileSto
re.java:498)
at oracle.apps.fnd.profiles.ExtendedProfileStore.<init>(ExtendedProfileS
tore.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContex
t.java:4312)
at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:
1171)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:970)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:952)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
:958)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
:918)
at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:752)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
Caused by: oracle.apps.jtf.base.resources.FrameworkException: null
null
CacheDefaultConfig.properties (The system cannot find the file specified)
at oracle.apps.jtf.base.resources.FrameworkException.convertException(Fr
ameworkException.java:607)
at oracle.apps.jtf.base.resources.FrameworkException.addException(Framew
orkException.java:585)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
eption.java:66)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
eption.java:88)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
eption.java:202)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
eption.java:218)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
eption.java:249)
... 26 more
Exception in thread "main" oracle.adf.mds.exception.MDSRuntimeException: Cache n
ot initialized
at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(AT
GCacheMgrDelegateImpl.java:325)
at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCac
heFactoryImpl.java:44)
at oracle.apps.fnd.cp.request.CpContext.getMDSContext(CpContext.java:116
9)
at oracle.apps.fnd.cp.request.Run.main(Run.java:130)
I've put the appsborg2.zip file in my classpath. I've also copied the entire (1 GB) worth of Java .class files for Oracle apps onto my computer and placed it on my classpath. Is there something that prevents me from testing out my Java concurrent program on my Windows machine from the command line?i think if u run the ap in the command line then it has to stay open, you could try writing a .bat file then when that is executed it will only open the command line for the program execution (i think)
-
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] -
How to get the source code of Java Concurrent Program?
Hi,
How to get the source code of Java Concurrent Program?
Example
Programe Name:Format Payment Instructions
Executable:Format Payment Instructions
Execution File Name:FDExtractAndFormatting
Execution File Path:oracle.apps.iby.scheduler
Thanks in advance,
SenthilGo on Unix box at $JAVA_TOP/oracle/apps/iby/scheduler
You will get class file FDExtractAndFormatting.
Decompile it to get source code.
Thanks, Avaneesh -
Facing error wen running Java Concurrent Program to insert data into table
Hi All,
Its first time I am wrkng on Java Concurrent Programs. I created a java class with the below code:
import oracle.apps.fnd.cp.request.*;
import oracle.apps.iby.scheduler.*;
import java.sql.*;
import java.sql.Statement;
import java.sql.Connection;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.cp.request.CpContext;
import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
import oracle.apps.iby.database.DBWrapper;
import oracle.apps.iby.ecapp.OraPmt;
import oracle.apps.iby.exception.Log;
import oracle.apps.iby.security.SecurityUtil;
//package oracle.apps.ibe.util.key;
//package oracle.apps.iby.scheduler;
// Referenced classes of package oracle.apps.iby.scheduler:
// SchedUtils
public class XXIBE_KeyInsert
implements JavaConcurrentProgram
public XXIBE_KeyInsert()
public void runProgram(CpContext cpcontext)
try{
String s;
oracle.apps.fnd.cp.request.ReqCompletion reqcompletion;
Connection connection;
// s = "iby.scheduler.XXIBE_keyInsert.runProgram";
reqcompletion = cpcontext.getReqCompletion();
connection = null;
OraPmt.init(cpcontext);
Log.debug("Inserting Credit Card key", 1, "XXIBE_KeyInsert.java");
byte abyte0[] = SecurityUtil.getSystemKey();
connection = cpcontext.getJDBCConnection();
Statement st = connection.createStatement();
String sql = "Insert into xxibe_scodes values ("+abyte0+")";
st.executeUpdate(sql);
connection.commit();
st.close();
connection.close();
Log.debug("done", 1, "XXIBE_KeyInsert.java");
reqcompletion.setCompletion(reqcompletion.NORMAL, "Request Completed Normal");
OraPmt.end();
SchedUtils.setSuccess(reqcompletion);
DBWrapper.closeDBConnection(connection);
catch(Exception e){
e.printStackTrace();
//reqcompletion.setCompletion(ReqCompletion.ERROR, e.toString());
I compiled the program and in the java_top/oracle/apps/../.. (in the pkg given). Now the class files and java files are in the said location. I created an executable of type "java concurent Prog" and location same as Package name.
Created a Program and assigned it to the responsibility. Having done this when i run the CP I find it ends with an error msg. The log files show the below exceptions: "java.lang.ClassNotFound Exception".
We are doing it in R12.0.6 and in Unix server. Pls help me where I am missing it. It turned to be an urgent requirement frm my end.
Thanks,
Abhishek.The Exception Stack is :
java.lang.ClassNotFoundException: oracle.apps.iby.scheduler.test.XXIBE_KeyInsert
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:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at oracle.apps.fnd.cp.request.Run.main(Run.java:152).
Please advice me on how to proceed. -
How to run another concurrent from Java Concurrent Program?
Hi,
I have one Java Concurrent Program in ebs R12.
I need to run another Java Concurrent Program when first finished.
I can not find a way to start another request from JCP.
Thanks,
msHi ,
this is an example code to check the OS before running the command :
try{
int ch;
Process proc ;
Runtime r=Runtime.getRuntime();
StringBuffer sbuf = new StringBuffer();
String dir = new String();
String osname = System.getProperty("os.name");
if(osname.equals("Windows NT") )
proc = r.exec("cmd /c dir");
if(osname.startsWith("Linux") )
proc = r.exec("df -k");
InputStream is = proc.getInputStream();
while((ch=is.read() ) != -1)
sbuf.append((char)ch);
is.close();
dir = sbuf.toString();
System.out.println(dir );
}catch(Exception e){ System.out.println(e.getMessage());}
bye
Taha
Maybe you are looking for
-
Attached is a file of 3 trials of a drop vertical jump activity onto a force plate. the subject stands on a platform off the force plate, jumps onto the force place and immediately jumps up as if going for a rebound. I am able to run this data and
-
Retrieving Strings from Database query ??
Hi, The problem i'm having at the moment is, with the following code: connect = DriverManager.getConnection("jdbc:mysql://ash.bc.ic.ac.uk/KEGG_devel?user=null&password=guest"); Statement stmnt1 = connect.createStatement(); ResultSet rs1 = stmnt1.exec
-
Using extract function to reterieve tag value of XMLTYPE
Hi, I have table called DICOM_ARCHIVE,in whch metadata is a column of type XMLTYPE,now to reterive specific tag values from this column i use QUERY-1 QUERY-1 SELECT id, to_date(substr(a.metadata.extract('//DATE/text()').getStringVal(),1,10),'yyyy-mm-
-
Query is dispalying different output in BEX and Web
Hi, I am getting the correct output when i am running the standard query 0CQM_PCQMCCSI_Q0001 in the BEX analyzer.I am getting the wrong output if i run the same query through web. It is displaying the different key figure and characteristic in the ou
-
Colum Resizing problem in JTable
HI All, I am facing a problem with JTable while resizing the colum. when user clicks and drags to resize a column, the column width increases continuously till the mouse button is released. I am sure this sounds like a vague description, (eg) when I