Wednesday, April 22, 2015

EBS R12/12.2 -- HR ORG CHART domain name problem / sessionEBS is null

Recently discovered a constraint while working on a HR ORG CHART project.. Oracle Development identified it as a bug at the first look .. The problem seemed caused by the java code used by the application.. Oracle Support concluded this as a bug after our long cooperation through a SVR 1 SR..
After a while the issue identified as a constraint rather than a bug.. At the end of the day, It was concluded as a limitation in the browser itself.. The problem was caused by using the short domain names in the server environment.. Using short domain names which contain only one dot leads this problem to arise.. (For example: .erman)

The possible workarounds for this limitations were given as follows;

1) Use longer FQDN for their servers, something like host.erman.com (not host.erman)
2) Implement shared entry point for EBS and external server where ADF app is hosted via proxying.

Okay.. Lets take a closer look at the issue. Lets walk through the related documents, review the diagnostics methods, see the effects of the limitation , review some RFCs based on MSDN and make the conclusion according to it.

By this time, I have did several HR ORG CHART implementations and recorded them in this blog..

You can read my blogpost about HR ORG CHART using the following links;
http://ermanarslan.blogspot.com.tr/2014/05/ebs-122-implementing-hr-organization.html
http://ermanarslan.blogspot.com.tr/2014/07/oracle-adf-browser-certification.html
http://ermanarslan.blogspot.com.tr/2015/02/ebs-r12-hr-organization-chart-redirects.html

We have seen how to install it, how to upgrade it , how to deploy it and how to diagnose it ..

We also have learnt some constraints about it ; such as it s required to have the same domain name for all the servers in the configuration.. (Hr Org Chart want us to have the same domain name for all of the servers involved between the process for reaching Hr Org Chart from the EBS..)

While we were thinking that everything was stable, we have seen see this limitation when we changed the domain names of both EBS and HR ORG CHART weblogic servers.

The problem was triggered when the domain names have only one dot (.).

I mean, if the names of the servers are like ermanEBShost.domain.com and ermanHRORGhost.domain.com, then HR ORG Chart works well.

On the other hand, if the names of the servers are ermanhostEBS.domain and ermanHRORGCHARThost.domain, HR ORG Chart fails..

In this condition, the weblogic server log said that it could not see the EBS session .. "sessionEBS is null"
It just failed to see the ebs session cookie and redirected us to the EBS login page again.

The problem seemed that it was in the AppsRequestWrapper class , which was present in the fndext.jar.. So it was actually not directly an HR ORG CHART problem, but at the end of the day it affects HR ORG ChART directly.

To show this, we have done a lot of implementations , disabled Load Balancers, gathered Http Header traces and so on..

We even set FINE level logging in the Weblogic Server, as we have seen that the code puts the logs to the logger if there is FINE level logging configured in the Weblogic Server..
if(logger.isLoggable(Level.FINE)) 

To enable this kind of logging, specified the logger level using logging.properties file and supplied it to the ADFServer(HR ORG CHART's managed server) as java command line argument, thus Hr org chart started to put logs in to the ADFServer.out file..

What 's exactly happening was that ; AppsRequestWrapper.getAppsSession() was able to set the cookies correctly when there are 2 or more dots in the domain names of the servers. On the other hand, it was failing to set the cookies, when there were only one dot in the domain names..

So it was clearly a seemed a bug in the "AppsRequestWrapper.getAppsSession()", and Oracle Support started working on it as "Per Bug 20812489   APPSREQUESTWRAPPER.GETAPPSSESSION() IS RETURNING NULL"

Later , as I have mentined in the beginning, the issue was concluded as a limitation in the browser..
During my research , I have found the following in MSDN..

WinINET (the network stack below IE) has cookie implementation based on the pre-RFC Netscape draft spec for cookies. 
When we get riderect to Netscape draft spec for cookies (http://web.archive.org/web/20080205173011/wp.netscape.com/newsref/std/cookie_spec.html)

We see the following;

domain=DOMAIN_NAME
When searching the cookie list for valid cookies, a comparison of the domain attributes of the cookie is made with the Internet domain name of the host from which the URL will be fetched. If there is a tail match, then the cookie will go through path matching to see if it should be sent. "Tail matching" means that domain attribute is matched against the tail of the fully qualified domain name of the host. A domain attribute of "acme.com" would match host names "anvil.acme.com" as well as "shipping.crate.acme.com".
Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT".


So, the issue was caused by this : Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us".
This was causing HR ORG Chart to not able to read the EBS session cookie..
As a result , we changed the domain names of our EBS Application servers, database servers , HR ORG CHART server and Load Balancer urls to be a erman1212.domain.com.tr and Oracle updated the HR ORG CHART FAQ document  as follows;

Question 2: Can we configure organization chart if weblogic server and EBS instance using PQDN (Partially Qualified Domain Name) or short FQDN (Fully Qualified Domain Name)?

No, configuring organization chart requires both EBS instance and Weblogic Server to use fully qualified domain names only and not partially qualified domain name. Also it requires both EBS instance and Weblogic Server to be in same domain.

For Example : 
Host Name : orgchart
Partially Qualified Domain Name : .in
Fully Qualified Domain Name : .in.oracle.com

If server name (hostname.domainname) is "orgchart.in" then integration for HR organization chart is not possible as session cookies are not properly shared when using PQDN and browser is simply ignoring such cookie. Hence server names (hostname.domainname) should be using fully qualified domain names like "orgchart.in.oracle.com".

12 comments :

  1. Hi admin,
    i have one bug,
    1) i changed dbport 1523 to 1521 in xml of db and i stop apps services and i run autoconfig for db
    2) again changed dbport in apps xml also and i run autoconfig for apps

    now i start the apps services with adstrtal.sh (adstpall.sh also) not working...but i can start all services individually.....version is R12.1.1

    ReplyDelete
    Replies
    1. this is not related with hr org chart.
      if you have a question , ask it from my forum.

      Delete
    2. this is not related with hr org chart.
      if you have a question , ask it from my forum.

      Delete
  2. Hello Admin,

    We have a scenario where EBS WLS instance and the standalone Org chart WLS instance are deployed on the same server. When we click on the "Org chart" menu function , EBS login page opens up again (instead of Org chart page).

    We checked Oracle Support docs (Frequently Asked Questions on Organization Chart Setup & Configuration FAQ (Doc ID 1923334.1) and Q.10 pertains to our problem. Solution says: "On your WLS instance hosting the 'orgchart', edit the weblogic.xml file and add the cookie name under the tag, specifying the cookie name value as ORGCHART, or whatever."

    We made changes to weblogic.xml under /tmp/_WL_user/..../WEB-INF/ but, the issue persists.

    Any help would be appreciated.

    ReplyDelete
  3. Hi,

    Never needed to do this, but as this is documented then this must be the solution..
    first redeploy your application and restart your HR ORG CHART's weblogic server, and see if the issue is fixed..

    If the issue persist;
    Supposing all the other things are right; I would change the weblogic.xml that comes with HR ORG CHART and redeploy the HR ORG CHART application after this change..

    Because, weblogic.xml that you have changed may not be the correct one..

    Modifying Weblogic.xml that comes inside your ear can fix this...
    Note that: After modifying that; I recommend redeploying the HR ORG CHART Application once again..

    Here is path that show weblogic.xml that comes with the HR ORG CHART EAR file..

    p13691576_R12.PER.B_R12_GENERIC\13691576\per\patch\115\ear\per_orgchart\OrgChartApplication\OrgChart_ViewController_webapp1\WEB-INF

    .
    12/08/2011 04:19 PM 6,825 adfc-config.xml
    05/19/2015 06:58 PM classes
    11/23/2011 05:57 PM 464 faces-config.xml
    05/19/2015 06:58 PM
    07/04/2011 11:55 AM 175 trinidad-config.xml
    01/31/2012 06:56 PM 8,432 web.xml
    02/10/2012 10:13 AM 787 weblogic.xml

    Note that: We dont use Windows for Oracle Applications :) this is just the HR ORG CHART patch residing in my laptop.. I m giving this as an example .. to show you the path.. You can open ear and war files and get inside to them.. (they are archives, unzip or winrar or any similar tool can open them..)

    ReplyDelete
  4. Alternatively, Plan.xml can be used for this..
    Look here : http://middlewaremagic.com/weblogic/?p=336

    Modify this Plan.xml file like following sothat we can change only the “Session-Descriptor/Cookie-name” element



    PlanDemoEAR



    NewCookieName
    XYZSESSIONID




    PlanDemoWEB
    war

    weblogic-web-app
    WEB-INF/weblogic.xml

    NewCookieName
    /weblogic-web-app/session-descriptor/cookie-name




    C:\DOCUME~1\JAYKUM~1\LOCALS~1\Temp\jaykumars\.\config\deployments\PlanDemoEAR\plan


    - See more at: http://middlewaremagic.com/weblogic/?p=336#sthash.wfOaFzPF.dpuf

    ReplyDelete
  5. To change the cookie name using weblogic.xml file
    Use weblogic admin console, choose deployments.. Choose the org chart and see the path in the overview tab. Change the weblogic.xml inside that directory(in that path) (inside the war file/WEB-INF directory)
    Then redeploy the application.

    You can always test and see if it is changed using a program like Firebug.

    ReplyDelete
  6. Hi, I use a org chart software called creately to draw organizational chart diagrams, I dont couldn't find how to embedded diagrams to wordpres and blogger, could it be the domain?

    ReplyDelete
  7. Hi Shalin,

    This is an Oracle Blog, but your software is third party and the systems that you try to embed it, are also third party for us.
    So, please contact Creately, wordpress and blogger for support.

    ReplyDelete
  8. Before doing anything else towards upgrading our SQL Server databases, I sat down with my manager and our CTO to determine the RPO and RTO for our databases.
    rto and rpo

    ReplyDelete
  9. Hi Erman
    Good Day
    I want to few customization in the Start Organization chart provided by Oracle. For instance, I don't want to show the reporting above me, only below.

    Could you please advice stepby step procedure to do it.

    ReplyDelete
  10. This is not in my scope. Read the documentation. The thing you are asking is pure development/functional admin related.
    There are a few customization related questions in "Using the Organization Chart Feature in Oracle SSHR (Doc ID 1408355.1)", but for your specific request, I think you need to create a SR.

    ReplyDelete

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.