I'm sure that all lucene-related jars  are in the classpath. 

Stack trace is below. But I don't know how to figure it.

CALL FTL_CREATE_INDEX('PUBLIC', 'TEST', 'FIRST_NAME,LAST_NAME');
Error creating or initializing trigger "FTL_TEST" object, class 
"org.h2.fulltext.FullTextLucene$FullTextTrigger", cause: 
"java.lang.reflect.InvocationTargetException"; see root cause for details; 
SQL statement:
CREATE TRIGGER IF NOT EXISTS "PUBLIC"."FTL_TEST" AFTER INSERT, UPDATE, 
DELETE, ROLLBACK ON "PUBLIC"."TEST" FOR EACH ROW CALL 
"org.h2.fulltext.FullTextLucene$FullTextTrigger" [90043-200] 
<https://localhost:8082/query.do?jsessionid=7301379b18fd365bcec0bc8020c83e81#>
 90043/90043 (Help) 
<https://h2database.com/javadoc/org/h2/api/ErrorCode.html#c90043>
org.h2.jdbc.JdbcSQLSyntaxErrorException: Error creating or initializing 
trigger "FTL_TEST" object, class 
"org.h2.fulltext.FullTextLucene$FullTextTrigger", cause: 
"java.lang.reflect.InvocationTargetException"; see root cause for details; 
SQL statement:
CREATE TRIGGER IF NOT EXISTS "PUBLIC"."FTL_TEST" AFTER INSERT, UPDATE, 
DELETE, ROLLBACK ON "PUBLIC"."TEST" FOR EACH ROW CALL 
"org.h2.fulltext.FullTextLucene$FullTextTrigger" 
[90043-200]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:576 
<https://h2database.com/html/source.html?file=org/h2/fulltext/FullTextLucene$FullTextTrigger%22%20[90043-200]%3Cbr%20/%3E%C2%A0%C2%A0%C2%A0%C2%A0at%20org/h2/message/DbException.java&line=576&build=200>
)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:429 
<https://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=429&build=200>
)
    at org.h2.message.DbException.get(DbException.java:194 
<https://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=194&build=200>
)
    at org.h2.schema.TriggerObject.load(TriggerObject.java:90 
<https://h2database.com/html/source.html?file=org/h2/schema/TriggerObject.java&line=90&build=200>
)
    at org.h2.schema.TriggerObject.setTriggerAction(TriggerObject.java:144 
<https://h2database.com/html/source.html?file=org/h2/schema/TriggerObject.java&line=144&build=200>
)
    at 
org.h2.schema.TriggerObject.setTriggerClassName(TriggerObject.java:126 
<https://h2database.com/html/source.html?file=org/h2/schema/TriggerObject.java&line=126&build=200>
)
    at org.h2.command.ddl.CreateTrigger.update(CreateTrigger.java:115 
<https://h2database.com/html/source.html?file=org/h2/command/ddl/CreateTrigger.java&line=115&build=200>
)
    at org.h2.command.CommandContainer.update(CommandContainer.java:198 
<https://h2database.com/html/source.html?file=org/h2/command/CommandContainer.java&line=198&build=200>
)
    at org.h2.command.Command.executeUpdate(Command.java:251 
<https://h2database.com/html/source.html?file=org/h2/command/Command.java&line=251&build=200>
)
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:228 
<https://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=228&build=200>
)
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201 
<https://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=201&build=200>
)
    at 
org.h2.fulltext.FullTextLucene.createOrDropTrigger(FullTextLucene.java:305 
<https://h2database.com/html/source.html?file=org/h2/fulltext/FullTextLucene.java&line=305&build=200>
)
    at org.h2.fulltext.FullTextLucene.createTrigger(FullTextLucene.java:283 
<https://h2database.com/html/source.html?file=org/h2/fulltext/FullTextLucene.java&line=283&build=200>
)
    at org.h2.fulltext.FullTextLucene.createIndex(FullTextLucene.java:161 
<https://h2database.com/html/source.html?file=org/h2/fulltext/FullTextLucene.java&line=161&build=200>
)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at 
org.h2.engine.FunctionAlias$JavaMethod.getValue(FunctionAlias.java:441 
<https://h2database.com/html/source.html?file=org/h2/engine/FunctionAlias.java&line=441&build=200>
)
    at org.h2.expression.function.JavaFunction.getValue(JavaFunction.java:40 
<https://h2database.com/html/source.html?file=org/h2/expression/function/JavaFunction.java&line=40&build=200>
)
    at org.h2.command.dml.Call.query(Call.java:65 
<https://h2database.com/html/source.html?file=org/h2/command/dml/Call.java&line=65&build=200>
)
    at org.h2.command.CommandContainer.query(CommandContainer.java:285 
<https://h2database.com/html/source.html?file=org/h2/command/CommandContainer.java&line=285&build=200>
)
    at org.h2.command.Command.executeQuery(Command.java:195 
<https://h2database.com/html/source.html?file=org/h2/command/Command.java&line=195&build=200>
)
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:222 
<https://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=222&build=200>
)
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:201 
<https://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=201&build=200>
)
    at org.h2.server.web.WebApp.getResult(WebApp.java:1459 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1459&build=200>
)
    at org.h2.server.web.WebApp.query(WebApp.java:1116 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1116&build=200>
)
    at org.h2.server.web.WebApp$1.next(WebApp.java:1078 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1078&build=200>
)
    at org.h2.server.web.WebApp$1.next(WebApp.java:1065 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=1065&build=200>
)
    at org.h2.server.web.WebThread.process(WebThread.java:178 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=178&build=200>
)
    at org.h2.server.web.WebThread.run(WebThread.java:94 
<https://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=94&build=200>
)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.h2.schema.TriggerObject.load(TriggerObject.java:80 
<https://h2database.com/html/source.html?file=org/h2/schema/TriggerObject.java&line=80&build=200>
)
    ... 28 more
Caused by: java.lang.NoSuchMethodError: 
org.apache.lucene.document.FieldType.<init>(Lorg/apache/lucene/document/FieldType;)V
    at 
org.h2.fulltext.FullTextLucene$FullTextTrigger.<init>(FullTextLucene.java:512 
<https://h2database.com/html/source.html?file=org/h2/fulltext/FullTextLucene.java&line=512&build=200>
)
    ... 33 more

On Wednesday, October 16, 2019 at 1:38:46 PM UTC+8, Evgenij Ryazanov wrote:
>
> Hello.
>
> I cannot reproduce this issue with Lucene 7.7.1 and Lucene 8.0.0. I can 
> test 7.7.2 and 8.2.0 too, but I don't think that results will be different.
>
> You need to click on the error message to see the complete stack trace, it 
> could describe the situation better.
>
> Most likely you don't really have lucene-core-*.jar, 
> lucene-analyzers-common-*.jar, 
> and lucene-queryparser-*.jar (all three jars with the same version are 
> necessary) in the classpath of the Console.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/813316a4-ccbf-4588-a61d-7c1261d8374e%40googlegroups.com.

Reply via email to