Hi,

That's strange. It looks like the full-text index was concurrently removed,
for example by calling "FT_DROP_INDEX", or "FT_DROP_ALL", FullText.dropAll,
or FullText.dropIndex(), or not correctly initialized.

What is you database URL? How did you create the full-text index, and what
operations run concurrently?

Regards,
Thomas


On Saturday, September 13, 2014, Yves Glodt <[email protected]> wrote:

> Hi there,
>
> I'm quite new to h2, but what I've seen so far, I have to say, I like it a
> lot.
>
> I have created a website <http://www.tessyglodt.lu/> using Spring Boot,
> Spring MVC, Spring JdbcTemplate and H2 as database and it works very good.
>
> The only problem I have is related to fulltext-search.
>
> Fulltext-search works generally, but fails sometimes with a NPE. Note that
> I am using the native implementation, not the Lucene one.
>
> I have initialized full-text following the tutorial at
> http://www.h2database.com/html/tutorial.html#fulltext
>
> In case it matters, the collation is set to GERMAN because it's the
> closest fit. H2 is version 1.3.174 or 1.3.176 (don't know exactly which one
> Spring Boot is pulling in...)
>
> This is the exception I get:
>
> 2014-09-13 17:41:02.852 ERROR 2978 --- [io-8080-exec-10]
> o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet
> [dispatcherServlet] in context with path [] threw exception [Request
> processing failed;
> nested exception is org.springframework.jdbc.UncategorizedSQLException:
> PreparedStatementCallback; uncategorized SQLException for SQL [SELECT *
> FROM FT_SEARCH_DATA(?, 0, 0)];
> SQL state [90105]; error code [90105];
> Exception calling user-defined function: "searchData(conn20:
> url=jdbc:default:connection user=SA, Rippweiler, 0, 0): null"; SQL
> statement:
> SELECT * FROM FT_SEARCH_DATA(?, 0, 0) [90105-176]; nested exception is
> org.h2.jdbc.JdbcSQLException:
> Exception calling user-defined function: "searchData(conn20:
> url=jdbc:default:connection user=SA, Rippweiler, 0, 0): null"; SQL
> statement:
> SELECT * FROM FT_SEARCH_DATA(?, 0, 0) [90105-176]] with root cause
> java.lang.NullPointerException: null
>     at org.h2.fulltext.FullText.search(FullText.java:651)
>     at org.h2.fulltext.FullText.searchData(FullText.java:324)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at
> org.h2.engine.FunctionAlias$JavaMethod.getValue(FunctionAlias.java:481)
>     at org.h2.expression.JavaFunction.getValue(JavaFunction.java:39)
>     at org.h2.table.FunctionTable.getValueResultSet(FunctionTable.java:219)
>     at org.h2.table.FunctionTable.getResult(FunctionTable.java:190)
>     at org.h2.index.FunctionIndex.find(FunctionIndex.java:49)
>     at org.h2.index.BaseIndex.find(BaseIndex.java:128)
>     at org.h2.index.IndexCursor.find(IndexCursor.java:160)
>     at org.h2.table.TableFilter.next(TableFilter.java:330)
>     at org.h2.command.dml.Select.queryFlat(Select.java:533)
>     at org.h2.command.dml.Select.queryWithoutCache(Select.java:646)
>     at org.h2.command.dml.Query.query(Query.java:323)
>     at org.h2.command.dml.Query.query(Query.java:291)
>     at org.h2.command.dml.Query.query(Query.java:37)
>     at org.h2.command.CommandContainer.query(CommandContainer.java:91)
>     at org.h2.command.Command.executeQuery(Command.java:197)
>     at
> org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:109)
>     at
> org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:703)
>     at
> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
>     at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:695)
>     at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:727)
>     at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:737)
>     at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:787)
>     at
> org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:892)
>     at lu.site.service.PageService.getSearch(PageService.java:124)
>     at lu.site.controller.WebController.getSearch(WebController.java:94)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at
> org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
>     at
> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
>     at
> org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
>     at
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
>     at
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
>     at
> org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
>     at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
>     at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
>     at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
>     at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
>     at
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>     at
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>     at
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:85)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>     at
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>     at
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
>     at
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>     at
> org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)
>     at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
>     at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
>     at
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
>     at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
>     at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>     at java.lang.Thread.run(Thread.java:745)
>
> Any idea what could go wrong ?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to