Thursday, May 23, 2013

[Cloud Control 12c] Discovery EBS R12 fails with java.lang.NullPointerException

Trying to discover an EBS System with Cloud Control, discovery ends on error:

Caused By: oracle.apps.fnd.oam.em.sdk.targetData.discovery.AppsDiscoveryException: Error while attempting to discover EBS on : 0000( oracle_database ) using schema: em_monitor
Caused By: java.lang.NullPointerException

This error appears in the Discovery Job Run page. (Enterprise > Job Activiy > Job Run DISCOVERY <instance> [Date])

At first look, it seems like is a missing plug-in, so, according to "Troubleshooting Oracle E-Business Plug-in [ID 1537431.1]", Step 2, yo need to check if you have all the necessary plug-in installed on the agent, that EBS System requires to work.

On the agent page (you can go there by Setup > Agents > click on the agent you wanna check). On the agent page, you need to go all the way down till, in the "Monitoring Section" in the plugin tab, verify that you have installed:

- Oracle Databse
- Oracle Fusion Middleware and
- Oracle E-Business Suite 

If you have this plug-ins installed, you are maybe facing my issue.

On the Discovery Wizard page (Targets > E-Business Suite > click on the Discovery Wizard link at the bottom), you will see two Failed links, one under Status and the other one under Diagnostic Status, click the one under Diagnostic Status
If you are on my same page, then you will see the next error:

Output Log

Diagnostic tests related to EMGC Agent
Diagnosing Agent and EBS Operating System users
Test Status: Completed
Test Result: Failure

Agent hostname: xxxx
EBS aliased hostname:
Agent User: orawwww
Agent Group: dba
EBS user: app0000
EBS group: ap0
Result: ERROR

Agent hostname: yyyy
EBS aliased hostname:
Agent User: orawwww
Agent Group: dba
EBS user: app0000
EBS group: ap0
Result: ERROR

What is the problem?
I have different users and different groups for my Agent and my EBS, and that is fine. But, as a AMP requirement, the agent need to have, at least, as a secondary group the one of the EBS.

What you need to do:
User orawwww, that has as primary group dba, needs to have as secundary group ap0, which is the primary group of the EBS System.

After you add the ap0 group to orawwww, you will need to bounce the agent (I recommend you to do it through the Cloud Control Console, instead of the traditional emctl stop|start agent), and re-run the Discovery. 
After this you will noticed that the discovery is still running after 15 seconds and ending with Status "Succeeded".