Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Monday, February 4, 2008

Can't modify constant item in scalar assignment

Akhilesh called me today and told me about a problem he was facing while running Software configuration manager:

$ORACLE_HOME/ccr/bin/emCCR collect
Oracle Configuration Manager - Release: 10.2.7.1.0 - Production
Copyright (c) 2005, 2007, Oracle. All rights reserved.
------------------------------------------------------------------
Error in processing ECM_ASSOCIATIONS metric collection for ebiz11i_apps_cm
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/oracle_apps_cm_assoc.pl"
Can't modify constant item in scalar assignment at $CCR_HOME/sysman/admin/scripts/ebs/ebs_assoc_common.pl line 171, near ");"
syntax error at $CCR_HOME/sysman/admin/scripts/ebs/ebs_assoc_common.pl line 177, near "col_values["
Compilation failed in require at $CCR_HOME/sysman/admin/scripts/ebs/oracle_apps_cm_assoc.pl line 38.

Error in processing cust_request_sets metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl line 54.

Error in processing hpp_not_applied metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsHPPNotAppliedCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsHPPNotAppliedCollector.pl line 293.

Error in processing other_customizations metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl line 54.


Collection and upload done.


For the first error, I did a googled for "Can't modify constant item in scalar assignment". The first hit was from Rohan's CGI documentation which said:

Can't modify constant item in scalar assignment...
You probably forgot to include a $ symbol before the variable. In Perl, scalar variables need to be referred to as $variable. The statement $variable = foo; is correct, but variable = foo; is not.

So accordingly, in $CCR_HOME/sysman/admin/scripts/ebs/ebs_assoc_common.pl, we changed:

Line 171 : col_values changed to $col_values
Line 177 : col_values changed to $col_values

After changing this when we ran the command again, the first error was gone and 3 errors remained:
======================================================
$ORACLE_HOME/ccr/bin/emCCR collect
Oracle Configuration Manager - Release: 10.2.7.1.0 - Production
Copyright (c) 2005, 2007, Oracle. All rights reserved.
------------------------------------------------------------------

Error in processing cust_request_sets metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl line 54.

Error in processing hpp_not_applied metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsHPPNotAppliedCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsHPPNotAppliedCollector.pl line 293.

Error in processing other_customizations metric collection for ebiz11i_apps_db
Failed to execute command - "$CCR_HOME/engines/SunOS/perl/bin/perl" "$CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl" "$CCR_HOME/hosts/tsgsd1008/state/ebiz11i-apps_db.ll"
Undefined subroutine &main::getConfigProperty called at $CCR_HOME/sysman/admin/scripts/ebs/ebsCustMetricCollector.pl line 54.


Collection and upload done.
===============================================================

If you notice, all 3 errors are due to the fact that it is unable to find a subroutine called getConfigProperty. We searched for getConfigproperty string in the .pl files but could not find it. Most probably getConfigProperty is defined inside a different .pl file which is not present in the perl library path. Oracle has a few open bugs for this issue.

I got a call from Sadiq today for this problem. He is facing the very same problem in his environment. So I decided to revisit. I had noticed that this works in Configuration Managers installed by RDA and the Jan and April 2008 Critical patch update for database. I checked back with Akhilesh and found that he had raised an SR for this and Oracle had given a patch for this issue. The patch number is 6733104. However this patch is not created for all platforms. You could request this patch for your platform or follow this workaround:

1. Download patch 6854532 for your platform.
2. Unzip this patch. Patch will create a subdirectory called RDA
3. cd rda/ccr
4. cp ccr-Production-10.2.7.0.0*.zip $ORACLE_HOME
5. cd $ORACLE_HOME
6. unzip ccr-Production-10.2.7.0.0*
7. This will create a directory ccr
8. cd ccr/config
9. vi ccr.properties

Uncomment these lines and give the correct values:

http.proxyHost=proxy.justanexample.com
http.proxyPort=80

Use this ccr directory for your configuration manager tasks. You won’t get the perl errors.

I checked why the error doesn’t occur in this version:

cd $CCR_HOME/sysman/admin/scripts/ebs
grep getConfigProperty *

config_version.pl:my ($errMsg2, $collected_version) = getConfigProperty($configFile, "META_VER");

In the CCR_HOME in which this error was appearing, a grep on the very same directory returned no results. So Oracle has fixed their script config_version.pl which was missing this line in the version where it was erroring out:

my ($errMsg2, $collected_version) = getConfigProperty($configFile, "META_VER");

3 comments:

Anonymous said...

Hi,

I get the same errors as you describe in your blog, when i try to collect a configuration with Oracle Configuration Manager 10.2.7 on a 10.2.0.2 database with a 11.5.10.2 EBS version. I have choosen for the disconnected mode.

Did you already get an answer from Oracle on the SR you logged for this problem?

Greetings,

Bouke Weinans.

Vikram Das said...

Hi Bob,

We did not log an SR with Oracle as it is already a known bug. On another instance where Jan 2008 Critical Patch Update is installed, I do not see that error. Jan 2008 CPU DB patch 6646853
contains Oracle Configuration manager also. You are prompted for installing Oracle Configuration manager, when you install patch 6646853 through opatch.

I'll revisit this problem, and let you know if it is occuring in a fresh installation of OCM.

- Vikram

Vikram Das said...

Hi Bouke,

I checked back with Akhilesh, who had told me about this issue, and he did log an SR with Oracle. Oracle had given patch 6733104 as a fix for this issue. I have updated the post to reflect this.

- Vikram