Sunday, September 6, 2015

Configure Weblogic 12c 12.1.3 for ADF deployments

Below is the step-by-step process for creating a deployment environment for Application Development Framework (ADF) applications. Included are steps to install weblogic 12c server, creating a managed server and applying the Java Runtime Files (JRF) for the ADF.

Following softwares are required for this setup, WebLogic Server 12c (12.1.3.0.0), Fusion Middleware Infrastrucuture, Application Development Runtime (ADR) 12.1.3.0.0, JDK7 and JDeveloper 11g.

Download the below specific softwares from OTN site,


fmw_12.13.0.0_wls.jar 
wls1213_dev_update3.zip
fmw_ADR_12.1.3.0.0_infrastructure_Disk1_1of1.zip
jdk-7u80-linux-x64.tar.gz


Download 12c weblogic
http://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html


Download JDK 1.7
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jre-7u80-oth-JPR


Download Application Development Runtime (ADR)
http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html

Pre-requisite on Linux 64bit OS

vi /etc/security/limits.conf

fmwadf   soft    nproc   2047
fmwadf   hard    nproc   16384
fmwadf   soft    nofile  4096
fmwadf   hard    nofile  65536
fmwadf   soft    stack   10240

useradd fmwadf
usermod -u 504 -g dba -G dba,oinstall fmwadf
passwd fmwadf

Install WebLogic Server

# which java
/u03/oracle/mwadf/jdk1.7.0_80/bin/java

# java -jar fmw_12.1.3.0.0.wls.jar










Install Application Development Runtime (ADR)

The Application Development Runtime (ADR) is used to extend a Java EE server (WebLogic or WebSphere) with the ADF Runtime libraries. This prepares the server to accept the deployment of ADF based applications and hence the running of said applications.

Download and install ADR 12c.
Download software from
http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html


# chmod -R 777 fmw_12.1.3.0.0_infrastructure.jar
# which java
/u03/oracle/jdk1.7.0.80/bin/java

# java -jar fmw_12.1.3.0.0_infrastructure.jar

At the end of the installation an 'em' enterprise manager directory gets created in the MW_HOME directory /u03/oracle/mwadf/em









CREATE NEW DATABASE 'REPODB' 


Create a new repository database (11g or 12c) that will host the repository schemas,



·         Metadata Services (MDS)
·         Audit Services (IAU)
·         Audit Services Append (IAU_APPEND)
·         Audit Services Viewer (IAU_VIEWER)
·         Oracle Platform Security Services (OPSS)
·         User Messaging Service (UMS)
·         WebLogic Services (WLS)
·         Call Control (UCSCC)
·         Service Table (STB)

Note: The database should character set of AL32UTF8, and National Character Set of AL16UTF16 Unicode UTF16. 

Configure the Listener and register the database service "repodb.oracle.com".


CREATE NEW RCU SCHEMAS USING  RCU 12.1.3 UTILITY


From 12c, RCU utility comes with the Infrastructure software that was installed in the previous step.

RCU will create the following schemas in the database.

Metadata Services (MDS)
Audit Services (IAU)
Audit Services Append (IAU_APPEND)
Audit Services Viewer (IAU_VIEWER)
Oracle Platform Security Services (OPSS)
User Messaging Service (UMS)
WebLogic Services (WLS)
Call Control (UCSCC)
Service Table (STB)


# su - fmwadf
# cd /u03/oracle/mwadf/bin
# which java
/u03/oracle/jdk1.7.0_80/bin/java
# export JAVA_HOME=/u03/oracle/jdk1.7.0_80
# ./rcu











Create WebLogic Domain and Managed Server for ADF

export MW_HOME=/u03/oracle/mwadf
export WL_HOME=$MW_HOME/wlserver
export ORACLE_HOME=$MW_HOME
export DOMAIN_HOME=$MW_HOME/user_projects/domains/adf_domain
export JAVA_HOME=$MW_HOME/jdk1.7.0_80
export PATH=$ORACLE_HOME/OPatch:$JAVA_HOME/bin:$PATH:/u03/oracle/mwoam/modules/org.apache.ant_1.7.1/bin:.

# cd /u03/oracle/mwadf/wlserver/common/bin
# ./config.sh










Port Pool = 10






Node Manager Listen Port set from 5556 to 5566.



On the "Assign Servers to Machines" screen, select a machine in the right pane, only ADFMachine in this case, and then select the ADFServer in the left pane and shuttle it to the right. This assign the ADFServer to the ADFMachine for purposes of management. Select Next to continue.






Apply Java Runtime Files (JRF) Template to the Managed Server

Now that the ADFServer has been started, the reader will need to apply the JRF  Template to the Managed Server in order to deploy and run their ADF applications on the server. In an earlier step, the ADR libraries (required libraries to run an ADF application on WebLogic or WebSphere) were installed and the Managed Server was created. When the  JRF Template is applied to the Managed Server, the ADR libraries ared added to that server in order to run ADF based applications. This can also be done via command line invocation or through Oracle Enterprise Manager as demonstrated here.

Launch a web browser and enter the url for Enterprise Manager:
http://ed-olraclin.oracle.com:7011/em. If a different port for the AdminServer has been used, then simply replace it with the one supplied here. This also applies to the host name. Use the same credentials (uid/pwd) here that was used during creation of the adf_domain earlier. These credentials are also the same as used to login to the Administration Server.

Click on ‘APPLY JRF TEMPLATE’




Create boot.properties file for auto login.

Create boot.properties file in /u03/oracle/mwadf/user_projects/domains/adf_domain/servers/AdminServer/security/boot.properties

Then restart the admin and managed servers.

URLs & Ports

http://ed-olraclin:7011/console
http://ed-olraclin:7011/em
ADFServer Server Listen port : 7013
Node manager listen port 5566

START NODE MANAGER FOR ADFServer

su - fmwadf
export MW_HOME=/u03/oracle/mwadf
export WL_HOME=$MW_HOME/wlserver
export ORACLE_HOME=$MW_HOME
export DOMAIN_HOME=$MW_HOME/user_projects/domains/adf_domain
export JAVA_HOME=$MW_HOME/jdk1.7.0_80
export PATH=$ORACLE_HOME/OPatch:$JAVA_HOME/bin:$PATH:/u03/oracle/mwoam/modules/org.apache.ant_1.7.1/bin:.


From 12c version of Weblogic, Node manager should be started from Domain_home/bin directory i.e from adf_domain/bin directory itself.

cd /u03/oracle/mwadf/user_projects/domains/adf_domain/bin
nohup ./startNodeManager.sh &
tail -f nohup.out

cd /u03/oracle/mwadf/user_projects/domains/adf_domain/bin
nohup ./startWebLogic.sh &

Bibliography
http://www.oracle.com/webfolder/technetwork/jdeveloper/howto/11114/managedserver/wlsadfms.html


For any further queries please don't hesitate to contact me on samiora@gmail.com