Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334469

Summary: Search without any data leads to error
Product: [ECD] Orion Reporter: Sundar <mail>
Component: ClientAssignee: Project Inbox <e4.orion-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Sundar CLA 2011-01-15 17:56:54 EST
Search without any data leads to error. 

Probable cause:
Input is not validated at all or not validated for boundary condition.

----------------------------------------
Test case 1:
1. Start Orion and login.
2. After login without providing any input click "Search" or "Search Names"
> You will see an error message with HTTP 404 or 500 depending on what clicked above.

-----------------------------------------

Test case 2:
1. Execute the following URL in the browser which is used for search
http://localhost:8080/solrsearch?wt=json&fl=Id,Name,Length,Directory,LastModified,Location&hl=true&q=Name:
> It leads to the following exception.
org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: Cannot parse 'Name:': Encountered "<EOF>" at line 1, column 5.
Was expecting one of:
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:108)
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
	at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:85)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:28)
	at org.eclipse.e4.webide.server.configurator.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:63)
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173)
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:71)
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:25)
	at org.eclipse.e4.webide.server.configurator.servlet.WelcomeFileFilter.doFilter(WelcomeFileFilter.java:38)
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173)
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:71)
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:25)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:130)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:318)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse 'Name:': Encountered "<EOF>" at line 1, column 5.
Was expecting one of:
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:205)
	at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
	at org.apache.solr.search.QParser.getQuery(QParser.java:131)
	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
	... 34 more
Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 5.
Was expecting one of:
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1846)
	at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1728)
	at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1355)
	at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1265)
	at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1254)
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:200)
	... 37 more

[feedly mini]
Comment 1 John Arthorne CLA 2011-01-21 15:48:55 EST
Fixed in the client code. If you send a bogus query directly to the server solr will continue to report a failure.