Вы находитесь на странице: 1из 27

Content Server Setup on Oracle 10g iAS (10.1.

3)
An Oracle White Paper OCT 2009

CONTENT SERVER SETUP ON ORACLE 10G IAS (10.1.3) Content Server Setup on Oracle 10g iAS (10.1.3) Setup Solution Option 1 For 10.1.3.1.0 and greater Option 2 Steps common to option1 and option2 CONTENT SERVER TROUBLESHOOTING: Steps of Installing the 10g Application Server (10.1.3.0.0) Steps of Installing the 10g Application Server (10.1.3.1.0)

0 3 4 4 4 7 10 13 21 26

Content Server Setup on Oracle 10g iAS 10.1.3

Page 2

Content Server Setup on Oracle 10g iAS (10.1.3)

Prior to Oracle 10g iAS, Oracle Application server had jserv installed/delivered along with it. So, the earlier metalink note to copy the servlets in jserv/servlets directory, create alias in httpd.conf, modify zone.properties were valid. However, from Oracle 10g onwards, jserv is de-supported and is no longer a part of iAS Install 10g Application server (preferably 10.1.3.0.0 ) of type standalone OPMN managed OC4J server that uses the builtin OC4J Web server to directly receive and respond to HTTP[S] requests. Choose the option J2EE Server and Process Management while installing. This does not contain the Oracle HTTP Server. Notation: $ORACLE_HOME is the path where application server is installed. e.g. D:\product\10.1.3\Oracle AS_1 $J2EE_HOME is $ORACLE_HOME/j2ee/home The default http port for oc4j is 8888. You can change the port after installations, if required. Steps to change the port after installation are: In 10gAS 10.1.3.1, you can login to enterprise manager and change the port as follows 1. 2. 3. 4. After logging in choose cluster topology link in breadcrumb. Select Runtime Ports link in Administration region. Select the edit link beside http port number. Update the port number and apply.

For prior versions of 10gAS, you can manually change the port as follows 1. 2. Go to $ORACLE_HOME/opmn/conf opmn.xml has the following line

<port id="default-web-site" range="8888" protocol="http"/> 3. Update the port number to 7777.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 3

SETUP SOLUTION

The solution to setup a content server is briefly as follows 1. Create an application contents under OC4J default instance. Content is a web application that is deployed with contents.war, a web archive of the class files that you were copying under servlets directory earlier. 2. Create another application contentstorage under OC4J default instance again. This is a dummy web application with Allow directory browsing set to yes. This will allow the player module in the learning management application to access the content directly using a http url. You can install the Content Server in the following two ways:
OPTION 1

The steps to deploy these applications are as below, 1. Add the following lines in application.xml ($J2EE_HOME /config). This must be added between the <orionapplication> and </orion-application> tags. This is to tell the container about the war files to be deployed. <web-module id="contents" path="../../home/applications/contents.war" /> <web-module id="contentstorage" path="../../home/applications/ContentStorage.war" /> 2. Add the following lines in default-web-site.xml ( $ J2EE_HOME /config). This is to tell the OC4J HTTP server about the web module deployed with the applications. It's important to note that the application attribute must specified as "default" since you have deployed your Web module to the default application. The name attribute should match the ID attribute you specified for the Web module. This should be added between the <web> and </web> tags. <web-app application="default" name="contents" load-on-startup="true" root="/" /> <web-app application="default" name="contentstorage" load-on-startup="true" root="/contentstorage" /> (b) Remove the attribute root from default-web-app element. <default-web-app application="default" name="defaultWebApp" root=/j2ee/> Should be changed to: <default-web-app application="default" name="defaultWebApp"/> Important Note: If any one does not want to remove root=/j2ee because of some business need, then one should choose Option2 of content server installation.
FOR 10.1.3.1.0 AND GREATER

For release 11i you will need patch:

7290918 - SET UP CONTENT SERVER USING FULL VERSION OF 10G IAS SERVER
This will provide ContentServerWeb.xml at version 115.1 For release R12 you will need patch:

7427646 - SET UP CONTENT SERVER USSING 10.1.3.1 VERSION OF 10G IAS SERVER
This will provide ContentServerWeb.xml at version 120.0.12000000.2 (Note: This is fixed in 12.0.7 but not in 12.1.1)

Content Server Setup on Oracle 10g iAS 10.1.3

Page 4

3.

Create a file contents.war as follows: Create a directory WEB-INF anywhere

Copy ContentServerWeb.xml (from the application middle tier $JAVA_TOP/oracle/apps/ota/admin/common/util) as web.xml and place it under the WEB-INF directory just created. Create the following directory structure under this same WEB-INF directory: classes oracle apps fnd common

You also have to include the following file under the WEB-INF/classes dicrectory oracle apps fnd metadata

DatabaseClass.class (copied from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/fnd/metadata) Copy the following into this newly created directory: VersionInfo.class (copied from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/fnd/common) Then also under the same WEB-INF/classes/oracle/apps directory create the following folders ota (This should be at the same level as the fnd folder created above) admin common util (copy the following files from <ApplicationMiddleTier>b $JAVA_TOP/oracle/apps/ota/admin/common/util) ContentServerClientData.class ContentServerServlet.class ProtocolConstants.class SystemUtils.class SystemUtils$JarUtility.class

Time to create the contents.war file

Content Server Setup on Oracle 10g iAS 10.1.3

Page 5

Open command prompt and navigate to directory under which WEB-INF is present. Execute the command jar -cvf contents.war WEB-INF

4.

Create a file ContentStorage.war as follows: Create another directory WEB-INF anywhere. Copy ContentStorageWeb.xml (from the application middle tier $JAVA/oracle/apps/ota/admin/common/util) as web.xml and place it under this new WEB-INF directory. Open command prompt and navigate to directory under which WEB-INF is present. Execute the command jar -cvf ContentStorage.war WEB-INF

5.

Copy the war files, contents.war and ContentStorage.war under ( $ J2EE_HOME /applications).

<End Of steps specific to option1>

Content Server Setup on Oracle 10g iAS 10.1.3

Page 6

OPTION 2

(You can use this option on unix servers or on servers having issues with steps in Option1) NOTE: If Option 1 failed you will first need to undeploy the contents.war setup in Optiion 1. a. Use EM to stop the services.

b. Edit the $J2EE_HOME/config/application.xml file c. Comment out (or delete) the following line:

<web-module id="contents" path="../../home/applications/contents.war" /> d. Delete the contents.war previously created. e. Continue with the remaining steps as documented below The steps to deploy these applications are: 1. Navigate to $J2EE_HOME/config and edit the application.xml file. This is to tell the container about the war files to be deployed. Add the following line <web-module id="contentstorage" path="../../home/applications/ContentStorage.war" /> Also edit the default-web-site.xml file in the same directory and add the line below. This is to tell the OC4J HTTP server about the web module deployed with the applications. It's important to note that the application attribute must specified as "default" since you have deployed your Web module to the default application. The name attribute should match the ID attribute you specified for the Web module. <web-app application="default" name="contentstorage" root="/contentstorage" load-onstartup="true" /> Navigate to $J2EE_HOME/default-web-app/WEB-INF and edit the file web.xml. Add the following lines:

2.

3.

NOTE: on the <servlet-class> lines is a directory structure. This structure must physically exist and the files must physically exist under this directory structure. <servlet> <servlet-name>OtaContentServerServlet</servlet-name> <servlet-class>oracle.apps.ota.admin.common.util.ContentServerServlet</servlet-class> </servlet> <servlet> <servlet-name>OtaProtocolConstants</servlet-name> <servlet-class>oracle.apps.ota.admin.common.util.ProtocolConstants</servlet-class> </servlet> <servlet> <servlet-name>OtaSystemUtils</servlet-name> <servlet-class>oracle.apps.ota.admin.common.util.SystemUtils</servlet-class>

Content Server Setup on Oracle 10g iAS 10.1.3

Page 7

</servlet> <servlet> <servlet-name>OtaSystemUtils$JarUtility</servlet-name> <servlet-class>oracle.apps.ota.admin.common.util.SystemUtils$JarUtility</servlet-class> </servlet> <servlet> <servlet-name>OtaContentServerClientData</servlet-name> <servlet-class>oracle.apps.ota.admin.common.util.ContentServerClientData</servlet-class> </servlet> <servlet-mapping> <servlet-name>OtaContentServerServlet</servlet-name> <url-pattern>/servlets/*</url-pattern> </servlet-mapping>

NOTE: If you experience problems with your content server alter the url-pattern above as follows by removing the /servlets part of the path. So it reads: <url-pattern>/*</url-pattern> Bounce the server and retest. 4. oracle apps fnd common VersionInfo.class (copy from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/fnd/common) 5. oracle apps fnd metadata DatabaseClass.class (copied from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/fnd/metadata) Also include the following file under the WEB-INF/classes dicrectory Create the following directory structure in the directory $J2EE_HOME/default-web-app/WEB-INF/classes

Content Server Setup on Oracle 10g iAS 10.1.3

Page 8

6. ota admin

Create the following directory structure in the directory $J2EE_HOME/default-web-app/WEB-INF/classes

common util (copy the below files from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/ota/admin/common/util) ContentServerClientData.class ContentServerServlet.class ProtocolConstants.class SystemUtils.class SystemUtils$JarUtility.class 7. Create a file ContentStorage.war as follows a) Create a directory WEB-INF anywhere.

b) Copy and Rename ContentStorageWeb.xml (from <ApplicationMiddleTier> $JAVA_TOP/oracle/apps/ota/admin/common/util) to web.xml and copy it under this new WEB-INF directory. c) Open command prompt and navigate to directory under which WEB-INF is present. d) Execute the command jar -cvf ContentStorage.war WEB-INF

8.

Copy the war file, ContentStorage.war under ( $J2EE_HOME /applications). <End Of steps specific to option2>

Content Server Setup on Oracle 10g iAS 10.1.3

Page 9

STEPS COMMON TO OPTION1 AND OPTION2

1.

Navigate to $J2EE_HOME/config and edit the file oc4j.properties. Add the following line: middletier=10.176.126.54+140.87.205.58+140.87.204.217

jbo.server.in_oc4j=true

java.io.tmpdir=D:\\ContentTemp
Important Note: Check that there is no extra space after any value in the above properties.

The IPs for middle tier is the IP Addresses where Oracle Applications is installed. e.g For JUN05MST, add the IP address of ap6045rt.us.oracle.com.. These values must be seperated by a plus sign (+), any other seperator will cause errors. Value for "java.io.tmpdir" is a valid directory in the system where content server is installed. This will contain temporary files that are created while uploading, importing, exporting content from content server. It must writable and have enough free space for the largest file you may be uploading. 2. Enable directory browsing for the application contentstorage: Login to Application server, e.g. http://10.176.126.54:80/em Under OC4J instances table, click on OC4J instance "home". Click on sub tab "Applications". Click on "default" in the tree. Click on contentstorage from Modules. Click on Administration sub tab. Select Configuration Properties. Check the check box "Allow Directory Browsing". Click on ok.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 10

Content Server Setup on Oracle 10g iAS 10.1.3

Page 11

3.

Define a content server from Learning Administrator > Setup Administrator Host name - IP address where content server is installed. Port - HTTP port of the content server. Physical Directory - $ J2EE_HOME\applications\ContentStorage\ (replace $J2EE_HOME with the installation value) Virtual directory = contentstorage

4.

Create a learning object under Content Administration and Click on upload from Learning Object details page. Upload the file. If you are uploading a single file (instead of zip) then file name that is being uploaded (w/o directory) = Initial file name The learning object starting URL will be like http://10.176.126.54:80/contentstorage/learningdemos/RBAC.ppt where host name (for content server) = 10.176.126.54 port number(for content server) = 80 learningdemos = directory entered while uploading the file RBAC.ppt - Initial file (entered when uploading the file into lo)

Content Server Setup on Oracle 10g iAS 10.1.3

Page 12

CONTENT SERVER TROUBLESHOOTING: Overview: This section attempts to list the common issues that arise when configuring and utilizing and OLM content server. 1) Collect the following files immediately after the error is produdec or reproduced. (a) OC4J~home~default_group~1 file under $ORACLE_HOME\opmn\logs You should first check this file if you get any errors. If you have made some mistakes in oc4j.properties like putting extra space after key value pair, then that would be reflected here. If there is no error in this file, then check other two. (b) global-application.log file under $J2EE_HOME\log\home_default_group_1 If you are having some difficulties in initialization of your main servlet class ContentServerServlet.java, then that would reflect in this file. One of the main causes of initialization problem is that you have forgotten to include some files as mentionedpreviously in this document. (c) default-web-access-<date>.log under $J2EE_HOME\log\home_default_group_1 This file keeps the status of communication between the middle tier and content server. Check the log line POST /servlets/oracle.apps.ota.admin.common.util.ContentServerServlet?Connection=%3Copen%2F%3E&Operation=0 HTTP/1.1" <response code> In case of successful transaction, the response code will be 200. If there is any problem with servlet initialization, then the response code will be 500 (Internal server error). Note: If you have forgotten to remove the root=/j2ee from application.xml as mentioned in section 2.b of Option1, then log line will have URL start with /j2ee e.g. POST /j2ee/servlets/oracle.apps.ota.admin.common.util.ContentServerServlet?Connection=%3Copen%2F%3E&Operation=0 HTTP/1.1" 404 And response code will be 404 (source not found).

Content Server Setup on Oracle 10g iAS 10.1.3

Page 13

Here is the list of files to collect to aid support in diagnosing your issue: OC4J~home~default_group~1 log file ( $ORACLE_HOME\opmn\logs) global-application.log file ($J2EE_HOME\log\home_default_group_1) default-web-access-<date>.log ($J2EE_HOME\log\home_default_group_1)

application.xml ($J2EE_HOME/config). default-web-site.xml ( $ J2EE_HOME/config). web.xml ($J2EE_HOME/default-web-app/WEB-INF) oc4j.properties ($J2EE_HOME/config) ias.properties ($ORACLE_HOME/config) opmn.xml ($ORACLE_HOME/opmn/conf)

Content Server Setup on Oracle 10g iAS 10.1.3

Page 14

2) Error: Input/output Error, or, uploaded or imported files did not appear on the file server while uploading content or Content Upload failed Error. a) Check that following files are the same version and size on both the Application Middle tier and Content server. ContentServerClientData.class(java) ContentServerServlet.class ProtocolConstants.class SystemUtils.class SystemUtils$JarUtility.class

Question: How Can I check the File version. Answer: Run the ident command on file: ident <file path>. Or strings <file name>| grep '$Header:

For Windows based installations you can use the findstr command. Open a command prompt and cd to the correct directory. issue findstr ContentServerServlet.class Header (This is just an example) The is quite a bit of information returned, but you will see the header information including the name and version b) Also check that above files have execute permission on server. Question: How can one check that execute permission is given or not? Answer: Run the ls l unix command for files. It gives the permission set allotted to the files. c) Check that files are not miscopied. This means the file name and class name should be same. e.g if file name is ContentServerSevlet.class , then the class contained by this file also should be ContentServerSevlet. At least one issue was resolved when it was found the ContentServerSevlet.class file was miscopied from the ContentServerClientData.class file. Question: How can I check whether the file name and class name are same? Answer: Run the ident command on file. It gives you class name as well as version. ident <file path> or strings <file name>| grep '$Header: d) Confirm with their Network/Firewall team to ensure the proper ports are open to allow communication between the two servers to occur. e) Verify that ip address is the physical Ip Address. f) If there is load balancing then mention ip address of all the balancing servers.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 15

g) Check that url names and ip address are matching Question: How can I find out that URL and ip address are matching. Answer: Run the nslookup command on both content server and middle tier for each other. Command syntax is: nslookup <ipaddress> nslookup <url name > Example: Run the nslookup at content server for apps instance name C:\> nslookup ap6045rt.us.oracle.com Server: Address: 130.35.249.41 130.35.249.41#53

Name: ap6045rt.us.oracle.com Address: 140.87.205.11 And specify 140.87.205.11 in the oc4j.prop file 3) Content server is not running error while uploading content Question: How can I check the status of content server? Answer: Use the following two options: a) Check the status of server by running the following command opmnctl status l Run this command from inside the <oracle home>/opmn/bin directory. b) Can also check the status by accessing the Oracle Enterprise Manager 10g Application Server Control. Read the <ORACLE HOME>/install/readme.txt for information regarding Oracle Enterprise Manager 10g Application Server Control

Content Server Setup on Oracle 10g iAS 10.1.3

Page 16

Question: How to check whether servlet is up or not? Answer: Type http://<contentserverip>:<port no>/servlets/ in your web browser. It should show the following screen:

Now log into the Enterprise Manager Interface and go to contents application page. Steps to reach the contents application home page are as follows: (a) Under OC4J instances table, click the name of OC4J instance name (home by default). You will reach the home page of OC4J instance as shown in the following image.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 17

(b) Click the default link. You will reach the default application home page as shown below.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 18

(c) Click the contents under module. You will reach the home page of contents application as shown below:

(d) Check that OtaContentServerServlet should appear under section Active Servlets?JSPs (3) Authentication failure error or Content Upload failed Error (a)Check the oc4j.properties file under $J2EE_HOME/config that middletier key has the ip address of middle tier. (b) Check root=/j2ee is removed as it mentioned in section 2.b under Option1. (c) Check that in oc4j.properties file there is no extra space after key-value pair. e.g. java.io.tmpdir=D:\\ContentTemp here check that there is no extra space after D:\\ContentTemp. (4) Where To Find Cause of Errors You can look at the following three log files to find out the cause of error: (a) OC4J~home~default_group~1 file under $ORACLE_HOME\opmn\logs You should first check this file if you get error. If you have made some mistakes in oc4j.properties like putting extra space after key value pair, then that would reflect here. If there is no error in this file, then check other two. (b) global-application.log file under $J2EE_HOME\log\home_default_group_1

Content Server Setup on Oracle 10g iAS 10.1.3

Page 19

If you are having some difficulties in initialization of your main servlet class ContentServerServlet.java, then that would reflect in this file. One of the main causes of initialization problem is that you have forgotten to include some files as mentioned in document above. (c) default-web-access-<date>.log under $J2EE_HOME\log\home_default_group_1 This file keeps the status of communication between the middle tier and content server. Check the log line POST /servlets/oracle.apps.ota.admin.common.util.ContentServerServlet?Connection=%3Copen%2F%3E&Operation=0 HTTP/1.1" <response code> In case of successful transaction, the response code will be 200. If there is any problem with servlet initialization, then the response code will be 500 (Internal server error). Note: If you have forgotten to remove the root=/j2ee from application.xml as mentioned in section 2.b of Option1, then log line will have URL start with /j2ee e.g. POST /j2ee/servlets/oracle.apps.ota.admin.common.util.ContentServerServlet?Connection=%3Copen%2F%3E&Operation=0 HTTP/1.1" 404 And response code will be 404 (source not found).

Content Server Setup on Oracle 10g iAS 10.1.3

Page 20

Steps of Installing the 10g Application Server (10.1.3.0.0)

This is the starting page.

(a) Provide value in text box against Installation Directory (by default it is D:\product\10.1.3\OracleAS_1). This is called the $ORACLE_HOME (b) Choose the Advance Installation mode. (c) Click Next.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 21

(d) Select option J2EE Server and Process Management (468 MB). (e) Click Next.

(f) Click Next.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 22

(g) Select the check box (configure this as an Administration OC4J instance) and click Next.

(h) Provide all the details. You will require the password that you provide here when you log into the Manager Interface using http://<contentserveripaddress>:<port>/em. (i) You can also provide the OC4J instance name (by default it is home).

Content Server Setup on Oracle 10g iAS 10.1.3

Page 23

(j) Click Next.

(k) Click Next.

(l) Click Install.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 24

(m) You should get this window without an error. Click Next.

(n) This is the final window showing successful installation. Click Exit. All information regarding installation, URL for manager interface, and other details are available in the readme.txt file under $ORACLE_HOME/install directory.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 25

STEPS OF INSTALLING THE 10G APPLICATION SERVER (10.1.3.1.0)

1) Download the 10g SOA application 2) Unzip this 3) Run the Setup:

4) You should see the form; fill in the name for this installation and the password you wish to use for the installation. 5) At this point select J2EE Server option, possibly the third one available. 6) Now start at the beginning of this document to complete the content server installation.

Content Server Setup on Oracle 10g iAS 10.1.3

Page 26

White Paper Title: Content Server Setup on Oracle 10g iAS (10.1.3) Created: April 2008 Author: Deepak Singh Modified: November 2008 By: Chuck Hedler Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2008, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Вам также может понравиться