Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0) Part Number B25947-02 |
|
|
View PDF |
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:
Section 34.11, "Deploying to Application Servers That Support JDK 1.4"
Section 34.12, "Installing ADF Runtime Library on Third-Party Application Servers"
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:
Deploying to an application server.
Deploying to an archive file: Applications can be deployed indirectly by choosing an archive file as the deployment target. You can then use tools provided by the application server vendor to deploy the archive file. Information on deploying to selected other application servers is available on the Oracle Technology Network (http://www.oracle.com/technology
).
Deploying for testing: JDeveloper supports two options for testing applications:
Embedded OC4J Server: You can test applications, without deploying them, by running them on JDeveloper's embedded Oracle Containers for J2EE (OC4J) server. OC4J is the J2EE component of Oracle Application Server.
Standalone OC4J: In a development environment, you can deploy and run applications on a standalone version of OC4J prior to deploying them to Oracle Application Server. Standalone OC4J is included with JDeveloper.
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.
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:
ADF Faces require Sun's JSF Reference Implementation 1.1_01 (or later) and MyFaces 1.0.8 (or later).
ADF Faces applications cannot run on an application server that only supports JSF 1.0.
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:
In the Connections Navigator, right click Application Server and choose New Application Server Connection. The Create Application Server Connection wizard opens.
Click Next to proceed to the Type page.
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.
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.
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.
On the Authentication page enter a user name and password that corresponds to the administrative user for the application server. Click Next.
On the Connection page, identify the server instance and configure the connection. Click Next.
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.
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:
In the Applications Navigator, select the project for which you want to create a profile.
Choose File > New to open the New Gallery.
In the Categories tree, expand General and select Deployment Profiles.
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.
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.
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.
Click OK to close the dialog.
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:
In the Applications Navigator, select the project for which you want to create a descriptor.
Choose File > New to open the New Gallery.
In the Categories tree, expand General and select Deployment Descriptors.
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 toapplication.xml
, data-sources.xml
, jazn-data.xml
, and orion-application.xml
.To view or change deployment descriptor properties:
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.
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.
Click OK when you are done.
To edit a deployment descriptor as an XML file:
In the Applications Navigator, right-click the deployment descriptor and choose Open. The file opens in an XML editor.
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:
web.xml
—See Section 11.4.2.1, "More About the web.xml File" for ADF and JSF entries in this file.
faces-config.xml
and adf-faces-config.xml
files. See Section 11.4.2.2, "More About the faces-config.xml File" and Section 11.4.2.3, "Starter adf-faces-config.xml File" for details.
JAR files used by JSF and ADF Faces:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
and jsf-impl.jar
—These JAR files are the JSF reference implementation that JDeveloper includes by default.
Note:
If you are using another JSF implementation (such as MyFaces), you must include the JAR files for those libraries when you create the deployment profile and remove the JSF JAR files (jsf-api.jar
and jsf-impl.jar
) from the WAR file; otherwise, your application will not run correctly.jstl.jar
and standard.jar
—These are the libraries for the JavaServer Pages Standard Tag Library (JSTL).
adf-faces-api.jar
—Located in the ADF Faces runtime library, this JAR contains all public ADF Faces APIs and is included in the WAR by default.
adf-faces-impl.jar
—Located in the ADF Faces runtime library, this JAR contains all private ADF Faces APIs and is included in the WAR by default.
adfshare.jar
—Located in the ADF Common runtime library, this JAR contains ADF Faces logging utilities.
If you have installed the ADF runtime libraries, which are required if you are deploying ADF Business Components, adfshare.jar
is included in the WAR by default. Otherwise, you must manually include adfshare.jar
in WEB-INF/lib
when creating the WAR deployment profile.
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:
Right-click the deployment profile, choose Deploy to from the context menu, then select the application server connection that you created earlier (in step 2).
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:
Right-click the deployment profile and choose Deploy to WAR file (or Deploy to EAR file) from the context menu.
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:
For Oracle AS: http://<host>:port/<context root>/<page>
For Faces pages: http://<host>:port/<context root>/faces/<page>
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.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
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
.
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.
This section describes deployment details specific to Oracle Application Server:
Section 34.6.1, "Oracle Application Server Versions Supported"
Section 34.6.2, "Oracle Application Server Release 2 (10.1.2) Deployment Notes"
Section 34.6.3, "Oracle Application Server Deployment Methods"
Section 34.6.4, "Oracle Application Server Deployment to Test Environments ("Automatic Deployment")"
Section 34.6.5, "Oracle Application Server Deployment to Clustered Topologies"
Table 34-2 shows the supported versions of Oracle Application Server:
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 |
---|---|
|
|
|
|
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.
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.
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.
This section describes deployment details that are specific to JBoss.
Table 34-4 shows the supported versions of JBoss:
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.
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.
This section describes deployment details that are specific to WebLogic.
Table 34-5 shows the supported versions of WebLogic:
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.
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:
Select the project in the Applications Navigator.
Select File > New to display the New Gallery.
In Categories, expand General and select Deployment Descriptors.
In Items, select J2EE Deployment Descriptor Wizard and click OK.
Click Next in the wizard to display the Select Descriptor page.
On the Select Descriptor page, select application.xml and click Next.
On the Select Version page, select 1.3 and click Next.
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.
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.
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/
).
This section describes deployment details that are specific to WebSphere.
Table 34-6 shows the supported versions of WebSphere:
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.
You can deploy using the WebSphere console (for example: http://
<websphere_host:port>
/ibm/console/
).
This section describes deployment details that are specific to Tomcat.
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.
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:
Install J2SE 1.4 on the machine running JDeveloper.
Configure JDeveloper with the J2SE 1.4 that you installed:
In JDeveloper, choose Tools > Manage Libraries. This displays the Manage Libraries dialog.
In the Manage Libraries dialog, choose the J2SE Definitions tab.
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.
Click OK.
Configure your project to use J2SE 1.4:
In the Project Properties dialog for your project, select Libraries on the left-hand side.
On the right-hand side, click the Change button for the J2SE Version field. This displays the Edit J2SE Definition dialog.
In the Edit J2SE Definition dialog, on the left-hand side, select 1.4 under User.
Click OK in the Edit J2SE Definition dialog.
Click OK in the Project Properties dialog.
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:
Configure JDeveloper 10.1.3.4 according to the steps above.
Stop the embedded OC4J server instance.
Delete the following directory:
ORACLE_HOME/j2ee/instance/application-deployments
Start the embedded server again.
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:
For WebLogic, JBoss, and Tomcat, you can install the ADF runtime libraries from JDeveloper using the ADF Runtime Installer wizard. See Section 34.12.1, "Installing the ADF Runtime Libraries from JDeveloper".
For WebSphere, you have to install the ADF runtime libraries manually. See Section 34.12.2, "Configuring WebSphere 6.0.1 to Run ADF Applications".
For all application servers, you can install the ADF runtime libraries manually. See Section 34.12.3, "Installing the ADF Runtime Libraries Manually".
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:
Stop all instances of the target application server.
(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:
From the Start menu, choose Programs > BEA WebLogic Platform 8.1 > Configuration Wizard. This starts up the Configuration wizard.
On the Create or Extend a Configuration page, select Create a new WebLogic Configuration. Click Next.
On the Select a Configuration Template page, select Basic WebLogic Server Domain. Click Next.
On the Choose Express or Custom Configuration page, select Express. Click Next.
On the Configure Administrative Username and Password page, enter a username and password. Click Next.
On the Configure Server Start Mode and Java SDK page, make sure you select Sun's JDK. Click Next.
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:
From the Start menu, choose Programs > BEA Products > Tools > Configuration Wizard. This starts up the Configuration wizard.
On the Welcome page, select Create a new WebLogic Domain. Click Next.
On the Select a Domain Source page, select Generate a domain configured automatically to support the following BEA products. Click Next.
On the Configure Administrator Username and Password page, enter a username and password. Click Next.
On the Configure Server Start Mode and JDK page, make sure you select Sun's JDK. Click Next.
On the Customize Environment and Services Settings page, select No. Click Next.
On the Create WebLogic Domain page, set the domain name. For example, you might want to set it to jdevdomain
. Click Create.
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).
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.
(WebLogic only) Edit WebLogic startup files so that WebLogic includes the ADF runtime library when it starts up.
Steps for WebLogic 8.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.
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.
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:
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.
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%
If the "set CLASSPATH" line does not have %CLASSPATH%
, then add it to the line, as shown above.
To start WebLogic, change directory to %DOMAIN_HOME%
and run startWebLogic.cmd
:
> cd %DOMAIN_HOME% > startWebLogic.cmd
(WebLogic only) Before you run JDeveloper, configure JDeveloper to include the WebLogic client in its class path.
Make a backup copy of the JDEVELOPER_HOME\jdev\bin\jdev.conf
file because you will be editing it in the next step.
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.
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.
Before you can run ADF applications on WebSphere 6.0.1, you have to perform these steps:
Create the install_adflibs_1013.sh
(or .cmd
on Windows) script, as follows:
If you are running on UNIX:
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
.
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.
Stop the WebSphere processes.
Run the install_adflibs_1013.sh
(.cmd
on Windows) script to install the ADF libraries, as follows:
Set the ORACLE_HOME environment variable to point to the JDeveloper installation.
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.
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
Start WebSphere processes.
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.
Add the following parameter in the Java command for starting up WebSphere.
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
Shut down and restart WebSphere so that it uses the new parameter.
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
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
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
|
These are the ADF runtime library files. |
From
|
These are the ADF runtime library files. |
From
|
These are the JDeveloper runtime library files. |
From
From
|
These are the Oracle MDS files. |
From
|
These are the Oracle diagnostics files. |
From
|
These are the OJMisc runtime files. |
From
|
This file is for XML support. |
From
|
These are the XSQL library files. |
From
|
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
|
These are the SQLJ runtime library files. |
From
From
|
These are the JDBC runtime library files. |
From
|
These are the Java Cache runtime library files. |
From
|
This file is for Business Components web application image and cascading style sheet support. If you are running Tomcat, copy the If you are running JBoss, copy the |
The destination directory (the directory to which you copy these files) depends on your application server:
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:
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.
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)
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
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
Shut down all instances of the application server running on the target platform.
Run the following command if you only wish to see the version of the ADF Installer:
java -jar runinstaller.jar –version
Run the following command on the command line prompt:
java -jar runinstaller.jar adfinstaller.properties
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.
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.
Section 34.13.2, ""Class Not Found" or "Method Not Found" Errors"
Section 34.13.3, "Application Is Not Using data-sources.xml File on Target Application Server"
Section 34.13.4, "Using jazn-data.xml with the Embedded OC4J Server"
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>
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).
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:
Choose Tools > Preferences to display the Preferences dialog.
Select Deployment on the left side.
Deselect Bundle Default data-sources.xml During Deployment.
Click OK.
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.
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).
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.