1.Linux x86 64 Bit Operating System
2. I have two Oracle Homes - One for Oracle 10G R2 and other Oracle 11G R2
I have seen this error, even when we set the correct ORACLE_HOME and ORACLE_SID and when we try to start emctl it shows the following error
OC4J Configuration issue...
Now, even if I rename the file OC4J_DBConsole ( as mentioned in some of the forums) , in any of your Oracle home$oc4j/j2ee/OC4J_DBConsole_<MachineName>_<InstanceName> , it will not work.
The correct solution is to set the correct ORACLE_HOME , go to your ORACLE_HOME and execute ./bin/emctl status dbconsole
-bash-3.00$ pwd
/applns/oracle11g/oracle/oc4j/j2ee
-bash-3.00$ cd $ORACLE_HOME
-bash-3.00$ ls
apex config dc_ocm has j2ee lib nls oracore plsql slax ucp
assistants crs deinstall hs javavm log oc4j oraInst.loc precomp sqldeveloper uix
bin csmig demo ide jdbc md odbc ord racg sqlj utl
ccr css diagnostics install jdev mesg olap oui rdbms sqlplus wwg
cdata ctx dv install.platform jdk mgw ons owb relnotes srvm xdk
cfgtoollogs cv emcli instantclient jlib N850_CBA04 OPatch owm root.sh sysman
clone dbs EMStagePatches_CBA04 inventory ldap network opmn perl scheduler timingframework
-bash-3.00$ ./bin/emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://N850:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /applns/oracle11g/oracle/N850_CBA04/sysman/log