VMware {code} Community
jsrs701
Contributor
Contributor

bad service_content in Vim? (VI Perl)

Occasionally we see the following error in our VI Perl script:

Can't call method "rootFolder" on an undefined value at C:\build\5by7\modules/VMware/VIM2Runtime.pm line 259.

Checking the VIM2Runtime code, it appears that either the result of the RetrieveServiceContent() call is undef, or the member of the Vim object is getting undef'ed.

Anyone else see this problem?

Thanks,

Stephen

Tags (3)
0 Kudos
2 Replies
admin
Immortal
Immortal

Hi Stephen,

One of the possible reason for this error, is that probably the service content is undefined. Though I don't have your code, I am guessing that you are probably not calling login subroutine, where the service content would be getting set. The line number you have quoted is part of the find_entity_views method.

I would suggest, you to check your perl script and ensure you are calling the method Util::connect(). This internally calls the login method. You may also try running one of the sample utilities shipped with the perl toolkit and refer these.

Regards,

Dildip

0 Kudos
jsrs701
Contributor
Contributor

Hi Dildip,

We are calling the login() function. It seems as though the service content

is coming back undef even though we successfully logged in to the SDK! Very

strange.

0 Kudos