Last week we had some problems with the deployment of our ADF 11g applications on a stand alone WebLogic 11g (10.3.1) server. One of the issues that kept recurring during the deployment was a ClassCastException reffering to the ADFLogger class – that our application did not explicitly use. We got the impression that the ADF libraries that we rely on, somehow reference this internal class. The exception was just the first of potentially many indications of a WebLogic server lacking in ADF runtime readiness.
Here are some pointers as to the things that need to be ready in WLS 11g in order to ADF 11g application to be deployed and run:
- either during installation of WLS 11g or at some later point using the installation wizard, add the JRF 188.8.131.52 Java (and ADF 11g) Runtime Framework to the domain on which you want to deploy the ADF application (see: Extending WebLogic 11g for ADF applications by Lynn Munsinger)
- make sure to deploy the ADF application as an EAR file – not as a WAR file. The EAR file should contain the file weblogic-application.xml in its META-INF directory. This file should contain a library reference to the ADF Runtime library:
<library-ref> <library-name>adf.oracle.domain</library-name> <implementation-version>184.108.40.206.0</implementation-version> </library-ref>
you will find this file in JDeveloper under Application Resources in the Descriptors node. Note: deploying the application the application to an ear is done from the little dropdown menu that you can find right after the dropdown with a list of all applications currently open in IDE. You should not use the deploy option on the ViewController project – or whatever the name of your web application
- (this step is not yet entirely clear to me – I will describe my current understanding that has it working for us; we may be doing too many things or not entirely correct things; hopefully this can at least help you further along the road to successful deployment)
The managed server in the WebLogic domain to which you want to deploy the ADF application needs to be started with several special options, to activate the JRF (which included the ADF 11g runtime libraries).
The server should be started with these JVM options:
the classpath needs to include:
Note: these settings can be included in the setDomainEnv.cmd file in the same directory as the startManagedWebLogic.cmd script that you probably use for starting the managed server. In fact: I found these settings in the setDomainEnv.cmd file that was created for me during the installation of the SOA Suite 11g.
Deploying simple ADF application to WebLogic Server – weblog article by Lynn Munsinger