Tuesday, March 24, 2009

Howto run ADF with a Node Manager


I am working now more and more with weblogic.
So I normally ran simple ADF web applications from JDeveloper.

Now I tried to deploy an ADF webapplication on a server running an AdminServer and a Managed Server set-up to be recovered by the node manager.
But during deploy the only error received is a "java.lang.ClassNotFoundException: "

Either on "oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener" or on "javax.faces.webapp.FacesServlet".

But when running the Managed Server from the commandline all seem to work fine..........

The catch is in the classpath.
The nodemanager is NOT using the same startup script as available in your domain directory (see further below).

So a change needs to be made to the nodemanager:
Add the following code in the <WLS_HOME>/server/bin/startNodeManger.sh (or .cmd).

ORACLE_HOME="/opt/products/oracle/WLS103/jdeveloper"
export ORACLE_HOME

ADF_CLASSPATH="${ORACLE_HOME}/modules/features/adf.share_11.1.1.jar"
export ADF_CLASSPATH

set -x
CLASSPATH="${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}${CLASSPATHSEP}${BEA_HOME}${CLASSPATHSEP}${ADF_CLASSPATH}"
export CLASSPATH

By doing so the start of a managed server is made ADF aware and therefor deployments will result in a deployment on a server that uses the nodemanager...

There is a second solution to this problem.
The nodemanager.properties can be adjusted.
The properties for start and stop scripts needs to be enabled.

StopScriptEnabled=true
StartScriptEnabled=true


By this the classpath is set through the scripts created when the domain is also created...