HTTP Status 500 – Internal Server Error


Type Exception Report

Message org.glassfish.jersey.server.ContainerException: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'شهر)': Encountered " ")" ") "" at line 1, column 3.

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'شهر)': Encountered " ")" ") "" at line 1, column 3.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:423)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

org.glassfish.jersey.server.ContainerException: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'شهر)': Encountered " ")" ") "" at line 1, column 3.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:256)
	org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:238)
	org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:486)
	org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:316)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:403)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'شهر)': Encountered " ")" ") "" at line 1, column 3.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:114)
	com.baheth.search.SearchInNewBaheth.search(SearchInNewBaheth.java:75)
	com.baheth.webservice.BahethWebService.searchInBahethServiceWithHtml(BahethWebService.java:38)
	jdk.internal.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:568)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:403)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

org.apache.lucene.queryparser.classic.ParseException: Encountered " ")" ") "" at line 1, column 3.
Was expecting one of:
    <EOF> 
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    <REGEXPTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    
	org.apache.lucene.queryparser.classic.QueryParser.generateParseException(QueryParser.java:931)
	org.apache.lucene.queryparser.classic.QueryParser.jj_consume_token(QueryParser.java:813)
	org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:216)
	org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:109)
	com.baheth.search.SearchInNewBaheth.search(SearchInNewBaheth.java:75)
	com.baheth.webservice.BahethWebService.searchInBahethServiceWithHtml(BahethWebService.java:38)
	jdk.internal.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:568)
	org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
	org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
	org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
	org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:403)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/9.0.71