jazzido / mondrian-rest

A REST interface for Mondrian ROLAP server
MIT License
32 stars 8 forks source link

Can't get parents in a raw MDX query #24

Closed jazzido closed 7 years ago

jazzido commented 7 years ago

from @jspeis:

Puma caught this error: undefined method `dimension' for nil:NilClass (NoMethodError)
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/mondrian-rest-0.7.0-java/lib/mondrian_rest/api_formatters.rb:28:in `block in tidy'
org/jruby/RubyArray.java:1733:in `each'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/mondrian-rest-0.7.0-java/lib/mondrian_rest/api_formatters.rb:26:in `block in tidy'
org/jruby/RubyGenerator.java:99:in `each'
org/jruby/RubyEnumerator.java:323:in `each'
org/jruby/RubyEnumerator.java:329:in `each'
org/jruby/RubyEnumerator.java:323:in `each'
org/jruby/RubyEnumerable.java:407:in `first'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/mondrian-rest-0.7.0-java/lib/mondrian_rest/formatters/jsonrecords.rb:14:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/formatter.rb:44:in `block in build_formatted_response'
org/jruby/RubyArray.java:2480:in `collect'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/formatter.rb:44:in `build_formatted_response'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/formatter.rb:28:in `after'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:34:in `call!'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:31:in `call!'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:34:in `block in call!'
org/jruby/RubyKernel.java:1120:in `catch'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:33:in `call!'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/endpoint.rb:227:in `call!'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/endpoint.rb:221:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router/route.rb:72:in `exec'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:119:in `process_route'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:74:in `block in identity'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:93:in `transaction'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:72:in `identity'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:57:in `block in call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:135:in `with_optimization'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/router.rb:56:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/api.rb:119:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/api.rb:45:in `call!'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/grape-1.0.0/lib/grape/api.rb:40:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/rack-2.0.3/lib/rack/common_logger.rb:33:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/rack-cors-1.0.1/lib/rack/cors.rb:93:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/rack-2.0.3/lib/rack/config.rb:17:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/puma-3.9.1-java/lib/puma/configuration.rb:224:in `call'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/puma-3.9.1-java/lib/puma/server.rb:602:in `handle_request'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/puma-3.9.1-java/lib/puma/server.rb:435:in `process_client'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/puma-3.9.1-java/lib/puma/server.rb:299:in `block in run'
/home/deploy/.rvm/gems/jruby-9.1.7.0/gems/puma-3.9.1-java/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
jspeis commented 7 years ago

awesome, thanks @jazzido. let me know when the new release is available and I can update our server

jazzido commented 7 years ago

Just pushed 0.7.1 to Rubygems.

Update your Gemfiles and run bundle update