简体   繁体   中英

java.lang.IllegalStateException: There is no current context in hybris 1905

Trying to solr partial update through code but while converting search query into solr query getting below exception.

java.lang.IllegalStateException: There is no current context at de.hybris.platform.solrfacetsearch.search.context.impl.DefaultFacetSearchContextFactory.getContext(DefaultFacetSearchContextFactory.java:96) ~[solrfacetsearchserver.jar:?] at de.hybris.platform.solrfacetsearch.search.context.impl.DefaultFacetSearchContextFactory.getContext(DefaultFacetSearchContextFactory.java:1) ~[solrfacetsearchserver.jar:?] at de.hybris.platform.solrfacetsearch.search.impl.DefaultSolrQueryConverter.createSolrQuery(DefaultSolrQueryConverter.java:269) ~[solrfacetsearchserver.jar:?] at de.hybris.platform.solrfacetsearch.search.impl.DefaultSolrQueryConverter.convertSolrQuery(DefaultSolrQueryConverter.java:186) ~[solrfacetsearchserver.jar: ?] at com.msw.core.servicelayer.solr.impl.DefaultMswSolrService.writeToSolrVariant(DefaultMswSolrService.java:274) [classes/:?]

Method used to convert:

solrQueryConverter.convertSolrQuery(SearchQuery query);

Have you initial create you SOLR index? One for the store (the product-solr-index) and one for the backoffice (the backoffice-solr-index). In some setups hybris don't initialcreate the SOLR index on his own. Have a look in the backoffice if the indexes was created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM