Code Monkey home page Code Monkey logo

Comments (5)

rlane avatar rlane commented on May 29, 2024

Please paste the SOAP that caused the error. Set debug: true in VIM.connect to see it.

from rbvmomi.

dekz avatar dekz commented on May 29, 2024

This is what is reported around the exception dump:
https://gist.github.com/dekz/fd652d48a6d43009b037

I'll try and wade through and find the debug message.

Here are some that I captured with debug on:
https://gist.github.com/dekz/bec973ad82a7e57bc091

from rbvmomi.

dekz avatar dekz commented on May 29, 2024

So I may have tracked down a possible problem. In the deserializer it attempts to find the class to instantiate, in this case Network. It's picking up a different Network, introduced by another Gem which had defined 'Network' as a module not in its own namespace.

Removing this gem from the Gemfile seems like it fixes that particular problem. Is there a way for deserializer to attempt to namespace deserialize itself to avoid this issue in the future?

from rbvmomi.

rlane avatar rlane commented on May 29, 2024

The issue is rbvmomi lazy-loads types, so when the deserializer does a
const_get of the type name Ruby does a full constant search before calling
const_missing. You might be able to fix this by changing
https://github.com/vmware/rbvmomi/blob/master/lib/rbvmomi/connection.rb#L211to
@loader.get(name) but that doesn't solve the whole problem because
the
developer could just as well type VIM::Network, which would resolve to the
non-rbvmomi Network class. We try to work around this in TypeLoader#preload
but that only works completely if rbvmomi is required last.

CC @cdickmann

On Tue, Feb 26, 2013 at 10:45 PM, Jacob Evans [email protected]:

So I may have tracked down a possible problem. In the deserializer it
attempts to find the class to instantiate, in this case Network. It's
picking up a different Network, introduced by another Gem which had defined
'Network' as a module not in its own namespace.

Removing this gem from the Gemfile seems like it fixes that particular
problem. Is there a way for deserializer to attempt to namespace
deserialize itself to avoid this issue in the future?


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-14159604
.

from rbvmomi.

ewendland23 avatar ewendland23 commented on May 29, 2024

rlane, could you outline the steps a person should take to perhaps get around errors from lazy-loading? I am trying to use the fantastic rbvmomi gem inside a Rails application, but keep running into the dreaded 'stringify_keys' error message because the wrong Class is being called.

from rbvmomi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.