New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mappingContext is not set, fails when using with spring-data-rest-webmvc [DATASOLR-163] #285
Comments
Jega A commented Aaron - I just encountered the exact same issue while trying to use spring-data-solr with spring-data-rest-webmvc. I will check out your patch. Thanks |
Jega A commented Even after applying this patch I get the same error. In fact the patched class does not seemed to be called at all during execution. Where/when actually does the class org.springframework.data.solr.repository.support/SolrRepositoryFactoryBean.java is being called? Thanks |
Aaron LaBella commented I confirmed with Jega that this patch does in-fact work. Can this be committed into the latest snapshot please? Thanks |
Christoph Strobl commented Thank you for opening this - SD Solr has till now not been officially tested with SD Rest. We'll work on that. |
Jega A commented I can confirm that the patch that Aaron provided is working. I am currently using a jar file that I patched using Aaron's fix and it is working fine. It would be great to have this fix in the latest snapshot. Thanks |
Aaron LaBella commented Thanks Chris ... I appreciate it. Having SD Solr fully tested and working with SD Rest would be awesome. Let me know if I can do anything to help. I also just found that the FacetPage, which works fine when talking to solr is not serialized properly by SD Rest (or whoever serializes it). In other words, the FacetPage does contain the facets, but, the returned JSON does not. Oh, and for what it's worth, after applying this patch, I did test all the CRUD operations via SD Rest using a SD Solr repository, and everything works pretty much flawlessly, including PATCH/partial updates. So, in general, I think its pretty close to functional. Thanks! |
Jega A commented Aaron - I ran into the same issue of the facets not being returned by the SD Rest service. I have filed a ticket with the SD Rest (https://jira.spring.io/browse/DATAREST-309). |
Aaron LaBella commented Hi Chris, Any updates here? Have been able to take a look at the issue and attached fix? Is this something we can get merged/committed/pushed soon? Thanks |
Christoph Strobl commented Hi, I contacted Greg who is into sd-rest. He promised to have a look. I'll try to have one myself later this week |
Aaron LaBella commented Chris, Any updates? |
Greg Turnquist commented This attached JIRA issue shows a fundamental change to SD Rest's test suite. When that issue is closed, this issue will require a rebase based on change in test tools |
Aaron LaBella opened DATASOLR-163 and commented
I'm trying to have spring-data-solr and spring-data-rest-webmvc work together. Apologies in advance if I'm doing something wrong, or missing some configuration/setting, there doesn't seem to be any great examples on the web of integrating these two components. From what I can see, after setting breakpoints and debugging things in my local environment, the mappingContext is not being set by
org.springframework.data.solr.repository.support.SolrRepositoryFactoryBean
, which results in the following exception when running queries against my solr-repositories:From my debugging:
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport:getPersistentEntity()
is returning null because the mappingContext is always null.I'm attaching a simple patch that "fixes" things and makes it work, but, I'm not familiar enough with the code base to know if its the "right" fix. There's probably a better place to call setMappingContext than where I added it, it was mostly just a test to see if that fixes things, and sure enough it does.
Can someone look at this asap and commit a proper fix?
Thanks!!
Affects: 1.2 RC1 (Dijkstra)
Attachments:
Issue Links:
("is depended on by")
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: