Cfsearch > exception

Hi there!

I’m running some instances of Lucee 5.2.9 where I get fails of the bundled search extension from time to time.
When doing I get an lucee.runtime.search.SearchException

I says the collection is undefined. In some scenariops the collection is beeing created and indexed just before the search programmatically, but the error is almost the same.
Is there anybody having an idea?

Thanks
Michael

Stacktrace:
lucee.runtime.exp.NativeException: collection upcollection is undefined
at org.lucee.extension.search.SearchEngineSupport.getCollectionByName(SearchEngineSupport.java:84)
at lucee.runtime.tag.Search.setCollection(Search.java:163)
at marketing.mydspace.list_cfm$cf.call(/marketing/mydspace/list.cfm:5)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:933)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:805)
at marketing.mydspace.index_cfm$cf.call(/marketing/mydspace/index.cfm:24)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:933)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:66)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2464)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2454)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2427)
at lucee.runtime.engine.Request.exe(Request.java:44)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1090)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1038)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:764)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:344)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:207)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:801)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Hi again,

this is a mess.

Sometimes the Stacktrace is different:

lucee.runtime.exp.NativeException: java.lang.NullPointerException at org.lucee.extension.search.SearchEngineSupport.addCollection(SearchEngineSupport.java:162) at org.lucee.extension.search.SearchEngineSupport.createCollection(SearchEngineSupport.java:131) at lucee.runtime.tag.Collection.doCreate(Collection.java:246) at lucee.runtime.tag.Collection.doStartTag(Collection.java:157) at apps.services.prodkeywords_cfm$cf.call(/apps/services/prodkeywords.cfm:99) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:931) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:821) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:225) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2462) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2452) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2425) at lucee.runtime.engine.Request.exe(Request.java:44) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1091) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1039) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:97) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156) at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:290) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:840) at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1362) at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1318) at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1302) at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1210) at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:1006) at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask

or it is more like:
lucee.runtime.exp.NativeException: can’t create file C:\resin-app1\conf\ab071f4538c1ff6de941f5cc9cb651fc\WEB-INF\lucee\search\search.xml, file already exists at lucee.commons.io.res.type.file.FileResource.createFile(FileResource.java:233) at org.lucee.extension.search.SearchEngineSupport.createSearchFile(SearchEngineSupport.java:484) at org.lucee.extension.search.SearchEngineSupport.init(SearchEngineSupport.java:58) at lucee.runtime.config.ConfigWebImpl.getSearchEngine(ConfigWebImpl.java:597) at lucee.runtime.tag.Collection.getSearchEngine(Collection.java:255) at lucee.runtime.tag.Collection.doCreate(Collection.java:246) at lucee.runtime.tag.Collection.doStartTag(Collection.java:157) at apps.services.prodkeywords_cfm$cf.call(/apps/services/prodkeywords.cfm:99) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:931) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:821) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:225) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2462) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2452) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2425) at lucee.runtime.engine.Request.exe(Request.java:44) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1091) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1039) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:97) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156) at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:290) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:840) at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1362) at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1318) at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1302) at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1210) at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:1006) at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117) at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93) at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169) at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) Caused by: java.io.IOException: can’t create file C:\resin-app1\conf\ab071f4538c1ff6de941f5cc9cb651fc\WEB-INF\lucee\search\search.xml, file already exists … 37 more

Should I add a bug-report, so this gets addressed? As this error needs a restart in a production environment it is really annoying.

Regards
Michael

If you are programically adding the collection and then creating the index, then searching it…

You may want to view the code, add some “cfsleep” commands to allow the collection to be created, then some if else statements to make make sure the collection was created before you attempt to index and search it.

If you read the logs you posted, the collection “collection upcollection is undefined”, so you are attempting to run something that didn’t check if the collection was created first.

Especially the “upcolletion” is not created programmatically.
I think it is this issue: [LDEV-1879] - Lucee
So, I’ll wait for a fix