Tuesday, July 30, 2013

Failed to get Messages for target /Farm_portaldomain/portaldomain/WLS_WSRP/DMS Application(11.1.1.1.0),

Lately, after application software is installed, one of our environment is experiencing the following errors in the EM (weblogic Enterprise Manager) when opening log message on WLS_WSRP server.

"
Failed to get Messages for target /Farm_portaldomain/portaldomain/WLS_WSRP/DMS Application(11.1.1.1.0), /Farm_portaldomain/portaldomain/WLS_WSRP/webapp, /Farm_portaldomain/portaldomain/WLS_WSRP/wsil-wls, /Farm_portaldomain/portaldomain/WLS_WSRP. "

and our application logs are not coming out.

Checked all logs, especially logs in the WLS_WSRP domain. Nothing related is found.
Checked logs in WLS_Portal domain and Admin Server, everything is fine.


Then checked output file WLS_WSRP.out. Going all the way back and found parsing error complaining about logging configuration file logging.xml is having syntax errors.











Friday, July 26, 2013

Approach: debugging Oracle Portal 11g

(1) check all logs in application servers
If okay or nothing related is found, proceed to step (2)

(2)check database portal_application schema
table LOG_APP
this contains application log
(3) check schema portal
table portal_log
table WWLOG_ACTIVITY_LOG1
  and WWLOG_ACTIVITY_LOG2

Wednesday, July 24, 2013

Oracle Portal 11g: Import/Export Transport Set


Follow the following link to Oracle support site to retrieve the Oracle guideline on how to import/export Portal Transport Set for 11g:

Portal 11g Issue: Timing out Fetcher: java.net.SocketTimeoutException; ORA-29273

We are trying to access: http:// portalServer-url:8090/portal/page/portal
We got HTTP 500 output on the page.
 We are trying to access: http:// portalServer-url:8090/portal/page give us the following:
"PPE working" 
This means portal/page is reachable.
(1) check logs:
Portal OHS: ohs1.log
2013-07-17T11:49:57.3141-04:00] [OHS] [NOTIFICATION:16] [OHS-9999] [core.c] [host_id: XXX_HOSTNAME] [host_addr: 192.168.0.1] [pid: 5552] [tid: 484] [user: SYSTEM] [VirtualHost: main]  Child 5552: Child process is exiting

[2013-07-17T11:53:04.2691-04:00] [OHS] [ERROR:32] [OHS-9999] [odl_log.c] [host_id: XXX_HOSTNAME] [host_addr: 192.168.0.1] [pid: 8072] [tid: 1608] [user: SYSTEM] [VirtualHost: portalServer-url:8090]  Request Failed for : /portal/page/portal/Design_Time_PG/Welcome?_esiReqType=3, Resp Code : [500], referer: http://portalServer-url:8090/portal/page/portal/Design_Time_PG/Welcome

[2013-07-17T11:54:12.5823-04:00] [OHS] [ERROR:32] [OHS-9999] [odl_log.c] [host_id: XXX_HOSTNAME] [host_addr: 192.168.0.1] [pid: 8072] [tid: 1624] [user: SYSTEM] [VirtualHost: portalServer-url:8090]  Request Failed for : /portal/page/portal/Design_Time_PG/Welcome?_esiReqType=3, Resp Code : [500], referer: http://portalServer-url:8090/portal/page/portal/Design_Time_PG/Welcome
--------------------------------------------------------------------
WLS_Portal-diagnostic.log
[2013-07-16T16:32:37.729-04:00] [WLS_PORTAL] [ERROR] [] [oracle.portal.page] [tid: content-monitor] [userId: <anonymous>] [ecid: 105607711583,1:25846] [APP: portal] Stall Timeout reached. Interrupting Fetcher name=content-fetcher3 label=pageMeta url=http://portalServer-url:8090/portal/pls/portal/!DEVG_PORTAL.wwpob_page.show/Design_Time_PG/Welcome time=61110ms timeout=61000ms process=GotResponse
[2013-07-16T16:32:37.729-04:00] [WLS_PORTAL] [ERROR] [] [oracle.portal.page] [tid: content-fetcher3] [userId: <anonymous>] [ecid: 105607711583,1:25845] [APP: portal] Connection Timeout reached. Timing out Fetcher: java.net.SocketTimeoutException: Read timed out name=content-fetcher3 label=pageMeta url=http://portalServer-url:8090/portal/pls/portal/!DEVG_PORTAL.wwpob_page.show/Design_Time_PG/Welcome time=61110ms timeout=60000ms process=GotResponse
[2013-07-16T16:32:37.729-04:00] [WLS_PORTAL] [ERROR] [] [oracle.portal.page] [tid: content-monitor] [userId: <anonymous>] [ecid: 105607711583,1:25846] [APP: portal] Unexpected Exception in Monitor during Heartbeat call.[[
java.lang.NullPointerException
               at oracle.webdb.pool.http.HTTPPooledConnectionFactory$Wrapper.stop(Unknown Source)
               at oracle.webdb.dispatcher.HTTPDispatcher.stop(Unknown Source)
               at oracle.webdb.page.ContentFetcher.heartBeat(Unknown Source)
               at oracle.webdb.heartbeat.HeartBeatMonitor.run(Unknown Source)

11g portal is installed. webcache is configured. OHS configured. Checked all servers are up and running.
but http://portalhost_url:8090/portal/page/portal page is not coming up. HTTP 500 status shown.

1 ERROR in ohs.log, 1 in WLS_Portal-diagnostics.log


Path to solution:

(1)I checked the logs in our portal schema and found the following:
Eorror while opening invalidation connection: ORA-29273: HTTP request failed.
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-12535: TNS: operation timed out

the above implied that from database, it is having trouble reaching the invalidation url portalhost_url:8093.

(2) I then tried the following in the database schema:  portal
select utl_http.request('http://porthost_url:8093  ') from sys.dual;

I got:  
I get ORA-12541: TNS:no listener

Asked to check network flow and found that port 8093 in portal host is not open to database server.

ANT task classpath

How to set CLASSPATH for an ant task?


See below for an example  in a build.xml:

<taskdef resource="checkstyletask.properties" classpath="${lib.dir}/checkstyle-all-5.0.jar" />
       
        <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpath="C:\portal\ant\lib\ant.jar;E:\oracle\portal\wlserver_10.3\server\lib\weblogic.jar">

Monday, July 22, 2013

Troubleshoot Portal/Webcache Related Issues WWC-40019



 refer to:
https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?returnToSrId=&_afrLoop=233778927223699&srnum=&type=DOCUMENT&id=435058.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=7nm491gg4_154


This error condition is normally seen when the invalidation message has not arrived at any WebCache (eg, the name and port used is incorrect or unresponsive).  There are three possible reasons:-

(i)  The Host Name as stored in the Portal metadata is wrong and cannot be found.

This problem error will mean and invalidation message will fail with WWC-00019 after a TCP timeout period, typically 15 seconds.
(ii) The Port as stored in the Portal metadata is wrong and cannot be reached.

This problem error will mean and invalidation message will fail with WWC-00019 immediately
(iii) The Host Name and Port as stored in the Portal metadata is correct but cannot be transmitted for some network reason.

This problem error will mean and invalidation message will fail with WWC-00019 immediately.

In all 3 cases, the error seen in the user's browser will be:-
Error:

Could not open web cache connection. (WWC-40019)

Solution

Testing the Network

Before trying to update the Portal metadata, its important to validate the hostname and port used do refer to a functioning WebCache server.  Some simple network tests can be used for this validation.

These test MUST be carried out on ALL Portal Database Servers and not the Portal Midtier nor the Client PC.

1.  ping  <hostname>    -   this needs to return success
2.  telnet <hostname> <invalidation port>   -  this needs to return immediately with a result like the text below:


$ telnet portal.uk.oracle.com 9401

Trying 10.11.12.13...
Connected to portal.uk.oracle.com (10.11.12.13).
Escape character is '^]'.


3.  Login to the metadata database as the PORTAL user or the SYSTEM user and issue the following SQL statement:

                    
select utl_http.request('http://<hostname>:<invalidation port>') from sys.dual;


If the hostname:port combination is good, you should get test like the example below:

UTL_HTTP.REQUEST('HTTP://<hostname>:<invalidation port>')
--------------------------------------------------------------------------------
<HTML><HEAD><TITLE>Unauthorized</TITLE></HEAD><BODY>This document is protected.
You must send the<BR>proper authorization information to access it.</BODY></HTML>

If the hostname:port combination is bad, the text may show:

ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1577
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at line 1


Until these tests succeed, it it not worth trying to correct the Portal metadata.


Note:
The most common reason for these tests to fail is the local hosts file is setup incorrectly.



Changing the Portal MetaData

11g

For all these error conditions, the Portal will carry on working, you will still be able to log in and use the Portal product to check out and if necessary change the Portal metadata repository values.

1. Go to the Portal "Builder" page and select the Administer Tab
2. Select the "Global Settings" link within the Services portlet.
3. Select the "Cache" tab

Review the settings for the WebCache Invalidation Host and Port.

AS10g 10.1.4:
 
In 10.1.4.x  this page will only show you the settings and will no longer allow updates.

The alternate place to view and update these values, for all 10.1.4.x versions of Portal, is from the local Application Server Control (ASC).

1.  Go to the "portal:portal" component
2.  Select "Portal Web Cache Settings"

Review and make any changes here.

FMW 11g:

Changes to the Portal Metadata can be implemented using either Fusion Middleware Control (FMC) or the WebLogic Scripting Tool (WLST).

Example:  Using FMC:
  • Ensure the Portal Manager Server is started or at least one member of the Portal Cluster is running.
  • Expand the Farm --> Portal --> portal (WLS_Portal) --> right click --> Portal wire configuration.
Example:  Using WLST:
$ cd $ORACLE_HOME/common/bin

with ORACLE_HOME pointing to the Portal software directory

$./wlst.sh

WLS> connect('weblogic','manager1','t3://portal.oracle.com:7001');
WLS:/mydomain/serverConfig> setPortalWebcacheConfig(dad_name='portal1',host='foo
.oracle.com',inv_port= '6523',inv_user= 'invalidator',inv_passwd=' invalidator')

or simply:

WLS:/mydomain/serverConfig> setPortalWebcacheConfig('portal1','foo.oracle.com',
'6523', 'invalidator',' invalidator')


Note:
These changes are stored in the central Portal metadata repository database.  For configurations with multiple mid-tiers, this change only needs to be done on one of the mid-tiers to affect all the mid-tiers.


It is also possible to reset / change the invalidator password at WebCache level as to make sure there is a consistency in the password value entered and execute one of the actions above.
To reset / change please read further the Web Cache Administrator's Guide.- "8 Setup and Configuration > Tasks for Setting Up OracleAS Web Cache -- Task 2: Modify Security Settings -- Point 1."

Wednesday, July 17, 2013

Oracle Portal 11g: Incoming Oracle-Auth-Token does not match

One of our Server is experiencing the following error:

Incoming Oracle-Auth-Token does not match


 <Jul 17, 2013 2:27:36 PM SGT> <Error> <oracle.portal.page> <BEA-000000> <Unexpected exception in servlet
java.lang.IllegalStateException: Incoming Oracle-Auth-Token does not match.
     at oracle.webdb.page.PageBuilder.processUMDRequest(Unknown Source)
     at oracle.webdb.page.PageBuilder.process(Unknown Source)
     at oracle.webdb.page.Main.doRequest(Unknown Source)
     at oracle.webdb.page.ParallelServlet.doGet(Unknown Source)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
     at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526)
     at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
     at oracle.webdb.portal.servlet.PortalServlet.doGet(Unknown Source)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>

Solution:
Follow the instruction in the following oracle document;



Tuesday, July 16, 2013

Eclipse & SVN: How to produce a change log

    How to Produce a change log on affected paths from Eclipse &SVN

Team -> Show History
In the Team History, Select the entries you’re interested in
Right-click, select “generate change log”
Select “svn log with affected paths” and “clipboard”
Paste the results wherever you need them

Thursday, July 11, 2013

Simple Ldap Tools: search users in Ldap OID, and test connection to the Ldap Server




Ldapsearch.exe is a simple and free tool (freeware). It is most likely installed as part of the oracle portal installation. You can do a search for ldapsearch.exe on the Portlet Provider server. If you find it, then you can use it. If not, you need to download it from the internet and install it on Portlet Provider, then you can do the search from there.
 
ldapsearch -h <oid hosturl> -p 3060 -D cn=orcladmin -w <cn=orcladmin login password> -b "cn=SSO,cn=Products,cn=OracleContext" -s base "(objectclass=*)"



You can also get Ldapbind.exe and run the following commands to test the connectivity to the Ldap server. You should see “Bind Succeeded” as the result.

        ldapbind -h <oidhost1 name> -p 3060 -D "cn=orcladmin" -q
      Input cn=orcladmin password when prompted.
This ensures that connection to the ldap server can be established.

Go to the following links for more information:

http://www.ldapguru.info/ldap/ldap-search-best-practices.html


 


French character encoding

If the French characters on your web page is not displayed properly, be sure to check your character encoding.

Use  encoding ="ISO-8859-1" for displaying French characters.

Wednesday, July 10, 2013

database: Index and create index

What is table index? How do I create one?

This link below explains very well what table index is. Suggest to read it.
http://stackoverflow.com/questions/1108/how-does-database-indexing-work

"creating an index requires additional disk space, and that too many indexes can cause issues arising from the file systems size limits, careful thought must be used to select the correct fields to index."


"Since indexes are only used to speed up the searching for a matching field within the records, it stands to reason that indexing fields used only for output would be simply a waste of disk space and processing time when doing an insert or delete operation, and thus should be avoided."


The following sql is an example on how to create index:

CREATE UNIQUE INDEX IDX_DEPARTMENT ON DEPARTMENT (DEPARTMENT_CODE);

Example SQL: create/drop/purge table, create index, create Trigger




The following example sql file department.sql shows you how to create/drop/purge table, create index, sequence and triggers.

---------------------------------------------


DROP TABLE DEPARTMENT PURGE;

DROP SEQUENCE SEQ_DEPARTMENT;

CREATE TABLE DEPARTMENT (
  DEPARTMENT_SAK    NUMBER(8,0)    NOT NULL,
  DEPARTMENT_CODE    VARCHAR2(3 BYTE)    NOT NULL,
  DEPARTMENT_NM   VARCHAR2(100 BYTE)    NOT NULL,
  CREATE_USER_ID     VARCHAR2(20)    DEFAULT substr(USER,1,20)    NOT NULL,
  CREATE_TIMSTM      TIMESTAMP(6)    DEFAULT SYSTIMESTAMP    NOT NULL,
  LAST_UPDTD_USER_ID VARCHAR2(20)    DEFAULT substr(USER,1,20)    NOT NULL,
  LAST_UPDTD_TIMSTM  TIMESTAMP(6)    DEFAULT SYSTIMESTAMP    NOT NULL);

ALTER TABLE DEPARTMENT
ADD CONSTRAINT PK_DEPARTMENT PRIMARY KEY ( DEPARTMENT_SAK );
 
COMMENT ON COLUMN DEPARTMENT.DEPARTMENT_SAK IS 'Primary Key';
COMMENT ON COLUMN DEPARTMENT.DEPARTMENT_CODE IS 'Department Code';
COMMENT ON COLUMN DEPARTMENT.DEPARTMENT_NM IS 'department name in English';
COMMENT ON COLUMN DEPARTMENT.CREATE_USER_ID IS 'The ID of the Portal user who created the record';
COMMENT ON COLUMN DEPARTMENT.CREATE_TIMSTM IS 'System data timestamp';
COMMENT ON COLUMN DEPARTMENT.LAST_UPDTD_USER_ID IS 'The ID of the Portal user who updated the record';
COMMENT ON COLUMN DEPARTMENT.LAST_UPDTD_TIMSTM IS 'System data timestamp';

CREATE UNIQUE INDEX IDX_DEPARTMENT ON DEPARTMENT (DEPARTMENT_CODE);

CREATE SEQUENCE SEQ_DEPARTMENT
  INCREMENT BY 1
  MAXVALUE 99999999
  MINVALUE 1
  NOCACHE
  ORDER;
 
CREATE OR REPLACE TRIGGER T_DEPARTMENT_RBI
  BEFORE INSERT ON DEPARTMENT
  FOR EACH ROW
DECLARE
  CREATE_USER_ID$x VARCHAR2(20) := substr(USER,1,20);
  CREATE_TIMSTM$x   TIMESTAMP := SYSTIMESTAMP;
BEGIN
  :new.CREATE_USER_ID := CREATE_USER_ID$x;
  :new.CREATE_TIMSTM := CREATE_TIMSTM$x;
  :new.LAST_UPDTD_USER_ID := CREATE_USER_ID$x;
  :new.LAST_UPDTD_TIMSTM := CREATE_TIMSTM$x;
END T_DEPARTMENT_RBI;
/

CREATE OR REPLACE TRIGGER T_DEPARTMENT_RBU
  BEFORE UPDATE ON DEPARTMENT
  FOR EACH ROW
DECLARE
  LAST_UPDTD_TIMSTM$x   TIMESTAMP := SYSTIMESTAMP;
  LAST_UPDTD_USER_ID$x  VARCHAR2(20) := substr(USER,1,20);
BEGIN
  :new.CREATE_USER_ID := :old.CREATE_USER_ID;
  :new.CREATE_TIMSTM := :old.CREATE_TIMSTM;
  :new.LAST_UPDTD_USER_ID := LAST_UPDTD_USER_ID$x;
  :new.LAST_UPDTD_TIMSTM := LAST_UPDTD_TIMSTM$x;
END T_DEPARTMENT_RBU;
/

Monday, July 8, 2013

Windows, copy a folder including sub-folders and files from 1 location into another

Run the following command in a command prompt window will copy all different level of sub-folders and files under e:\temp\oracle to e:\oracle.



xcopy /sf  e:\temp\oracle\* e:\oracle

/f = This option will display the full path and file name of both the source and destination files being copied.

/s = Use this option to copy directories, subdirectories, and the files contained within them, in addition to the files in the root of source. Empty folders will not be recreated.

More detail about different options, please refer to:
http://pcsupport.about.com/od/commandlinereference/p/xcopy-command.htm