Hi
Set the corresponding Java properties before requiring "mondrian-olap" and creating mondrian-olap connection:
java.lang.System.setProperty "mondrian.rolap.ignoreInvalidMembers", "true"
java.lang.System.setProperty "ignoreInvalidMembersDuringQuery", "true"
In our Rails application in Gemfile we specify
and then we have a mondrian.rb initializer file where we set all necessary Mondrian options and then require "mondrian-olap":
  {
    # If set to true, during schema load, invalid members are ignored and will be treated as a null member if they are later referenced in a query
    "mondrian.rolap.ignoreInvalidMembers" => true,
    # If set to true, during query validation, invalid members are ignored and will be treated as a null member.
    "mondrian.rolap.ignoreInvalidMembersDuringQuery" => true,
    # ... other options ...
  }.each do |key, value|
    java.lang.System.setProperty(key, value.to_s)
  end
  # set JRuby verbose option to see Java stack trace if mondrian-olap fails to load
  enable_warnings do
    require "mondrian-olap"
  end
Kind regards,
Raimonds