22 May 2015

Configure EM for RightNow Adapter

This post is useful to make necessary configuration changes in Oracle Enterprise Manager to run the applications which are using RightNow adapter.
Here I'm using EM 12c:

1. Adding Permissions
You must grant permissions to access the credentials store. This task only needs to be performed once for any Oracle Weblogic Server domain.

a. Login to Oracle Enterprise Manager
b. Expand "Weblogic Domain"
c. Right click on ofm_domain(the domain name that was configured) then Select "Security" -> "System Policies"

d. From right-part of the window, search for following:
Type: Codebase
Name: Includes: jca
then Click "Search" icon(play button) as shown below:


e. Clik on the row which is having jca*****.jar then click "Edit"
f. Click "Add" button as shown below:
g. On the Add Permission page, click Select here to enter details for a new permission and enter the following details for a new permission:
Permission Class: oracle.security.jps.service.credstore.CredentialAccessPermission
Resource Name: context=SYSTEM,mapName=oracle.wsm.security,keyName=*
Permission Action: *

That's it!!

2. Adding Certificate to Weblogic Server

We have to import security certificate into weblogic where our application will be running. This is required since we are going to connect with Service Cloud which runs on https.

2.1 Downloading certificate
a. Open your web browser and type the following URL, replacing the host_name and interface details.
example: http://integration-test.rightnowdemo.com/cgi-bin/integration_test.cfg/services/soap?wsdl=typed
Where host_name is integration-test.rightnowdemo.com and interface is integration_test

b. Click the lock icon in address bar -> "Connection" tab -> click on "Certificate information".


c. A dialog box "Certificate" appears. Goto "Details" tab -> "Copy to File...". Then "Certificate Export Wizard" will be displayed. Click Next.


d. Select "Base-64 encoded X.509 (.CER)" and click Next.
e. Click "Browse.." and provide file name to store the certificate and then click "Save" -> "Next"


f. Click "Finish" then the certificate will be exported into the selected directory and with the filename.



2.2 Import Certificate into Weblogic Server
a. Login to Oracle Enterprise Manager
b. Expand "Weblogic Domain"
c. Right click on ofm_domain(the domain name that was configured) then Select "Security" -> "Keystore"


d. From the right panel of the window, Expand "system" -> Select "trust" -> click on Manage


e. Screen navigates to "Manage Certificates: system/trust". Then click "Import" and then a dialogue box appears as shown below.



Provide the details as below:
Certificate Type :  "Trusted Certificate" :
Alias : IntegrationTestServiceCloud ( can be any name for naming the certificate)
Choose "Select a file that contains the Certificate or Certificate Chain"
File Name: select the imported certificate as in previous step from the file dialogbox

f. Click "OK".

That's it!!

3. Adding credential pair
a. Login to Oracle Enterprise Manager
b. Expand "Weblogic Domain"
c. Right click on ofm_domain(the domain name that was configured) then Select "Security" -> "Credentails"

d. Click on "Create Map"
e. In the dialog, provide Map Name as "oracle.wsm.security" (without quotes) then click "OK". Because, this is the map we have configured in previous step(Adding Permissions) to be accessible by jca.

 f. Select the row "oracle.wsm.security" then click on "Create Key" and provide details as below:

Note: Credentials which will be used by RightNow Adapter. The key should be the same while configuring RightNow Adapter wizard in JDeveloper. The deployed application/soa composite will look for this name during runtime.

g. Click OK
That's it!!

20 May 2015

Installing RightNow adapter

In this post, I will explain the detailed steps of installing RightNow adapter in weblogic server. The steps are same for installing it in JDeveloper as well.

To check whether RightNow is installed: 
Goto {MIDDLEWARE_HOME}/soa/plugins/jdeveloper/extensions and check for the following jar file. oracle.cloud.adapter.rightnow.jar
If you are not able to verify in the above steps, your installation has not been successful or yet to be installed. Try to install the patch again.

1. download adapter:
a. Goto http://www.oracle.com/technetwork/middleware/adapters/downloads/index.html
b. Accept License Agreement and then Download "Oracle Cloud Adapters"
c. Or download RightNowAdapter_121300_Patch.zip from https://support.oracle.com/

2. Extract the patch file 
a. I have extracted to "D:\RN_121300_Patch"
b. Extract "p19479397_121300_Generic.zip" and the zip files under "D:\RN_121300_Patch\Prereq_patches" in their parent folder only.

3. set environment variables:
a. Point ORACLE_HOME variable to oracle's home directory. In my case it is: 
set ORACLE_HOME=D:\Oracle12c\Middleware\Oracle_Home

b. Set path variable to ORACLE_HOME/OPatch as below:
set PATH =%PATH%;%ORACLE_HOME%/OPatch;

4. Login to windows as an Administrator and start command prompt (cmd.exe) in Administrator mode
otherwise, you will get following error:
OPatch will sleep for few seconds, before re-trying to get the lock 

5. Goto patch folder:
cd D:\RN_121300_Patch

6. apply patches in following order:
a. Install patch for bug# 18706071 (SUPPORT FOR CREDENTIAL STORE FOR CLOUD CONNECTORS).
b. Install patch for bug# 18858892 (ADD CHECK FOR CLOUD JNDI IN JCA FRAMEWORK)

c. Install patch for bug# 19248641 (ERROR IN GENERATING JCA SERVICE FOR ROQL WITH PARAMETRIZED QUERY)

d. Optionally install patch for bug# 19423468 (TRACKING BUG TO PACKAGE CSF TO OSB) if your Weblogic domain has OSB.

e. Optionally install patch for bug# 19769394 (SUPPORT FOR CREDENTIAL STORE FOR CLOUD CONNECTORS FOR OSB ONLY INSTALLATION) if your  Weblogic domain has OSB only (i.e. does not include rest of SOA Suite components like BPEL etc).


7. Apply main patch 19769397

8. start jdeveloper with "-clean" option. You can right click on jdeveloper shortcut on desktop and add "-clean"(without quotes) then click OK. Then start JDeveloper normally by double clicking on the icon.