Sunday, May 1, 2011

Deploying ADF Faces Applications on Tomcat 6

After a bit of struggling with ADF Faces and Tomcat, I finally got them working together. The version of ADF Faces I am using for this is 11gR1 (11.1.1.4.0) and Tomcat 6.0.28. I don't know if it will work with 11.1.1.3.0 or other version of Tomcat but I will give it a shot in the near future.
What I've got working so far is only the ADF Faces and Data Visualization applications, with binding support (page definitions, taskflows, page templates etc.). I did not yet got into ADF BC and Security (JPS), but this is the next step.
While doing the experiment, I noticed that Oracle is preparing the grounds for adding JBoss support is their next release. They've added the WebSphere application server and it seems pretty logical that JBoss will be the next supported app server.

What you need to do, in order to use Tomcat to deploy ADF Faces is just copy the right JARs in Tomcat's lib folder and configure the JDeveloper web application (ViewController project) to be deployed as a WAR for Tomcat. You can do this by going to the Project Properties for the ViewController project, choose Deployment and there create a new WAR deployment profile and select Tomcat as the target application server. After this, just deploy the project to the war file and copy it to the webapps folder inside Tomcat.

Before starting the server, add the following JAR files to the lib folder inside Tomcat:

adf-controller.jar
adf-controller-api.jar
adf-controller-rt-common.jar
adf-controller-security.jar
adf-dt-at-rt.jar
adf-dynamic-faces.jar
adf-faces-changemanager-rt.jar
adf-faces-databinding-dt-core.jar
adf-faces-databinding-rt.jar
adf-faces-templating-dt-core.jar
adf-faces-templating-dtrt.jar
adflibfilter.jar
adflogginghandler.jar
adfm.jar
adfmweb.jar
adf-pageflow-fwk.jar
adf-pageflow-impl.jar
adf-pageflow-rc.jar
adf-richclient-api-11.jar
adf-richclient-automation-11.jar
adf-richclient-impl-11.jar
adf-share-base.jar
adf-share-ca.jar
adfsharembean.jar
adf-share-security.jar
adf-share-support.jar
adf-share-web.jar
adftags.jar
adf-view-databinding-dt-core.jar
bc4jhtml.jar
bundleresolver.jar
cache.jar
commons-el.jar
datatags.jar
dms.jar
dvt-databinding-dt-core.jar
dvt-databindings.jar
dvt-faces.jar
dvt-facesbindings.jar
dvt-jclient.jar
dvt-trinidad.jar
dvt-utils.jar
facesconfigmodel.jar
glassfish.jsf_1.0.0.0_1-2-15.jar
glassfish.jstl_1.2.0.1.jar
inspect4.jar
javamodel-rt.jar
javatools-nodeps.jar
javax.jsf_1.1.0.0_1-2.jar
javax.management.j2ee_1.0.jar
jewt4.jar
jmxframework.jar
jmxspi.jar
jrf-api.jar
jsf-ri.jar
jsp-el-api.jar
mdsrt.jar
ojdbc6dms.jar
ojdl.jar
ojsp.jar
oracle.logging-utils_11.1.1.jar
oracle.web-common_11.1.1.jar
oracle-el.jar
oracle-page-templates.jar
org.apache.bcel_5.1.jar
resourcebundle.jar
share.jar
taglib.jar
trinidad-api.jar
trinidad-impl.jar
velocity-dep-1.4.jar
xmlef.jar
xmlparserv2.jar

You can find them in any middleware installation, usually in the MW_HOME/oracle_common/modules or MW_HOME/modules folders.

After copying the jars, start Tomcat and enjoy..

4 comments:

  1. hola soy de panama ciudad, estoy viendo tu blog, hice todo pero me sale el siguiente errror, org.apache.catalina.core.StandardContext start
    GRAVE: Error listenerStart, como debo configurar el context.xml?, estoy utilizando PostgreSQL, gracias por tu ayuda...mi email es hdegracia@gmail.com

    ReplyDelete
  2. hello from panama city, I see your blog, I did everything but I get the following errror, org.apache.catalina.core.StandardContext start
    GRAVE: Error listenerStart, as I configure the context.xml?, I'm using PostgreSQL, thanks for your help ...my email is hdegracia@gmail.com

    ReplyDelete
  3. Did you use the exact same versions for ADF and Tomcat ?

    ReplyDelete
  4. I have tried your demo but I am getting following Exception when i start the application in Tomcat.
    FAIL - Application at context path /MDPT could not be started
    FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MDPT]]

    Thanks in advance.

    ReplyDelete