Possible bug in solr_service.reify_solr_results

6 views
Skip to first unread message

Rick Johnson

unread,
Feb 1, 2011, 11:44:47 AM2/1/11
to Matthew Zumwalt, active...@googlegroups.com
Hi Matt,

So, I ran into a bug when I refactored the name of one of our models today.  The hitch happened when objects with the old model still existed in Fedora and were trying to be loaded through a relationship when instantiating the parent object.

In reify_solr_results it tries to instantiate the object using the Model name set in :active_fedora_model_s, if you do not have a definition for this model it throws this error:

uninitialized constant SubCollection

RAILS_ROOT: /opt/nd/home/rjohns14/git_dir/hydra_exhibit

Application Trace | Framework Trace | Full Trace
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:469:in `load_missing_constant'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:106:in `rake_original_const_missing'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/active-fedora-1.2.8/lib/active_fedora/solr_service.rb:39:in `const_get'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/active-fedora-1.2.8/lib/active_fedora/solr_service.rb:39:in `reify_solr_results'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/active-fedora-1.2.8/lib/active_fedora/solr_service.rb:34:in `each'
/home/rjohns14/.rvm/gems/ruby-1.8.7-p302/gems/active-fedora-1.2.8/lib/active_fedora/solr_service.rb:34:in `reify_solr_results'
(eval):16:in `subsets_outbound'
(eval):20:in `subsets'
So my question is should this be a bug and have it try to instantiate using ActiveFedora::Base instead if this happens, or should we leave it as is?  It is not a problem for me anymore because I removed the objects with the old model name, but wondering if this should be fixed for the future.

Thanks,
Rick

Matthew Zumwalt

unread,
Feb 1, 2011, 12:37:53 PM2/1/11
to Rick Johnson, active...@googlegroups.com
That sounds like a bug to me.  It should probably degrade to using ActiveFedora::Base and write a warning to the log.  Could you log a bug ticket in the duraspace jira?

Matt Zumwalt
MediaShelf, LLC



Rick Johnson

unread,
Feb 1, 2011, 1:37:56 PM2/1/11
to Matthew Zumwalt, active...@googlegroups.com
Done...

https://jira.duraspace.org/browse/HYDRA-370

Component is set to ActiveFedora and the Version is set to unscheduled.
Reply all
Reply to author
Forward
0 new messages