[ 
https://issues.apache.org/jira/browse/METRON-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434138#comment-16434138
 ] 

ASF GitHub Bot commented on METRON-1503:
----------------------------------------

Github user merrimanr commented on the issue:

    https://github.com/apache/metron/pull/975
  
    The latest commit adds unit tests for all the Solr Dao classes except 
SolrMetaAlertDao.  Mocking some of the Solr client classes (and client 
libraries in general) was challenging so I opted to move them to their own 
methods within the Daos and spy on those methods.  I feel like this achieves 
the same goal with less complexity.  
    
    I also didn't test for cases where exceptions from Solr client classes and 
just caught and thrown.  If you think there is value in doing this it probably 
won't require that much effort to add them.
    
    I ran into this bug while adding these tests:  
https://github.com/powermock/powermock/issues/731.  Incrementing the powermock 
version we use solved it.


> Alerts are not getting populated in alerts UI when search engine is Solr
> ------------------------------------------------------------------------
>
>                 Key: METRON-1503
>                 URL: https://issues.apache.org/jira/browse/METRON-1503
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Ryan Merriman
>            Assignee: Ryan Merriman
>            Priority: Major
>
> When navigating to the Alerts UI no alerts are displayed.  REST is returning 
> this error on a search call:
> {{Mar 27, 2018 6:51:50 AM org.apache.catalina.core.StandardWrapperValve 
> invoke SEVERE: Servlet.service() for servlet [dispatcherServlet] in context 
> with path [] threw exception [Request processing failed; nested exception is 
> org.apache.solr.common.SolrException: Collection not found: websphere] with 
> root cause org.apache.solr.common.SolrException: Collection not found: 
> websphere at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.getCollectionNames(CloudSolrClient.java:1401)
>  at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1094)
>  at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1073)
>  at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160) at 
> org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:942) at 
> org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:957) at 
> org.apache.metron.solr.dao.SolrSearchDao.search(SolrSearchDao.java:89) at 
> org.apache.metron.solr.dao.SolrDao.search(SolrDao.java:90) at 
> org.apache.metron.solr.dao.SolrMetaAlertDao.search(SolrMetaAlertDao.java:89) 
> at 
> org.apache.metron.rest.service.impl.SearchServiceImpl.search(SearchServiceImpl.java:73)
>  at 
> org.apache.metron.rest.controller.SearchController.search(SearchController.java:54)
>  at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
>  at 
> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
>  at 
> org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
>  at 
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
>  at 
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
>  at 
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
>  at 
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at 
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
>  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to