How to Set and Verify CLASSPATH Settings for the Concurrent Manager in R12.1.3
This document is describing how to change the CLASSPATH variable so that Concurrent Requests will use it properly and also how to verify what is the value of CLASSPATH for a particular concurrent request.
Where is the java classpath?
To see the current value of the CLASSPATH environment variable, open a terminal and type:
[appsqa@sujeet ~]$ echo $CLASSPATH
[appsqa@sujeet ~]$ echo $PATH
The JVM class loader will only find and use JAR archives that are listed in the classpath.
There are several ways to add a JAR to the classpath:
Copy the JAR to one of the directories listed in the CLASSPATH environment variable.
Another way of viewing the classpath is to run this Java code:
String classpath = System.getProperty("java.class.path");
System.out.println(classpath);
Modify the CLASSPATH environment variable to also include the directory containing the JAR archive.
In csh, the CLASSPATH environment variable is modified with the setenv command.
The format is:
setenv CLASSPATH path1:path2:...
In sh, the CLASSPATH environment variable can be modified with these commands:
CLASSPATH = path1:path2:...
export CLASSPATH
Set the classpath at runtime. There are several possible ways of doing this:
Use the -classpath option:
javac -classpath ".:/chilkatJava/chilkat.jar" Test.java
java -classpath ".:/chilkatJava/chilkat.jar" Test
Use the -Djava.class.path system property:
javac -Djava.class.path=.:/chilkatJava/chilkat.jar Test.java
java -Djava.class.path=.:/chilkatJava/chilkat.jar Test
IMPORTANT :- On Windows systems, the semicolon character should be used for the path separator.
However, on Linux systems, the colon character should be used.
1. Description of the CLASSPATH environment variable and the ways it can be used.
The CLASSPATH, being an environment variable, will differ depending on the environment, meaning the runtime environment of a particular process.
For example, if the CLASSPATH was set directly in a UNIX shell, then that would be the CLASSPATH echo'ed back within that shell and within any shell forked from that shell.
However, if CLASSPATH is set in a shell script file, then only processes running from within the context of that script will have that CLASSPATH.
In the Oracle Apps, there are a number of different runtime contexts.
One is the Apache - JServ - JSP engine which has it's CLASSPATH set in a file (usually jservctl, sometimes jserv.properties)
Another context is the Concurrent Manager where all Concurrent Processes are run. There is a separate script for running these, being as they are "concurrent" to the HTML stack. The script that starts up the Concurrent Manager is either adovars.env or some other file that calls adovars.env.
The adovars.env file has a separate setting of the CLASSPATH, since there may be different runtime requirements for Java classes for Concurrent Programs than for JSP pages.
The basic point is that the CLASSPATH is only valid within the runtime context for which it is set. Running the command "echo $CLASSPATH" only serves to tell you what the CLASSPATH is within the context from which you run the command.
2. Setting the CLASSPATH variable in the context of Concurrent Manager.
There are many places a CLASSPATH can be set. For Concurrent Programs, the important thing is that the file called adovars.env has the proper JDBC driver included in it's CLASSPATH.
For example: when using jdk1.1.8, this should be jdbc 8.0.6, for jdk1.2.2 or greater, it should be jdbc 8.1.6.2 or greater.
Since the Concurrent Manager uses adovars.env when running concurrent requests, this is the place where the CLASSPATH (and other environment variables) should be set correctly.
In case the CLASSPATH is not set correctly, the concurrent requests will end up with the following error: java.lang.NoClassDefFoundError.
It is crucially important that the entire Concurrent Manager be shutdown and restarted after changes were made to file adovars.env.
3. Verifying the value of CLASSPATH variable for a specific request.
To verify that the CLASSPATH change was successful, please follow the next steps:
1. Start a new concurrent request
2. Note the request id
3. Run the following query using the request id
select variable_name,
value
from fnd_env_context e,
fnd_concurrent_processes p,
fnd_concurrent_requests r
where p.concurrent_process_id = e.concurrent_process_id
and p.concurrent_process_id = r.controlling_manager
and e.variable_name='CLASSPATH'
and r.request_id = &REQUEST_ID
This will return the CLASSPATH being used by the concurrent request.
Reference id [ID 178766.1]
No comments:
Post a Comment