Wednesday, March 6, 2013

Portal 11g: Steps to create WLS_WSRP Managed Server



Wsrp portlets can't be deployed 11g WLS_Portal, they need to be deployed to WLS_WSRP server. Below are the steps to create a new WLS_WSRP server through 11g Portal admin console:






1. Create a WSRP Managed Server.

a. Log on to the Oracle WebLogic Server Administration Console.

b. Click Lock & Edit.

c. In the Domain Structure tree, expand Environment and then select Servers.

d. Click New.

e. In the Create a New Server page enter the following information:
- Server Name: Enter the name of the server. For example: WLS_WSRP
- Server Listen Port: Enter the port number from which you want
to access the server instance. For example: 9003
- Select the No, this is a stand-alone server radio button.

f. Click Finish.

g. Click "Activate Changes".

2. Associate a machine to the new WSRP Managed Server.

a. Still connected to the Oracle WebLogic Server Administration Console,
in the Domain Structure tree, expand Environment and then select Servers.

b. In the Summary of Servers page, click on the Server (WLS_WSRP) you have created.

c. Click Lock & Edit.

d. Select your machine name from the Machine drop-down list.

e. Click Save.

f. Click "Activate Changes".

3. Deploy the required libraries to the new WSRP Managed Server.

a. Still connected to the Oracle WebLogic Server Administration Console,
in the Domain Structure tree, select Deployments.
This should show the "Summary of Deployments" page.

b. In the Deployment table click Customize this table and do the following:

- Uncheck the "Exclude libraries when displaying deployments" option.
- Number of rows displayed per page: 100
- Click Apply.

c. In the Deployment table repeat the following steps to add the following Libraries:

oracle.portlet-producer.wsrp(11.1.1,11.1.1)
oracle.portlet-producer.jpdk(11.1.1,11.1.1)
DMS Application(11.1.1.1.0)
oracle.jsp.next(11.1.1,11.1.1)
oracle.wsm.seedpolicies(11.1.1,11.1.1)
wsil-wls
oracle.jrf.system.filter

To each library do the following:

- In the Deployment table click the name of the desired library.
This should bring the Library settings page.

- Click the Targets tab.

- Click Lock & Edit.

- Check AdminServer and WLS_WSRP from the Servers section.
For updating "wsil-wls" you need to select "wsil-wls" and then click on "Change Targets".

- Click Save.

- Click "Activate Changes".

4. Start the new WSRP Managed Server.

a. In the Domain Structure tree, expand Environment and then select Servers.
The "Summary of Servers" page should be displayed.

b. Click the Control tab, and select the new wsrp server (WLS_WSRP).

c. Click Start.
The "Server Life Cycle Assistant" page should be displayed.

NOTE: You need to start the nodemanager for this to work.

d. Click Yes to start the server.

5. Configure the Datasource for the new WSRP Managed Server.
To map the portletPrefs datasource targets to the managed server (WLS_WSRP), do the following:


Note that this step can be omitted if file based Pref storage is used rather than database based.

a. In the Domain Structure tree, expand Services,
then select and expand JDBC and click Data Sources.
You should see the "Summary of JDBC Data Sources" page.

b. Click the "PortletDS" link associated with the jdbc/portletPrefs JNDI.

c. Click the Targets tab.

d. Click Lock & Edit.

e. Check WLS_WSRP from the Servers section.

f. Click Save.

g. Click Activate Changes.

6. Extend the Existing WebLogic Domain with the Oracle WSM Policy Manager.

a. Shutdown all the servers in the Portal domain including the Admin Server.

b. Connect to the Server where Portal is installed.

c. Change to the following directory:
$ORACLE_PORTAL_HOME/common/bin

d. Run the config.sh script.

e. On the "Welcome" screen select:
"Extend an existing WebLogic Domain" and click Next.

f. On the "Select a WebLogic Domain Directory" screen, select your
valid Portal domain directory and click Next.
This is the Portal domain where you created the WLS_WSRP server.

g. On the "Select Extension Source" screen, select:
"Oracle WSM Policy Manager - 11.1.1.0 [Your portal Home]" and click Next.


Note that  step g to k can be omitted if wsm Policy Manager is not needed.
 
  h. On the "Configure JDBC DataSource" click Next.

i. On the "test JDBC Data Sources" screen click Next.

j. On the "Configure JDBC Component Schema" screen, check the OWSM MDS Schema.

Then provide the information to your MDS schema. This is the schema created for MDS
when you run the repository Configuration Utility (RCU) at install time. If you did not created
this schema already then you need to create this schema first using RCU.

For example:
Schema Owner: PROD_MDS
Schema Password: <mds_password>
DBMS/Service: orcl.us.oracle.com
Host Name: //databaseserver.domain
Port: 1521

Click Next.

k. In the "Test Component Schema" screen, confirm the test is successful and click Next.

l. In the "Select Optional Configuration" screen, select Deployment and Services and click Next.

m. In the "Target Deployments to Clusters or Servers" screen, ensure
wsp-pm is targeted to servers including WLS_WSRP and AdminServer.

Click Next.

n. In the "Target Services to Cluster or Servers" screen, click Next.

o. Review your settings in the "Configuration Summary" screen, and click Extend.

p. Click "Done" when finish.

q. Start the servers in the Portal domain including the Admin Server, WLS_PORTAL and WLS_WSRP.

7. Log on to the Oracle WebLogic Server Administration Console.

a. In the Domain Structure tree, select Deployments.
This should show the "Summary of Deployments" page.

b. In the Deployment table click wsm-pm.
This should bring the settings page.

c. Click the Targets tab.

d. Click Lock & Edit.

e. Select "wsm-pm" and then click on "Change Targets".

e. Check AdminServer and WLS_WSRP from the Servers section.

f. Click Save.

g. Click "Activate Changes".

8. Deploy your provider EAR File.



Friday, March 1, 2013

Portal 11g: Export and Import Transport Set



The below link from Oracle gives a good description of how to export a Portal Transport Set for 11g.

http://docs.oracle.com/cd/E17904_01/portal.1111/e10239/cg_imex.htm#CCJGDIHJ


Portal content management: how to control which pages can be edited?

Log in to Portal Builder as an portal administrator.
click on Navigator link on top right corner to have Page Groups displayed. click on Page Group link to go to an independent page. Click on Edit page property. and set the page to be editable if desired.

Tuesday, February 5, 2013

Deploying a WSRP Portlet Application to a New Oracle WebLogic Managed Server Instance for use with Oracle Portal 11g



go to oracle support site: oracle.support.com, and search for the doc ID or title, you will the follow document.

Deploying a WSRP Portlet Application to a New Oracle WebLogic Managed Server Instance for use with Oracle Portal 11g [ID 1058565.1]
Below is the link for this document.

https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?recommended=true&type=DOCUMENT&id=1058565.1&_adf.ctrl-state=dx8y2z5wp_103&_afrLoop=295659360160078

Here is link to a different Oracle document on how to deploy WSRP Portlet Application onto Portal 11.1.1:

http://docs.oracle.com/cd/E23943_01/portal.1111/e10238/pdg_java_intro.htm#BHCBBHCJ

Monday, February 4, 2013

WebLogic Startup fails with Unable to obtain lock on Server may already be running

The content in this blog is mostly extracted from the following page:





When you try to start weblogic server and if it fails with error message that “Unable to obtain lock on *.lok Server may already be running

________
weblogic.management.ManagementException: Unable to obtain lock on /u01/oid_domain/servers/wls_ods1/tmp/wls_ods1.lok. Server may already be running at weblogic.management. internal.ServerLocks. getServerLock (ServerLocks.java:159)
________

This could be because of two reasons

1) WebLogic Server (which you are trying to start) is already running.
2) WebLogic Server (which you are trying to start) did not stop cleanly.

When weblogic server starts, it creates two lock files
a) $DOMAIN_HOME/servers/<server_name>/tmp/<servermame>.lok
b)
$DOMAIN_HOME/servers/<server_name>/data/ldap/ldapfiles/EmbeddedLDAP.lok

When WebLogic server stops, it removes these two files.

If you hit problem, first identify if server is running on port configured for WebLogic Server by using netstat.

netstat -an | grep <WebLogic_Server_Port>
 or
netstat -ano | findstr <port #>

If server is running then you should see output like

tcp        0      0 ::ffff:<IP>:<weblogic_port>      :::* LISTEN  

(Listen here identifies that it is listening)

Note: There could be other process using this port

How to identify which port is configured for weblogic server?
To identify port configured for weblogic server open weblogic configuration file
$DOMAIN_HOME/config/config.xml and serach for listen-port

You should see entry like
<listen-port>8001</listen-port>

Note: There is one listen-port for every weblogic server (Admin & Managed)

If server is not running then you can safely remove these lok files under WebLogic server.

Note: If this is weblogic managed server (not Admin Server) then you can safely remove entire managed server directory (including sub directories) $DOMAIN_HOME/servers/<serverName> . When you start managed server again, Admin Server will create these directories.


Wednesday, January 30, 2013

Portal 11G: Change Portal OID Realm after the installation process completes

In the recent 11G Portal installation and configuration, it was found out at the very end of the process that the portal OID realm needs some change.  In order not to re-start the whole process, which is quite lengthy, I used the following way to fix the issue.

The following describes the steps I used and it succeeded. This was traveling at no man's land. It took quite an effort.

(1) create the new, desired realm. use oidrealm, an Oracle utility. It is discussed in an early post of mine.

(2) Go to the portal repository schema. In our case, it is INTF_Portal Update the following tables in INTF_Portal schema to replace the old realm with the new realm.
 $WWPRE_VALUE, $WWSEC_User, $WWSEC_group, $WWSEC_member

(3) lastly, go to portal Builder to ensure that you can log in using one of the users under cn=Users under the new realm. During the above process, a few issues have been encountered, I have highlighted these issues and described briefly of the solution to them.

Portal 11G: A few OID related errors and how to resolve them






 




Error
Error

internal error (WWC-00006)
Unexpected error encountered in wwsec_app_priv.process_signon (User-Defined Exception) (WWC-41417)
An exception is raised when accessing the Oracle Internet Directory: 32: No such object
Entry to be modified not found.
Details
Operation: dbms_ldap.modify_s
Entry DN: cn=AUTHENTICATED_USERS,cn=intf_portal.130107.111156.694332000,cn=groups,dc=itsso,dc=gc,dc=ca
Changes
uniquemember: Add: cn=dct_user,cn=users,dc=ncr,dc=pwgsc,dc=gc,dc=ca. (WWC-41743)

Solution:
The course of this problem: the realm, dc=ncr,dc=pwgsc,dc=gc,dc=ca, is not updated in table $WWPRE_VALUES in the portal schema.

Also check the following tables in the portal schema to ensure they have the correct realm data:

WWSEC_User, WWSEC_group, WWSEC_member