Monday, November 25, 2019

Installing Oracle Webcenter 11.1.1.8.0 & Developing Portlet Using JDeveloper

We’ve explained the basic concepts about the Portlet container through different tutorials about Portlets and Portals here.
We have a lot of Open source Portal vendors like Apache PlutoLiferaySakaiJetspeed and many more. We also have closed source Portals like IBM WebSphere and Oracle Webcenter.
This tutorial is mainly aimed to help you getting started and deploying the first Portlet into Oracle Webcenter.

Contents at a glance…

Oracle Webcenter Introduction

Before getting started installing Oracle Webcenter and using it to produce the first Portlet against its framework, it’s worth to take a look for the Oracle Webcenter’s Portal.
Practically, Oracle Webcenter is one of the Portals that compliant with the JSR-168/286 as it also provides a vast amount of Portlet types like Prebuilt Portlets (i.e. Portlets resulted in from the integration with other the oracle applications like Peoplesoft, JD Edwards and Oracle E-Business Suite), JavaServer Faces (JSF) Portlets, Custom Java Portlets (i.e. they’re standard Portlets that stands for JSR286), OmniPortlet – Declarative Portlet-Building Tool, Web Clipping Portlet – Is a browser-based declarative tool that enables the integration of any web application with a framework application, and many others.
Following below a figure shows you the different Portlet types and the different possible scenarios that could lead you for specifying a certain type of Portlet to be used.
Oracle Webcenter - Portlet Types
As we’ve concentrated in our discussion onto Portlets development mission, and how can they be implemented inside an Oracle Webcenter Portlet container, considering that the most of Portlet containers have had implemented the Portlets likely using the same way with a little bit different in the deployments. Let’s going forward to install the Oracle Webcenter and see how it’s used willingly for achieving that.

Pre-Requisites for Oracle Webcenter

Before getting started installing the Oracle Webcenter, it should be clarify you the steps required for doing that as the Oracle documentation are too long with some scattered information would make the installing process so complicated. Following below steps should summarize you the way that we would go through to install Oracle Webcenter abstractly.
  • Create Oracle Webcenter schema.
  • Create Oracle WebLogic 10.3.5 (Oracle Fusion Middleware).
  • Installing Oracle Webcenter Portal.
  • Installing Oracle JDeveloper.
Let’s before getting jump into database schema creation locate the needed installation binaries and their valid releases for the installation process. Following below the required binaries for getting started the process:
Just one minor note here, at every time you would to install a software among these already listed above, you should accept the Oracle’s terms and conditions.

Create Oracle Webcenter Schema

Many of the Oracle Fusion components require the existence of Schemas in a database prior to installation. Oracle’s RCU utility would save your time and create all of these required Schemas/Tables on behalf of you.
Let’s see how we can use this utility for creating the all required Oracle Webcenter Portal’s database assets.
  • If you’ve downloaded the RCU utility successfully, you’re likely getting a file called ofm_rcu_win_11.1.1.8.0_64_disk1_1of1.zip, so just unzip it into your storage to have a folder looks like this (As we’ve chosen D:/OracleWebCenter/rcuHome):
RCU Utility Unzipped Folder
Make sure you’re having a proper installation of Oracle database into your machine, a proper installation should lead you into running listener and instance of oracle itself.
Running Oracle database
  • Open your command console and navigate into your RCU unzipped folder, beneath BIN folder and type there rcu.bat to get a Repository Creation Utility welcome screen.
Repository Creation Utility - Welcome Screen Click next and choose Create as you want to create Oracle Webcenter Schema.
Repository Creation Utility - Create Repository
  • Click next and fill in the database instance connection properties where you’re landing on.
Repository Creation Utility - Database Connection Details
  • Click next and waiting until the RCU utility check its required Prerequisite.
Repository Creation Utility - Checking Prerequiste
  • In case you’ve faced a Warning that’s relevant for database’s character set. Just ignore it or create a database instance with an AL32UTF8 character set. It’s probably you get another warning window that tells you that your database version isn’t supported, just ignore it.
  • Waiting prerequisite phase to be finished, the result must look like below:
Repository Creation Utility - Checking finish successfully
  • Click Okay, and check the WebCenter Portal and all relevant components get selected directly, as you can notice below:
RCU - Select WebCenter Component
  • Click next and set schemas password. We’ve set a one password for all schemas. This password will be used while configuring the Webcenter domain.
RCU - Set Schema Password
  • Click double next to see Map Tablespaces that the utility creates.
RCU - Map Tablespaces
  • Click next and accept the confirmation.
  • Waiting RCU utility while it’s creating mentioned Tablespaces.
RCU - Waiting Tablespaces to be created
RCU - Tablespaces are created successfully
  • Click Okay.
RCU - Create Schema
  • Click create and waiting the schema to be created.
RCU - Waiting schema to be created
RCU - Schema created succesfully

Installing Oracle Weblogic 10.3.6 (Oracle Fusion Middleware)

Oracle Weblogic Middleware is required as Oracle Webcenter requested it to complete its installation. To install Oracle Weblogic Middleware, follow below steps:
  • Select Oracle WebLogic Server 11gR1 (10.3.6) + Coherence + Package Installer software to be downloaded.
  • Double click on the installed software to open the installation wizard.
Oracle Weblogic Middleware - Initial Wizard
  • Click next, select create a new Middle Home and specify the Middleware Home directory. In case you already have had a Pre-installed Oracle Weblogic Middleware, just ignore it and make a new directory for this installation.
Oracle Weblogic Middleware - Specify Home Directory
  • Click next and make check box shown there unchecked as you won’t need any security updates. Click a sequence of next until Oracle Weblogic Middleware installation get started as the information that you would see is just for checking.
Oracle Weblogic Middleware - Installation Paths
Oracle Weblogic Middleware - Installing
Oracle Weblogic Middleware - Installed Successfully

Installing Oracle Webcenter

After creating Oracle Webcenter Portal’s schema, it’s time to get Oracle Webcenter itself installed. However, we supposed that you are already downloading the installation binary of Oracle Webcenter.
The binary files of the Oracle Webcenter is very huge, as such it’s containing a four different disks folder. Look below
Oracle Webcenter Folder
  • Navigate into D:\OracleWebCenter\WebCenter_Installer_11.1.1.8\Disk1\install\win64 and double click on setup.exe.
  • The installer asked you providing your JRE or JDK location.
Initiate Oracle Webcenter Setup Wizard
  • Waiting a while before wizard being displayed.
Oracle Webcenter Wizard - Welcome Screen
  • Click next and skip software updates.
Oracle Webcenter Wizard - Step 2
  • Click next. The wizard will check your prerequisite automatically. Click next and determine the Oracle Middleware home and Oracle Home Directory. This directory should be the same directory you’ve created while installing the Oracle Middleware.
Oracle Webcenter Wizard - Step 4
  • The installer will detect the Weblogic server you’ve installed and it will list it for you to choose.
Oracle Webcenter Wizard - Step 5
  • Click next and install to start installation.
Oracle Webcenter Wizard - Step 7
  • Waiting the wizard until it’s finished its work.
Oracle Webcenter Wizard - Installation Finished
  • Click next and finish.

Configure Weblogic Domain

Running an Oracle Webcenter requires you to define your own domain, your domain can be configured by following below steps:
  • Open your window menu and select Configuration Wizard.
Domain Configuration - Open Configuration Wizard
Domain Configuration - Initial Screen
  • As we didn’t create a domain before, you must check the create a new Weblogic domain.
  • Click next and make sure you’ve checked the components to be like below:
Domain Configuration - Select Domain Source
Be sure that you’re selecting only these figured out above.
  • Click next and specify the domain name and location.
Domain Configuration - Specify Domain Name and Location
  • Click next and specify the Weblogic Server name and password. We’ve used weblogic123 as a password.
Domain Configuration - Specify Administrator Name And Password
  • Configure server start mode and the used JDK.
Domain Configuration - Specify Server Start Mode And JDK
  • Click next and configure the JDBC component schema. Notice that you must provide only the password that you’ve set the same password that you’re providing while the RCU creates the Schema. We’ve already provided sys as a password above.
Domain Configuration - Configure JDBC component schema
  • Click next to start JDBC component schema examination.
Domain Configuration -Test JDBC component schema
  • Click next and select Managed Servers, Clusters and Machines as optional configuration required.
Domain Configuration - Optional Configuration
  • Accept the already provided managed servers components’ names, addresses and ports.
Domain Configuration - Default Components Addresses And Ports
  • Click next and bypass the cluster configuration by another next.
  • Configure your machine by providing name, node manager listen address and node manager listen port.
Domain Configuration -  Configure Machine
  • Click next and assign your managed servers into your machine. In order to start a Managed Server from the administration console, you must first create a machine, then associate the managed server with that machine.
Domain Configuration -  Assign Middleware Configuration
  • Click next and create.
Domain Configuration -  Create domain
  • Wait until the installing process finished and don’t check the Start Admin Server.

Verifying Installation

As we have a lot of components that are downloaded and installed, it’s so good to have a big picture for what we’ve done till now. Figure below should show you the Middleware host and these components that are hosted on.
Middleware Host

Launching Servers

Before getting started launching the servers that you’ve seen in the above figure, let’s start the admin console that will be used to manage the servers after then.
  • From your main menu (Windows menu), just start your admin console.
Start Admin Console
Admin Server Started
  • Access admin console home page by typing http://localhost:7001/console and enter weblogic/weblogic123 as username and password.
  • Edit node manager configuration file by navigating into NodeManagerHome which is located under {WeblogicHome}\common\nodemanager and modify the file nodemanager.properties file to set the attribute StartScriptEnabled to true. This attribute is required for Managed Servers to receive proper classpath and command arguments.
  • Start node manager by running into {WeblogicHome}\server\bin\startNodeManager.cmd. Node Manager will be used for managing all of your managed server by using the Admin server, otherwise you will be enforced to use the startManagedServer.cmd like below.
Node Manager Started
  • Start your managed servers that are listed inside your Environment – Servers. Typically, the starting of all managed servers you’ve selected would be done through using of startManagedWebLogic.cmd command that’s located within your JournalDev domain.
  • To start your WC_Spaces managed server, just navigate into your JournalDev domain directory through using of console and type D:\OracleWebCenter\Middleware\user_projects\domains\JournalDev\bin\startManagedServerWeblogic.cmd WC_Spaces http://localhost:7001. You may be asked for username and password, just use weblogic/weblogic123.
  • To start your WC_Portlets managed server, just navigate into your JournalDev domain directory through using of console and type the same command above with using of WC_Portlet instead of WC_Spaces. You may be asked for username and password, just use weblogic/weblogic123.
  • Follow the same way for starting both of WC_Utilities and WC_Collaboration. You may be asked for username and password, just use weblogic/weblogic123.
  • Your node manager will notify your Admin Server about any managed servers that get started. In case you’ve faced a connection exception that results in using of IPv6 for notifying, just make sure you’re enforcing your Weblogic instances to use IPv4 by editing JAVA_OPTIONS and adding -Djava.net.preferIPv4Stack=true inside startManagedWeblogic.cmd and setDomainEnv.cmd, respectively.
All Managed Servers Started

Verify Oracle Webcenter Installation

To make sure that you’re getting proper installation for Oracle Webcenter, just type the http://localhost: followed with proper port like below:
Accessing of http://localhost:8888/webcenter
Oracle Webcenter Login Page
Enter weblogic/weblogic123 as username and password for getting logged in into Oracle Webcenter Portal.
Portal Home Page

Installing Oracle JDeveloper

After that, it’s time to get Oracle JDeveloper installed as it’s used for creating the different accompanies of Oracle Webcenter technology such as Portlet, Pages, etc. Following below the steps required for installing the Oracle JDeveloper.
  • Make sure you are downloaded the JDeveloper binary file into your storage. It’s name is jdevstudio11117install.exe. Double click on it.
Oracle JDeveloper Wizard - Welcome Screen
  • Click next.
  • The initial screen asks you whether you want to use already exist Middleware or you want to install it using a new Middleware. Choose create a new Middleware as this version of JDeveloper isn’t aligned with the already Oracle Weblogic Middleware that you installed it before. Remember the path of the installed JDeveloper as it will be used later on.
Oracle JDeveloper Wizard - Create Oracle Home Directory
  • Click a sequence of next until the wizard starts the installation.
Oracle JDeveloper Wizard - JDeveloper Installed Successfully

Extending Installed JDeveloper

Before getting developed a HelloWorld Portlet you must configure your installed JDeveloper be able of providing a design time capabilities for the Webcenter Framework and services. Following below points that you should follow for getting JDeveloper ready to use:
  • Download the required extensions based on your JDeveloper components releases. Installed JDeveloper is having the following extensions:
Oracle JDeveloper Studio Extensions
Oracle JDeveloper J2EE Extensions
As our JDeveloper have the listed J2EE and Studio extensions, so you should download two additional extensions for Oracle Webcenter and they are:
Now,
  • Install downloaded extensions (Both of them) into your JDeveloper by navigate into Help – Check Updates.
Oracle JDeveloper - Add Oracle Webcenter Framework Extension
  • Click next and finish. Important note, open your JDeveloper using Default Role as if you were selected any other role, you may won’t be able of installing the Oracle Webcenter framework extension.
  • Now, you should be able of seeing the all projects that are related for Oracle Webcenter.
Oracle JDeveloper - Oracle Webcenter Application Type

JDeveloper – Create Integrated Server

You need to create an Integrated Application Server for handling all normal tasks like, start server, stop server, deploying the applications, etc.
To create your server from within your JDeveloper you need to follow the below steps:
  • Open your JDevelper.
  • From View menu, choose Application Server Navigator. That should make the Application Server Pane be shown.
  • On the Application Servers root node, Right-Click and select New Application Server.
  • From the first window, select Integrated Server and click next.
  • Name your server (JournalDev) and specify both of domain directory and Server instance like below.
Create Integrated Server
  • Click next and fill in administrator user’s username and password.
  • Click next and finish.
Integreated Server created
  • Make sure that your node manager is already started as you cannot control your managed server without it.
  • Make sure that your server is started Right-Click on the created server and choose Start Server Instance.

JDeveloper – Create Webcenter Portal

According for JSR 286 & 186, Portlet isn’t a standalone component, in that, it needs to be embedded inside a Portal page for getting displayed.
The way in which you can create a Portal page is to create an Oracle Webcenter Portal application that may contains a lot of pages of type (jspx). It’s not important at this time to get much understand about Oracle Webcenter Portal application than the steps that help you getting one developed. Following below steps help you create one:
  • From Application pane, select New Application.
  • Name your application and specify your preferred package before getting Webcenter Portal – Framework Application selected.
Create Webcenter Portal
  • Click double next.
  • Make sure you’re selecting the proper package as you may find two duplicate portal phrase.
Create Webcenter Portal - Make sure your package is valid one
  • Click finish.
Create Webcenter Portal - Webcenter Portal Created

JDeveloper – Create JSR286 Portlet

To develop a JSR-286 Portlet using Oracle JDeveloper you need to follow the below steps:
  • From Application Pane, choose New Application.
  • Fill in your Application name, directory, package and the technology be used.
Create JSR286 Application
  • Click next and accept the default Project Name, directory and Project Technologies.
  • Click next and update your package as you may find additional portal phrase.
Create JSR286 Application - Configure Java Settings
  • Click finish.
  • From Portlets project, create a new JSR286 Portlet by, Right-Click on Portlets, select New Portlets and select Standards-based Java Portlet (JSR 286).
Create Portlet
  • Click Okay, a window of General Portlet Information will be displayed. Fill in all your Portlet’s information like name, class, package and the preferred language.
Fill in Portlet Information
  • Click next and finish. As a result, you will see your Portlet binaries being shown inside the Projects pane.
Now, deployment time:
  • Right-Click on the Portlets project and from Deploy menu select New Deployment Profile. From displayed Wizard, select Deployment Profiles and select WAR file.
  • Click okay and name your profile (JorunalDevPortlet) to be referenced later on.
  • Once you’ve named your Profile and Click okay, a new Wizard will be displayed.
  • Fill in WAR File and the web application’s Context root.
Deployment Properties
  • Click Okay.
  • Right-Click on the Portlet project and from deploy menu use JournalDevPortlet.
  • From Deployment Action Wizard, select Deploy to Application Server option.
Deployment Action Wizard
  • Click next and use your created integrated server, JournalDev and click next.
  • From Weblogic options, make sure you’re selected Deploy to selected instances in the domain and select AdminServer (Make sure you’re Admin Server and node manager is running and also you have a running WC_Portlet and WC_Spaces).
Deployment
  • Don’t worry if you find your managed servers down, just make sure you are getting them up from the command line by using startManagedWebLogic.cmd as listed before. (Double check by visiting the console).
  • Click finish, and wait until your Portlet application get deployed.
Portlet application got deployed
  • Access your Portlet url that’s listed at the deployment console inside your JDeveloper or follow given convention by typing into your browser http://hostname:7001/yourContext.
Portlet WSRP Test Page - Determine needed link
  • Open your WSRP Test page and ensure your WSRP v2 WSDL is working fine. It’s a common issue that your Weblogic has used an IPv6 for deployment purpose, such in case, make sure you’re enforcing it to use IPv4 by editing your D:\OracleWebCenter\Middleware\user_projects\domains\JournalDev\bin\startWebLogic.cmd and put set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true instead of already current located there.
Portlet WSRP Test Page - Open Test Page
Portlet WSRP Test Page - WSDL Response

JDeveloper – Create WSRP Producer

For exposing your developed Portlet into your Webcenter portal, you should copy your WSRP WSDL link that look like http://192.168.1.100:7001/JournalDevPortlet/portlets/wsrp2?WSDL and create a Producer:
  • Navigate into your Portal Application from the Application menu.
  • Right-click on the Portal and select New.
  • Choose Portlets from the left pane and WSRP Producer Registration from the right pane.
WSRP Producer Registration
  • Click okay, and fill in your producer name.
WSRP Producer Registration - Fill in required information
  • Click next and paste the WSDL link that you’ve taken a copy from it.
WSRP Producer Registration - Paste your WSRP WSDL
  • Click next and finish.

JDeveloper – Deploy Your Portal

Now, you have a Portlet, Portal and a Producer for your Portlet, so let’s complete what we have started before by deploying your Portlet into the home Portal page. Following below steps would help you getting your Portal up and running and your Portlet deployed and shown.
  • Navigate into your home.jspx page.
Home Portal Page
  • Open your Application Resources and drag your Portlet into your page, just like figure below.
Add Portlet into your Portal Page
  • The JDeveloper would ask you if you want dragged Portlet to be added as an ADF or a Trinidad one, just use Trinidad Portlet.
  • Right-click on your Portal application and deploy.
  • Click next and choose your JournalDev server.
  • Click next and choose Admin Server.
Deploy Webcenter Portal Application
  • Click finish.
  • Wait a second to show the deployment configuration Wizard and click Deploy.
Deploy Webcenter Portal Application - Deploy
  • Copy your application URL as it’s shown inside the deployment console and paste it into your browser to get your Portal displayed.
Deploy Webcenter Portal Application - Portal Application Got Deployed
  • Paste http://192.168.1.100:7001/JournalDevPortal-Portal-context-root into your browser and find your Portal’s home page contained your simple developed JSR286 Portlet.
JSR286 Portlet Got Deployed Against Portal Page

Summary

As Oracle documentation is very hard to traverse and follow, this tutorial is just a trial into getting a full sample of how can you install and configure an Oracle Webcenter Portal and used it after then for deploying a simple trivial Portlet into one of its Portal page. Contribute us by commenting below and find source code to download.

No comments:

Post a Comment