Skip Headers
Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers
10g Release 3 (10.1.3.0)

Part Number B25947-02
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

34 Deploying ADF Applications

This chapter describes how to deploy applications that use ADF to Oracle Application Server as well as to third-party application servers such as JBoss, WebLogic, and WebSphere.

This chapter includes the following sections:

34.1 Introduction to Deploying ADF Applications

Deployment is the process through which application files are packaged as an archive file and transferred to the target application server. Deploying ADF applications is only slightly different from deploying standard J2EE applications.

JDeveloper supports the following deployment options:

Connection to Data Source

You need to configure in JDeveloper a data source that refers to the data source (such as a database) used in your application.

ADF Runtime Library

If you are deploying to third-party application servers (such as JBoss, WebLogic, and WebSphere), you have to install the ADF runtime library on the servers. See Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers" for details.

For Oracle Application Server, the ADF runtime libraries are already installed.

Standard Packaging

After you have all the necessary files, you package the files for the application for deployment in the standard manner. This gives you an EAR file, a WAR file, or a JAR file.

When you are ready to deploy your application, you can deploy using a variety of tools. You can deploy to most application servers from JDeveloper. You can also use tools provided by the application server vendor. Tools are described in the specific application server sections later in the chapter.

34.2 Deployment Steps

To deploy an application, you perform these steps:

Step 1: Install the ADF Runtime Library on the Target Application Server

Step 2: Create a Connection to the Target Application Server

Step 3: Create a Deployment Profile for the JDeveloper Project

Step 4: Create Deployment Descriptors

Step 5: Perform Additional Configuration Tasks Needed for ADF

Step 6: Perform Application Server-Specific Configuration

Step 7: Deploy the Application


Step 1   Install the ADF Runtime Library on the Target Application Server

This step is required if you are deploying ADF applications to third-party application servers, and optional if you are deploying on Oracle Application Server or standalone OC4J. See Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers" for installation steps.

JSF applications that contain ADF Faces components have a few additional deployment requirements:

Step 2   Create a Connection to the Target Application Server

In JDeveloper, create a connection to the application server where you want to deploy your application. Note that if your target application server is WebSphere, you can skip this step because JDeveloper cannot create a connection to WebSphere. For WebSphere, you deploy applications using the WebSphere console. See Section 34.9, "Deploying to WebSphere" for details.

To create a connection to an application server:

  1. In the Connections Navigator, right click Application Server and choose New Application Server Connection. The Create Application Server Connection wizard opens.

  2. Click Next to proceed to the Type page.

  3. On the Type page:

    • Provide a name for the connection.

    • In the Connection Type list box, select the application server type. You can deploy ADF applications on these application servers:

      • Standalone OC4J 10.1.3

      • Oracle Application Server (10.1.2 or 10.1.3)

      • WebLogic Server (8.x or 9.x)

      • JBoss 4.0.x

      • Tomcat 5.x

    • Click Next.

  4. If you selected Tomcat as the application server, the Tomcat Directory page appears. Enter the Tomcat's "webapps" directory as requested and click Next. This is the last screen for configuring a Tomcat server.

  5. If you selected JBoss as the application server, the JBoss Directory page appears. Enter the JBoss's "deploy" directory as requested and click Next. This is the last screen for configuring a JBoss server.

  6. On the Authentication page enter a user name and password that corresponds to the administrative user for the application server. Click Next.

  7. On the Connection page, identify the server instance and configure the connection. Click Next.

  8. On the Test page, test the connection. If not successful, return to the previous pages of the wizard to fix the configuration.

    If you are using WebLogic, you may see this error when testing the connection:

    Class Not Found Exception - weblogic.jndi.WLInitialContextFactory

    This exception occurs when weblogic.jar is not in JDeveloper's classpath. You may ignore this exception and continue with the deployment.

  9. Click Finish.

Step 3   Create a Deployment Profile for the JDeveloper Project

Deployment profiles are project components that govern the deployment of a project or application. A deployment profile specifies the format and contents of the archive file that will be created.

To create a deployment profile:

  1. In the Applications Navigator, select the project for which you want to create a profile.

  2. Choose File > New to open the New Gallery.

  3. In the Categories tree, expand General and select Deployment Profiles.

  4. In the Items list, select a profile type. For ADF applications, you should select one of the following from the Items list:

    • WAR File

    • EAR File

    You can also select Business Components Archive, if you are using ADF Business Components.

    If the desired item is not found or enabled, make sure you selected the correct project, and select All Technologies in the Filter By dropdown list.

    Click OK.

  5. In the Create Deployment Profile dialog provide a name and location for the deployment profile, and click OK.

    The profile, <name>.deploy, will be added to the project, and its Deployment Profile Properties dialog will open.

  6. Select items in the left pane to open dialog pages in the right pane. Configure the profile by setting property values in the pages of the dialog.

    Typically you can accept the default settings. One of the settings that you might want to change is the J2EE context root (select General on the left pane). By default, this is set to the project name. You need to change this if you want users to use a different name to access the application. Note that if you are using custom JAAS LoginModules for authentication with JAZN, the context root name also defines the application name that is used to look up the JAAS LoginModule.

  7. Click OK to close the dialog.

  8. Save the file to keep all changes.

To view or edit a deployment profile, right-click it in the Navigator, and choose Properties, or double-click the profile in the Navigator. This opens the Deployment Profile Properties dialog.

Step 4   Create Deployment Descriptors

Deployment descriptors are server configuration files used to define the configuration of an application for deployment and are deployed with the J2EE application as needed. The deployment descriptors a project requires depend on the technologies the project uses, and on the type of the target application server. Deployment descriptors are XML files that can be created and edited as source files, but for most descriptor types JDeveloper provides dialogs that you can use to view and set properties.

In addition to the standard J2EE deployment descriptors (for example: application.xml, and web.xml), you can also have deployment descriptors that are specific to your target application server. For example, if you are deploying on Oracle Application Server, you can also have orion-application.xml, orion-web.xml, and orion-ejb-jar.xml.

To create a deployment descriptor:

  1. In the Applications Navigator, select the project for which you want to create a descriptor.

  2. Choose File > New to open the New Gallery.

  3. In the Categories tree, expand General and select Deployment Descriptors.

  4. In the Items list, select a descriptor type, and click OK.

    If the desired item is not found, make sure you selected the correct project, and select All Technologies in the Filter By dropdown list. If the desired item is not enabled, check to make sure the project does not already have a descriptor of that type. A project may have only one instance of a descriptor.

    JDeveloper starts the Create Deployment Descriptor wizard or opens the file in the editor pane, depending on the type of deployment descriptor you selected.

Note:

For EAR files, do not create more than one deployment descriptor per application or workspace. These files are assigned to projects, but have workspace scope. If multiple projects in an application or workspace have the same deployment descriptor, the one belonging to the launched project will supersede the others. This restriction applies to application.xml, data-sources.xml, jazn-data.xml, and orion-application.xml.

To view or change deployment descriptor properties:

  1. In the Applications Navigator, right-click the deployment descriptor and choose Properties. If the context menu does not have a Properties item, then the descriptor must be edited as a source file. Choose Open from the context menu to open the profile in an XML editor window.

  2. Select items in the left pane to open dialog pages in the right pane. Configure the descriptor by setting property values in the pages of the dialog.

  3. Click OK when you are done.

To edit a deployment descriptor as an XML file:

Step 5   Perform Additional Configuration Tasks Needed for ADF

If your application uses ADF Faces components, ensure that the standard J2EE deployment descriptors contain entries for ADF Faces, and that you include the ADF and JSF configuration files in your archive file (typically a WAR file). When you create ADF Faces components in your application, JDeveloper automatically creates and configures the files for you.

Check that the WAR file includes the following configuration and library files:

If you are using ADF databound UI components as described in Section 12.2, "Using the Data Control Palette", check that you have the DataBindings.cpx file. For information about the file, see Section 12.3, "Working with the DataBindings.cpx File".

A typical WAR directory structure for a JSF application has the following layout:

MyApplication/
  JSF pages
  WEB-INF/
    configuration files (web.xml, faces-config.xml etc)
    tag library descriptors (optional)
    classes/
      application class files
      Properties files
    lib/
      commons-beanutils.jar
      commons-collections.jar
      commons-digester.jar
      commons-logging.jar
      jsf-api.jar
      jsf-impl.jar
      jstl.jar
      standard.jar

Step 6   Perform Application Server-Specific Configuration

Before you can deploy the application to your target application server, you may need to perform some vendor-specific configuration. See the specific application server sections later in this chapter.

Step 7   Deploy the Application

Note:

If you are running WebLogic 8.1, see Section 34.8.3, "WebLogic 8.1 Deployment Notes".

To deploy to the target application server from JDeveloper:

You can also use the deployment profile to create the archive file (EAR, WAR, or JAR file) only. You can then deploy the archive file using tools provided by the target application server. To create an archive file:

Step 8   Test the Application

Once you've deployed the application, you can test it from the application server. To test run your application, open a browser window and enter an URL of the following type:

Note:

The reason why /faces has to be in the URL for Faces pages is because JDeveloper configures your web.xml file to use the URL pattern of /faces to be associated with the Faces Servlet. The Faces Servlet does its per-request processing, strips out the /faces part in the URL, then forwards to the JSP. If you do not include the /faces in the URL, then the Faces Servlet is not engaged (since the URL pattern doesn't match) and so your JSP is run without the necessary JSF per-request processing.

34.3 Deployment Techniques

Table 34-1 describes some common deployment techniques that you can use during the application development and deployment cycle. The table lists the deployment techniques in order from deploying on development environments to deploying on production environments. It is likely that in the production environment, the system administrators deploy applications using scripting tools.

Table 34-1 Deployment Techniques

Deployment Technique When to Use

Deploy directly from JDeveloper

This technique is typically used when you are developing your application.

When you are developing the application, you may want to deploy it quickly for testing. You want deployment to be quick because you will be repeating the editing and deploying process many times.

JDeveloper comes with an embedded OC4J server, on which you can run and test your application. You should also deploy your application to an external application server to test it.

Deploy to EAR file, then use the target application server's tools for deployment

This technique is typically used when you are ready to deploy and test your application on an application server in a test environment. On the test server, you can test features (such as LDAP and OracleAS Single Sign-On) that are not available on the development server.

You can also use the test environment to develop your deployment scripts. The scripts may involve Ant.

Use a script to deploy applications

This technique is typically used on test and production environments. On production environments, system administrators usually run scripts to deploy applications.


34.4 Deploying Applications Using Ant

You can also use Ant to package and deploy applications. The build.xml file, which contains the deployment commands for Ant, may vary depending on the target application server.

For deployment to Oracle Application Server using Ant, see the chapter "Deploying with the OC4J Ant Tasks" in the Oracle Containers for J2EE Deployment Guide. This chapter provides complete details on how to use Ant to deploy to Oracle Application Server. Oracle provides Ant tasks that are specific to Oracle Application Server.

For deployment to other application servers, see the application server's documentation. If your application server does not provide specific Ant tasks, you may be able to use generic Ant tasks. For example, the generic ear task creates an EAR file for you.

For information about Ant, see http://ant.apache.org.

34.5 Deploying the SRDemo Application

The SRDemo application includes a project called BuildAndDeploy, which contains EAR and WAR deployment profiles as well as Ant scripts that you can use to build the application. The deployment profiles pull in the appropriate files from the projects in the application workspace to build the EAR and WAR files. You can deploy the EAR or WAR file on your target application server. (You can also deploy directly to your application server from JDeveloper if you have created a connection to your application server.)

To view the properties of a deployment profile, right-click the deployment profile and choose Properties from the context menu.

The SRDemo application also includes the UserInterface/src/META-INF/SRDemo-jazn-data.xml file. The file contains some usernames and passwords so that the application can work out of the box running on the embedded OC4J server. Note that this file is not distributed in the EAR file. If you deploy the application to an external application server, you have to set up the relevant credential store on the target application server.

If you want to deploy the application to different application servers, you can create a separate deployment profile for each target application server. This enables you to configure the properties for each target separately.

34.6 Deploying to Oracle Application Server

This section describes deployment details specific to Oracle Application Server:

34.6.1 Oracle Application Server Versions Supported

Table 34-2 shows the supported versions of Oracle Application Server:

Table 34-2 Support Matrix for Oracle Application Server

Oracle Application Server Version JDK Version J2EE Version

Release 3 (10.1.3)

1.5_05

1.4

Release 2 (10.1.2)

1.4

1.3


34.6.2 Oracle Application Server Release 2 (10.1.2) Deployment Notes

If you are deploying to Oracle Application Server Release 2 (10.1.2), you have to perform some additional steps before you can run your ADF applications:

  • This version of Oracle Application Server supports JDK 1.4. This means that you need to configure JDeveloper to build your applications with JDK 1.4 instead of JDK 1.5. See Section 34.11, "Deploying to Application Servers That Support JDK 1.4" for details.

  • You need to install the ADF runtime libraries on the application server. This is because the ADF runtime libraries that were shipped with Release 2 (10.1.2) need to be updated. To install the ADF runtime libraries, see Section 34.12.1, "Installing the ADF Runtime Libraries from JDeveloper".

  • Note that Oracle Application Server Release 2 (10.1.2) supports J2EE 1.3, while JDeveloper 10.1.3 supports J2EE 1.4. This means that if you are using J2EE 1.3 components , you have to ensure that JDeveloper creates the appropriate configuration files for that version. Configuration files for J2EE 1.3 and 1.4 are different.

    Table 34-3 lists the configuration files that need to be J2EE 1.3-compliant, and how to configure JDeveloper to generate the appropriate version of the files.

    Table 34-3 Configuring JDeveloper to Generate Configuration Files That Are J2EE 1.3-Compliant

    Configuration File How to Configure JDeveloper to Generate Appropriate Version of the File

    application.xml

    web.xml

    1. Select the project in the Applications Navigator.

    2. Select File > New to display the New Gallery.

    3. In Categories, expand General and select Deployment Descriptors.

    4. In Items, select J2EE Deployment Descriptor Wizard and click OK.

    5. Click Next in the wizard to display the Select Descriptor page.

    6. On the Select Descriptor page, select application.xml (or web.xml) and click Next.

    7. On the Select Version page, select 1.3 (2.3 if you are configuring web.xml) and click Next.

    8. On the Summary page, click Finish.

    orion-application.xml

    data-sources.xml

    oc4j-connectors.xml

    1. Select the project in the Applications Navigator.

    2. Select File > New to display the New Gallery.

    3. In Categories, expand General and select Deployment Descriptors.

    4. In Items, select OC4J Deployment Descriptor Wizard and click OK.

    5. Click Next in the wizard to display the Select Descriptor page.

    6. On the Select Descriptor page, select the file you want to configure and click Next.

    7. On the Select Version page, select the appropriate version and click Next.

      For orion-application.xml, select 1.2.

      For data-sources.xml, select 1.0.

      For oc4j-connectors.xml, select 10.0.

    8. On the Summary page, click Finish.


34.6.3 Oracle Application Server Deployment Methods

Instead of deploying applications directly from JDeveloper, you can use JDeveloper to create the archive file, and then deploy the archive file using these methods:

  • Using Application Server Control Console. For details, see the "Deploying with Application Server Control Console" chapter in the Oracle Containers for J2EE Deployment Guide.

  • Using admin_client.jar. For details, see the "Deploying with the admin_client.jar Utility" chapter in the Oracle Containers for J2EE Deployment Guide.

You can access the Oracle Containers for J2EE Deployment Guide from the Oracle Application Server documentation library.

34.6.4 Oracle Application Server Deployment to Test Environments ("Automatic Deployment")

If you are deploying to a standalone OC4J environment that is not a production environment, you can configure OC4J to automatically deploy your application. This method is not recommended for production environments.

For details, see the "Automatic Deployment in OC4J" chapter in the Oracle Containers for J2EE Deployment Guide.

34.6.5 Oracle Application Server Deployment to Clustered Topologies

To deploy to clustered topologies, you can use any of the following methods:

  • In JDeveloper, you can deploy to a "group" of Oracle Application Server instances. To do this, ensure that the connection to the Oracle Application Server is set to "group" instead of "single instance".

  • You can use the admin_client.jar command-line utility. This utility enables you to deploy the application to all nodes in a cluster using a single command. admin_client.jar is shipped with Oracle Application Server 10.1.3.

    For details, see the "Deploying with the admin_client.jar Utility" chapter in the Oracle Containers for J2EE Deployment Guide.

34.7 Deploying to JBoss

This section describes deployment details that are specific to JBoss.

34.7.1 JBoss Versions Supported

Table 34-4 shows the supported versions of JBoss:

Table 34-4 Support Matrix for JBoss

JBoss version JDK version J2EE version

4.0.2

1.5_04

1.4

4.0.3

1.5_04

1.4


34.7.2 JBoss Deployment Notes

  • Before deploying applications that use ADF to JBoss, you need to install the ADF runtime libraries on JBoss. See Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers" for details.

  • If you are running JBoss version 4.0.3, you need to delete the following directories from the JBoss home. This is to facilitate running JSP and ADF Faces components.

    • deploy/jbossweb-tomcat55.sar/jsf-lib/

    • tmp, log, and data directories (located at the same level as the deploy directory)

    After removing the directories, restart JBoss.

    If you do not remove these directories, you may get the following exception during runtime:

    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    
    root cause
    
    java.lang.NullPointerException
    javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
    javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
    org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
    org.apache.jsp.untitled1_jsp._jspx_meth_f_view_0(org.apache.jsp.untitled1_jsp:84)
    org.apache.jsp.untitled1_jsp._jspService(org.apache.jsp.untitled1_jsp:60)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    
  • To deploy applications directly from JDeveloper to JBoss, the directory where the target JBoss application server is installed must be accessible from JDeveloper. This means you need to run JDeveloper and JBoss on the same machine, or you need to map a network drive on the JDeveloper machine to the JBoss machine.

    This is required because JDeveloper needs to copy the EAR file to the JBOSS_HOME\server\default\deploy directory in the JBoss installation directory.

  • In the Business Components Project Wizard, set the SQL Flavor to SQL92, and the Type Map to Java. This is necessary because ADF uses the emulated XA datasource implementation when the Business Components application is deployed as an EJB session bean.

  • For business components JSP applications, choose Deploy to EAR file from the context menu to deploy it as an EAR file. You must deploy this application to an EAR file and not a WAR file because JBoss does not add EJB references under the java:comp/env/ JNDI namespace for a WAR file. If you have set up a connection in JDeveloper to your JBoss server, you can deploy the EAR file directly to the server.

34.7.3 JBoss Deployment Methods

You can deploy to JBoss directly if you have set up a connection in JDeveloper to your JBoss server. When you deploy from JDeveloper, it copies the EAR file to the JBOSS_HOME\server\default\deploy directory. JBoss deploys the EAR files that it finds in that directory. You do not have to restart JBoss in order to access the application.

34.8 Deploying to WebLogic

This section describes deployment details that are specific to WebLogic.

34.8.1 WebLogic Versions Supported

Table 34-5 shows the supported versions of WebLogic:

Table 34-5 Support Matrix for WebLogic

WebLogic version JDK version J2EE version

8.1 SP4

1.4

ADF applications have been certified against the Sun JDK, but not the JRockit JDK.

1.3

9.0

1.5

1.4


34.8.2 WebLogic Versions 8.1 and 9.0 Deployment Notes

  • Before deploying applications that use ADF to WebLogic, you need to install the ADF runtime libraries on WebLogic. See Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers" for details.

  • When you click Test Connection in the Create Application Server Connection wizard, you may get the following exception:

    Class Not Found Exception - weblogic.jndi.WLInitialContextFactory

    This exception occurs when weblogic.jar is not in JDeveloper's classpath. You may ignore this exception and continue with the deployment.

  • You may get an exception in JDeveloper when trying to deploy large EAR files. The workaround is to deploy the application using the server console.

34.8.3 WebLogic 8.1 Deployment Notes

  • This version of WebLogic supports JDK 1.4. This means that you need to configure JDeveloper to build your applications with JDK 1.4 (such as the JDK provided by WebLogic) instead of JDK 1.5. See Section 34.11, "Deploying to Application Servers That Support JDK 1.4" for details.

  • WebLogic 8.1 is only J2EE 1.3 compliant. This means that you need to create an application.xml file that complies with J2EE 1.3. To create this file in JDeveloper, make the following selections:

    1. Select the project in the Applications Navigator.

    2. Select File > New to display the New Gallery.

    3. In Categories, expand General and select Deployment Descriptors.

    4. In Items, select J2EE Deployment Descriptor Wizard and click OK.

    5. Click Next in the wizard to display the Select Descriptor page.

    6. On the Select Descriptor page, select application.xml and click Next.

    7. On the Select Version page, select 1.3 and click Next.

    8. On the Summary page, click Finish.

  • Similarly, your web.xml needs to be compliant with J2EE 1.3 (which corresponds to servlet 2.3 and JSP 1.2). To create this file in JDeveloper, follow the steps as shown above, except that you select web.xml in the Select Descriptor page, and 2.3 in the Select Version page.

  • If you are using Struts in your application, you need to create the web.xml file at version 2.3 first, then create any required Struts configuration files. If you reverse the order (create Struts configuration files first), this will not work because creating a Struts configuration file also creates a web.xml file if one does not already exist, but this web.xml is for J2EE 1.4, which will not work with WebLogic 8.1.

34.8.4 WebLogic 9.0 Deployment Notes

  • When you are deploying to WebLogic 9.0 from JDeveloper, ensure that the HTTP Tunneling property is enabled in the WebLogic console. This property is located under Servers > ServerName > Protocols. ServerName refers to the name of your WebLogic server.

34.8.5 WebLogic Deployment Methods

You can deploy directly to WebLogic if you have set up a connection in JDeveloper to your WebLogic server.

You can also deploy using the WebLogic console (for example: http://<weblogic_host:port>/console/).

34.9 Deploying to WebSphere

This section describes deployment details that are specific to WebSphere.

34.9.1 WebSphere Versions Supported

Table 34-6 shows the supported versions of WebSphere:

Table 34-6 Support Matrix for WebSphere

WebSphere version JDK version J2EE version

6.0.1

1.4.2

1.4


34.9.2 WebSphere Deployment Notes

  • This version of WebSphere supports JDK 1.4. This means that you need to configure JDeveloper to build your applications with JDK 1.4 instead of JDK 1.5. See Section 34.11, "Deploying to Application Servers That Support JDK 1.4" for details.

  • Before you can deploy applications that use ADF to WebSphere, you need to install the ADF runtime libraries on WebSphere. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications" for details. Note that JDeveloper cannot connect to WebSphere application servers. This means you have to use the manual method of installing the ADF runtime libraries.

  • Check that you have the following lines in the web.xml file for the ADF application you want to deploy:

    <servlet>
      <servlet-name>jsp</servlet-name>
      <servlet-class>com.ibm.ws.webcontainer.jsp.servlet.JspServlet</servlet-class>
    </servlet>
    
  • You may need to configure data sources and other variables for deployment. Use the correct DataSource name, JNDI name, URLs, etc, that were used when creating the application.

  • After deploying the application, you need to add the appropriate shared library reference for the ADF application, depending on your application's SQL flavor and type map. You created the shared library in step 5.

34.9.3 WebSphere Deployment Methods

You can deploy using the WebSphere console (for example: http://<websphere_host:port>/ibm/console/).

34.10 Deploying to Tomcat

This section describes deployment details that are specific to Tomcat.

34.10.1 Tomcat Versions Supported

Table 34-7 shows the supported versions of Tomcat:

Table 34-7 Support Matrix for Tomcat

Tomcat version JDK version J2EE version

5.5.9

1.5

1.4


34.10.2 Tomcat Deployment Notes

  • Before deploying applications that use ADF to Tomcat, you need to install the ADF runtime libraries on Tomcat. See Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers" for details.

  • After you install the ADF runtime libraries, rename the file TOMCAT_HOME/common/jlib/bc4jdomgnrc to bc4jdomgnrc.jar (that is, add the .jar extension to the filename). This file is required for users who are using the Java type mappings.

  • You can deploy applications to Tomcat from JDeveloper (if you have set up a connection to your Tomcat server), or you can also deploy applications using the Tomcat console.

34.11 Deploying to Application Servers That Support JDK 1.4

If you are deploying to an application server that uses JDK 1.4, you need to configure JDeveloper to build your applications using JDK 1.4. By default, JDeveloper 10.1.3 uses JDK 1.5. If you build an application with JDK 1.5 and run it on an application server that supports JDK 1.4, you may get "unsupported class version" errors.

Application servers that support JDK 1.4 include Oracle Application Server Release 2 (10.1.2), WebLogic 8.1, and WebSphere.

To configure JDeveloper to build projects with JDK 1.4:

  1. Install J2SE 1.4 on the machine running JDeveloper.

  2. Configure JDeveloper with the J2SE 1.4 that you installed:

    1. In JDeveloper, choose Tools > Manage Libraries. This displays the Manage Libraries dialog.

    2. In the Manage Libraries dialog, choose the J2SE Definitions tab.

    3. On the right-hand side, click the Browse button for the J2SE Executable field and navigate to the J2SE_1.4/bin/java.exe file, where J2SE_1.4 refers to the directory where you installed J2SE 1.4.

    4. Click OK.

  3. Configure your project to use J2SE 1.4:

    1. In the Project Properties dialog for your project, select Libraries on the left-hand side.

    2. On the right-hand side, click the Change button for the J2SE Version field. This displays the Edit J2SE Definition dialog.

    3. In the Edit J2SE Definition dialog, on the left-hand side, select 1.4 under User.

    4. Click OK in the Edit J2SE Definition dialog.

    5. Click OK in the Project Properties dialog.

34.11.1 Switching Embedded OC4J to JDK 1.4

When you run an Oracle JDeveloper 10.1.3 application using the Embedded OC4J server, the application is configured for JDK 1.5. If you then try to switch to JDK 1.4, you will see JSP compile failures. To remedy this you need to force the application files to be re-compiled when OC4J is restarted with JDK 1.4. To configure Embedded OC4J to JDK 1.4:

  1. Configure JDeveloper 10.1.3.4 according to the steps above.

  2. Stop the embedded OC4J server instance.

  3. Delete the following directory:

    ORACLE_HOME/j2ee/instance/application-deployments

  4. Start the embedded server again.

34.12 Installing ADF Runtime Library on Third-Party Application Servers

Before you can deploy applications that use ADF on third-party application servers, you need to install the ADF runtime libraries on those application servers. You can perform the installation using a wizard or you can do it manually:

34.12.1 Installing the ADF Runtime Libraries from JDeveloper

You can install the ADF runtime libraries from JDeveloper on selected application servers. The supported application servers are listed in the Tools > ADF Runtime Installer submenu.

Note that for WebSphere, you need to install the libraries manually. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications".

To install the ADF Runtime Libraries from JDeveloper:

  1. Stop all instances of the target application server.

  2. (WebLogic only) Create a new WebLogic domain, if you do not already have one. You will install the ADF runtime libraries in the domain.

    Steps for creating a domain in WebLogic are provided here for your convenience.

    Note:

    The domain must be configured to use Sun's JDK.

    Steps for Creating Domains in WebLogic 8.1:

    1. From the Start menu, choose Programs > BEA WebLogic Platform 8.1 > Configuration Wizard. This starts up the Configuration wizard.

    2. On the Create or Extend a Configuration page, select Create a new WebLogic Configuration. Click Next.

    3. On the Select a Configuration Template page, select Basic WebLogic Server Domain. Click Next.

    4. On the Choose Express or Custom Configuration page, select Express. Click Next.

    5. On the Configure Administrative Username and Password page, enter a username and password. Click Next.

    6. On the Configure Server Start Mode and Java SDK page, make sure you select Sun's JDK. Click Next.

    7. On the Create WebLogic Configuration page, you can change the domain name. For example, you might want to change it to jdevdomain.

    Steps for Creating Domains in WebLogic 9.0:

    1. From the Start menu, choose Programs > BEA Products > Tools > Configuration Wizard. This starts up the Configuration wizard.

    2. On the Welcome page, select Create a new WebLogic Domain. Click Next.

    3. On the Select a Domain Source page, select Generate a domain configured automatically to support the following BEA products. Click Next.

    4. On the Configure Administrator Username and Password page, enter a username and password. Click Next.

    5. On the Configure Server Start Mode and JDK page, make sure you select Sun's JDK. Click Next.

    6. On the Customize Environment and Services Settings page, select No. Click Next.

    7. On the Create WebLogic Domain page, set the domain name. For example, you might want to set it to jdevdomain. Click Create.

  3. Start the ADF Runtime Installer wizard by choosing Tools > ADF Runtime Installer > Application_Server_Type. Application_Server_Type is the type of the target application server (for example, Oracle Application Server, WebLogic, JBoss, or standalone OC4J).

  4. Proceed through the pages in the wizard. For detailed instructions for any page in the wizard, click Help. You need to enter the following information in the wizard:

    • On the Home Directory page, select the home or root directory of the target application server.

    • (WebLogic only) On the Domain Directory page, select the home directory of the WebLogic domain where you want to install the ADF libraries. You created this domain in step 2.

    • On the Installation Options page, choose Install the ADF Runtime Libraries.

    • On the Summary page, check the details and click Finish.

  5. (WebLogic only) Edit WebLogic startup files so that WebLogic includes the ADF runtime library when it starts up.

    Steps for WebLogic 8.1:

    1. Make a backup copy of the WEBLOGIC_HOME\user_projects\domains\jdevdomain\startWebLogic.cmd (or startWebLogic.sh) file because you will be editing it in the next step. "jdevdomain" is the name of the domain that you created earlier in step 2.

    2. In the startWebLogic.cmd (or startWebLogic.sh) file, add the "call "setupadf.cmd"" line (for Windows) before the "set CLASSPATH" line:

      call "setupadf.cmd"
      set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;
              %JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;
              %CLASSPATH%
      

      The setupadf.cmd script was installed by the ADF Runtime Installer wizard in the WEBLOGIC_HOME\user_projects\domains\jdevdomain directory.

    3. To start WebLogic, change directory to the jdevdomain directory and run startWebLogic.cmd:

      > cd WEBLOGIC_HOME\user_projects\domains\jdevdomain
      > startWebLogic.cmd
      

    Steps for WebLogic 9.0:

    1. Make a backup copy of the %DOMAIN_HOME%\bin\setDomainEnv.cmd file because you will be editing it in the next step.

      %DOMAIN_HOME% is specified in the startWebLogic.cmd (or startWebLogic.sh) file. For example, if you named your domain jdevdomain, then %DOMAIN_HOME% would be BEA_HOME\user_projects\domains\jdevdomain. You created the domain earlier in step 2.

    2. In the %DOMAIN_HOME%\bin\setDomainEnv.cmd file, add the "call "%DOMAIN_HOME%\setupadf.cmd"" line before the "set CLASSPATH" line:

      call "%DOMAIN_HOME%\setupadf.cmd"
      set CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;
          %WLP_POST_CLASSPATH%;%WL_HOME%\integration\lib\util.jar;%CLASSPATH%
      
    3. If the "set CLASSPATH" line does not have %CLASSPATH%, then add it to the line, as shown above.

    4. To start WebLogic, change directory to %DOMAIN_HOME% and run startWebLogic.cmd:

      > cd %DOMAIN_HOME%
      > startWebLogic.cmd
      
  6. (WebLogic only) Before you run JDeveloper, configure JDeveloper to include the WebLogic client in its class path.

    1. Make a backup copy of the JDEVELOPER_HOME\jdev\bin\jdev.conf file because you will be editing it in the next step.

    2. Add the following line to the jdev.conf file:

      AddJavaLibFile <WEBLOGIC_HOME>\server\lib\weblogic.jar
      

      Replace <WEBLOGIC_HOME> with the fullpath to the directory where you installed WebLogic.

  7. Restart the target application server. If you are running WebLogic, you may have already started up the server.

Managing Multiple Versions of the ADF Runtime Library

Application servers may contain different versions of the ADF runtime libraries, but at any time only one version (the active version) is accessible to deployed applications. The other versions are archived.

You can use the ADF Runtime Installer wizard to make a different version the active version. On the Installation Options page in the wizard, choose the Restore option.

34.12.2 Configuring WebSphere 6.0.1 to Run ADF Applications

Before you can run ADF applications on WebSphere 6.0.1, you have to perform these steps:

  1. Create the install_adflibs_1013.sh (or .cmd on Windows) script, as follows:

    If you are running on UNIX:

    1. Copy the source shown in Section 34.12.2.1, "Source for install_adflibs_1013.sh Script" and paste it to a file. Save the file as install_adflibs_1013.sh.

    2. Enable execute permission on install_adflibs_1013.sh.

      > chmod a+x install_adflibs_1013.sh
      

    If you are running on Windows, copy the source shown in Section 34.12.2.2, "Source for install_adflibs_1013.cmd Script" and paste it to a file. Save the file as install_adflibs_1013.cmd.

    You will run the script later, in step 3.

  2. Stop the WebSphere processes.

  3. Run the install_adflibs_1013.sh (.cmd on Windows) script to install the ADF libraries, as follows:

    1. Set the ORACLE_HOME environment variable to point to the JDeveloper installation.

    2. Set the WAS_ADF_LIB environment variable to point to the location where you want to install the ADF library files. Typically this is the WebSphere home directory. The library files are installed in the WAS_ADF_LIB/lib and WAS_ADF_LIB/jlib directories.

    3. Run the script. <script_dir> refers to the directory where you created the script.

      > cd <script_dir>
      > install_adflib_1013.sh           // if on Windows, use the .cmd extension
      
  4. Start WebSphere processes.

  5. Use the WebSphere administration tools to create a new shared library. Depending on your application, you create one of the shared libraries below.

    • For applications that use Oracle SQL flavor and type map, create the ADF10.1.3-Oracle shared library:

      Set the name of the shared library to ADF10.1.3-Oracle.

      Set the classpath to include all the JAR files in WAS_ADF_LIB\lib and WAS_ADF_LIB\jlib except for WAS_ADF_LIB\jlib\bc4jdomgnrc.jar. This JAR file is used for generic type mappings.

      WAS_ADF_LIB refers to the directory that will be used as a library defined in the WebSphere console. WAS_ADF_LIB contains the ADF library files.

    • For applications that use non-Oracle SQL flavor and type map, create the ADF10.1.3-Generic shared library:

      Set the name of the shared library to ADF10.1.3-Generic.

      Set the classpath to include WAS_ADF_LIB\jlib\bc4jdomgnrc.jar and all the JAR files in WAS_ADF_LIB\lib except for bc4jdomorcl.jar. WAS_ADF_LIB refers to the directory that will be used as a library defined in the WebSphere console. WAS_ADF_LIB contains the ADF library files.

  6. Add the following parameter in the Java command for starting up WebSphere.

    -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl

  7. Shut down and restart WebSphere so that it uses the new parameter.

34.12.2.1 Source for install_adflibs_1013.sh Script

Example 34-1 shows the source for the install_adflibs_1013.sh script. Instead of copying the ADF runtime library files manually to your WebSphere environment, you can use this script. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications" for details.

The install_adflibs_1013.sh script is for use on UNIX environments. If you are running on Windows, see Section 34.12.2.2, "Source for install_adflibs_1013.cmd Script".

Example 34-1 install_adflibs_1013.sh

#!/bin/sh

EXIT=0
if [ "$ORACLE_HOME" = "" ]
  then
    echo "Error: The ORACLE_HOME environment variable must be set before executing this script."
    echo "This should point to your JDeveloper installation directory"
    EXIT=1
fi
if [ "$WAS_ADF_LIB" = "" ]; 
  then
    echo "Error: The WAS_ADF_LIB environment variable must be set before executing this script."
    echo "This should point to the location where you would like the ADF jars to be copied."
    EXIT=1
fi

if [ "$EXIT" -eq 0 ]
then

if [ ! -d $WAS_ADF_LIB ]; then
  mkdir $WAS_ADF_LIB
fi
if [ ! -d $WAS_ADF_LIB/lib ]; then
  mkdir $WAS_ADF_LIB/lib
fi
if [ ! -d $WAS_ADF_LIB/jlib ]; then
  mkdir $WAS_ADF_LIB/jlib
fi

# Core BC4J runtime
cp $ORACLE_HOME/BC4J/lib/adfcm.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/adfm.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/adfmweb.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/adfshare.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jct.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jctejb.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jdomorcl.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jimdomains.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jmt.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/lib/bc4jmtejb.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/jlib/dc-adapters.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/jlib/adf-connections.jar  $WAS_ADF_LIB/lib/

#  Core BC4J jlib runtime
cp $ORACLE_HOME/BC4J/jlib/bc4jdomgnrc.jar $WAS_ADF_LIB/jlib/
cp $ORACLE_HOME/BC4J/jlib/adfui.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/BC4J/jlib/adfmtl.jar $WAS_ADF_LIB/lib/

#  Oracle Home jlib runtime
cp $ORACLE_HOME/jlib/jdev-cm.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/jlib/jsp-el-api.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/jlib/oracle-el.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/jlib/commons-el.jar $WAS_ADF_LIB/lib/

#  Oracle MDS runtime
cp $ORACLE_HOME/jlib/commons-cli-1.0.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/jlib/xmlef.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/mds/lib/mdsrt.jar $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/mds/lib/concurrent.jar $WAS_ADF_LIB/lib/

#  Oracle Diagnostic
cp %ORACLE_HOME%/diagnostics/lib/commons-cli-1.0.jar $WAS_ADF_LIB/lib/

#  SQLJ Runtime
cp $ORACLE_HOME/sqlj/lib/translator.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/sqlj/lib/runtime12.jar  $WAS_ADF_LIB/lib/

#  Intermedia Runtime
cp $ORACLE_HOME/ord/jlib/ordhttp.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/ord/jlib/ordim.jar  $WAS_ADF_LIB/lib/


#  OJMisc
cp $ORACLE_HOME/jlib/ojmisc.jar  $WAS_ADF_LIB/lib/

#  XML Parser
cp $ORACLE_HOME/lib/xmlparserv2.jar  $WAS_ADF_LIB/lib/

#  JDBC
cp $ORACLE_HOME/jdbc/lib/ojdbc14.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/jdbc/lib/ojdbc14dms.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/lib/dms.jar  $WAS_ADF_LIB/lib/

#  XSQL Runtime
cp $ORACLE_HOME/lib/xsqlserializers.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/lib/xsu12.jar  $WAS_ADF_LIB/lib/
cp $ORACLE_HOME/lib/xml.jar  $WAS_ADF_LIB/lib/

fi

34.12.2.2 Source for install_adflibs_1013.cmd Script

Example 34-2 shows the source for the install_adflibs_1013.cmd script. Instead of copying the ADF runtime library files manually to your WebSphere environment, you can use this script. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications" for details.

The install_adflibs_1013.cmd script is for use on Windows environments. If you are running on UNIX, see Section 34.12.2.1, "Source for install_adflibs_1013.sh Script".

Example 34-2 install_adflibs_1013.cmd

@echo off
if {%ORACLE_HOME%} =={} goto :oracle_home

if {%WAS_ADF_LIB%} =={} goto :was_adf_lib

mkdir %WAS_ADF_LIB%
mkdir %WAS_ADF_LIB%\lib
mkdir %WAS_ADF_LIB%\jlib

@REM Core BC4J runtime
copy %ORACLE_HOME%\BC4J\lib\adfcm.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\adfm.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\adfmweb.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\adfshare.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jct.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jctejb.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jdomorcl.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jimdomains.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jmt.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\bc4jmtejb.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\collections.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\lib\adfbinding.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\jlib\dc-adapters.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\jlib\adf-connections.jar  %WAS_ADF_LIB%\lib\

@REM Core BC4J jlib runtime
copy %ORACLE_HOME%\BC4J\jlib\bc4jdomgnrc.jar %WAS_ADF_LIB%\jlib\
copy %ORACLE_HOME%\BC4J\jlib\adfui.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\BC4J\jlib\adfmtl.jar %WAS_ADF_LIB%\lib\

@REM Oracle Home jlib runtime
copy %ORACLE_HOME%\jlib\jdev-cm.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\jlib\jsp-el-api.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\jlib\oracle-el.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\jlib\commons-el.jar %WAS_ADF_LIB%\lib\

@REM Oracle MDS runtime
copy %ORACLE_HOME%\jlib\commons-cli-1.0.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\jlib\xmlef.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\mds\lib\mdsrt.jar %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\mds\lib\concurrent.jar %WAS_ADF_LIB%\lib\

@REM Oracle Diagnostic
copy %ORACLE_HOME%\diagnostics\lib\ojdl.jar %WAS_ADF_LIB%\lib\

@REM SQLJ Runtime
copy %ORACLE_HOME%\sqlj\lib\translator.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\sqlj\lib\runtime12.jar  %WAS_ADF_LIB%\lib\

@REM Intermedia Runtime
copy %ORACLE_HOME%\ord\jlib\ordhttp.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\ord\jlib\ordim.jar  %WAS_ADF_LIB%\lib\

@REM OJMisc
copy %ORACLE_HOME%\jlib\ojmisc.jar  %WAS_ADF_LIB%\lib\

@REM XML Parser
copy %ORACLE_HOME%\lib\xmlparserv2.jar  %WAS_ADF_LIB%\lib\

@REM JDBC
copy %ORACLE_HOME%\jdbc\lib\ojdbc14.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\jdbc\lib\ojdbc14dms.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\lib\dms.jar  %WAS_ADF_LIB%\lib\

@REM XSQL Runtime
copy %ORACLE_HOME%\lib\xsqlserializers.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\lib\xsu12.jar  %WAS_ADF_LIB%\lib\
copy %ORACLE_HOME%\lib\xml.jar  %WAS_ADF_LIB%\lib\

goto :end

:oracle_home
@echo Set the ORACLE_HOME pointing to the directory of your 10.1.3 JDeveloper installation.

:was_adf_lib
if {%WAS_ADF_LIB%} =={} @echo Set the WAS_ADF_LIB environment variable pointing to the directory where you would like to install ADF libraries.

:end 

34.12.3 Installing the ADF Runtime Libraries Manually

Instead of using the ADF Runtime Installer wizard in JDeveloper to install the libraries, you can also install the libraries manually on your target application server.

Table 34-8 lists the files that you must copy to your application server before you deploy any ADF applications. In the table, JDEV_INSTALL refers to the directory where you installed JDeveloper.

  • For JBoss, the destination directory is JBOSS_HOME/server/default/lib.

  • For WebLogic, the destination directory is WEBLOGIC_HOME/ADF/lib. You have to create the ADF directory, and under it, the lib and jlib directories.

  • For Tomcat, the destination directory is TOMCAT_HOME/common/lib.

Table 34-8 ADF Runtime Library Files to Copy

Copy These Files: Notes

From JDEV_INSTALL/BC4J/lib:

  • adfcm.jar

  • adfm.jar

  • adfmweb.jar

  • adfshare.jar

  • bc4jct.jar

  • bc4jctejb.jar

  • bc4jdomorcl.jar or bc4jdomgnrc.jar

    Note: Only one of these files is required, depending on which mapping type you used to build your application. If you are using the Oracle type mappings, copy bc4jdomorcl.jar. If the application was built using "Java" type mappings, copy bc4jdomgnrc.jar instead. bc4jdomgnrc.jar is located in JDEV_INSTALL/BC4J/jlib.

  • bc4jimdomains.jar

  • bc4jmt.jar

  • bc4jmtejb.jar

  • collections.jar

  • adfbinding.jar

These are the ADF runtime library files.

From JDEV_INSTALL/BC4J/jlib:

  • adfmtl.jar

  • bc4jdomgnrc.jar (see the note above)

  • adfui.jar

These are the ADF runtime library files.

From JDEV_INSTALL/jlib:

  • jdev-cm.jar

  • commons-el.jar

  • oracle-el.jar

  • jsp-el-api.jar

These are the JDeveloper runtime library files.

From JDEV_INSTALL/jlib:

  • commons-cli-1.0.jar

  • xmlef.jar

From JDEV_INSTALL/mds/lib:

  • mdsrt.jar

  • concurrent.jar

These are the Oracle MDS files.

From JDEV_INSTALL/diagnostics/lib:

  • ojdl.jar

These are the Oracle diagnostics files.

From JDEV_INSTALL/jlib:

  • ojmisc.jar

These are the OJMisc runtime files.

From JDEV_INSTALL/lib:

  • xmlparserv2.jar

This file is for XML support.

From JDEV_INSTALL/lib:

  • xml.jar

  • xsqlserializers.jar

  • xsu12.jar

These are the XSQL library files.

From JDEV_INSTALL/ord/jlib:

  • ordhttp.jar

  • ordim.jar

These files are for interMedia Text support. interMedia Text is a feature for storing, retrieving, and manipulating audio, document, image, and video data in an Oracle database.

From JDEV_INSTALL/sqlj/lib:

  • runtime12.jar

  • translator.jar

These are the SQLJ runtime library files.

From JDEV_INSTALL/jdbc/lib:

  • ojdbc14.jar

  • ojdbc14dms.jar

From JDEV_INSTALL/lib:

  • dms.jar

These are the JDBC runtime library files.

From JDEV_INSTALL/javacache/lib:

  • cache.jar

These are the Java Cache runtime library files.

From JDEV_INSTALL/BC4J/redist:

  • webapp.war or bc4j.ear

This file is for Business Components web application image and cascading style sheet support.

If you are running Tomcat, copy the webapp.war file to the TOMCAT_HOME/webapps directory.

If you are running JBoss, copy the bc4j.ear file to the JBOSS_HOME/server/default/deploy directory.


The destination directory (the directory to which you copy these files) depends on your application server:

34.12.3.1 Installing the ADF Runtime Libraries from a Zip File

You can also install the ADF runtime libraries by downloading adfinstaller.zip from OTN and following the directions below.

To install the ADF Runtime Libraries:

  1. To initiate the download, go to the JDeveloper Download page on OTN, here:

    http://www.oracle.com/technology/software/products/jdev/index.html

    Unzip adfinstaller.zip to the target directory.

  2. Set the DesHome variable in the adfinstaller.properties file to specify the home directory of the destination application server:

    For example:

    Oracle AS: DesHome=c:\\oas1013

    OC4J: DesHome=c:\\oc4j

    JBoss: DesHome=c:\\jboss-4.0.3

    Tomcat: DesHome=c:\\jakarta-tomcat-5.5.9

    WebLogic: DesHome=c:\\bea\weblogic90 (note server home directory is in weblogic subdirectory)

  3. Set the type variable in the adfinstaller.properties file to specify the platform for the application server where the ADF libraries are to be installed. The choices are OC4J/AS/TOMCAT/JBOSS/WEBLOGIC.

    For example:

    type=AS

  4. Set the UserHome variable in the adfinstaller.properties file to specify the WebLogic domain for which ADF is being configured. This setting is only used for WebLogic, and ignored for all other platforms. For example:

    UserHome= c:\\bea\weblogic90\\user_projects\\domains\\adfdomain

  5. Shut down all instances of the application server running on the target platform.

  6. Run the following command if you only wish to see the version of the ADF Installer:

    java -jar runinstaller.jar –version

  7. Run the following command on the command line prompt:

    java -jar runinstaller.jar adfinstaller.properties

34.12.4 Deleting the ADF Runtime Library

If you used the wizard to install the ADF runtime library, you should use the wizard to delete the library. On the Installation Options page in the wizard, choose the Delete option.

If you installed the ADF runtime library manually, you can just manually delete the files from your application server.

34.13 Verifying Deployment and Troubleshooting

After you deploy your application, test it to ensure that it runs correctly on the target application server. This section provides some common troubleshooting tips.

34.13.1 How to Test Run Your Application

Once you've deployed the application, you can run it from the application server. To test run your application, open a browser window and enter an URL of the following type:

  • For Oracle AS: http://<host>:port/<context root>/<page>

  • For Faces pages: http://<host>:port/<context root>/faces/<page>

34.13.2 "Class Not Found" or "Method Not Found" Errors

Problem

You get "Class Not Found" or "Method Not Found" errors during runtime.

Solution

Check that ADF runtime libraries are installed on the target application server, and that the libraries are at the correct version.

You can use the ADF Runtime Installer wizard in JDeveloper to check the version of the ADF runtime libraries. To launch the wizard, choose Tools > ADF Runtime Installer > Application_Server_Type. Application_Server_Type is the type of the target application server (for example, WebLogic, JBoss, or standalone OC4J).

34.13.3 Application Is Not Using data-sources.xml File on Target Application Server

Problem

After deploying and running your application, you find that your application is using the data-sources.xml file that is packaged in the application's EAR file, instead of using the data-sources.xml file on the target application server. You want the application to use the data-sources.xml file on the target application server.

Solution

When you create your EAR file in JDeveloper, choose not to include the data-sources.xml file. To do this:

  1. Choose Tools > Preferences to display the Preferences dialog.

  2. Select Deployment on the left side.

  3. Deselect Bundle Default data-sources.xml During Deployment.

  4. Click OK.

  5. Re-create the EAR file.

Before redeploying your application, undeploy your old application and ensure that the data-sources.xml file on the target application server contains the appropriate entries needed by your application.

34.13.4 Using jazn-data.xml with the Embedded OC4J Server

If your application uses jazn-data.xml, you should be aware of how the embedded OC4J server uses this file: If the embedded OC4J server finds a jazn-data.xml file in the application's META-INF directory, then the embedded OC4J server will use it. The embedded OC4J server will also set the <workspace>-oc4j-app.xml file to point to this jazn-data.xml file. This enables you to edit the jazn-data.xml file using the Embedded OC4J Server Preferences dialog.

If there is no jazn-data.xml file in META-INF, the embedded OC4J server will create a <workspace>-jazn-data.xml file in the workspace root. You would then have to go and edit that file (or use the Embedded OC4J Server Preferences dialog to do so).

34.13.5 Error "JBO-30003: The application pool failed to check out an application module due to the following exception"

Problem

You get the following error in the error log:

05/11/07 18:12:59.67 10.1.3.0.0 Started
05/11/07 18:13:05.687 id: 10.1.3.0.0 Started
05/11/07 18:13:38.224 id: Servlet error
JBO-30003: The application pool (<class_name>) failed to checkout an application
 module due to the following exception:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught:
oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught:
oracle.classloader.util.AnnotatedClassFormatError, msg=<classname> (Unsupported
 major.minor version 49.0)

      Invalid class: <classname>
             Loader: webapp5.web.id:0.0.0
        Code-Source: /C:/oc4j/j2ee/home/applications/webapp5/webapp5/WEB-INF/classes/
      Configuration: WEB-INF/classes/ in C:\oc4j\j2ee\home\applications\webapp5\webapp5\WEB-INF\classes
 
    Dependent class: oracle.jbo.common.java2.JDK2ClassLoader
             Loader: adf.oracle.domain:10.1.3
        Code-Source: /C:/oc4j/BC4J/lib/adfm.jar
      Configuration: <code-source> in /C:/oc4j/j2ee/home/config/server.xml

    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1892)

Solution

A possible cause of this exception is that the application was unable to connect to the database for its data bindings. Check that you have set up the required database connections in your target application server environment, and that the connections are working.