Closed maijh closed 3 years ago
You probably packaged trino-main (presto-main) as the plugin dependency.
Please upgrade to Trino and then add in your pom.xml
<packaging>trino-plugin</packaging>
<plugin>
<groupId>io.trino</groupId>
<artifactId>trino-maven-plugin</artifactId>
<version>10</version>
<extensions>true</extensions>
</plugin>
this will ensure the plugin gets correctly packaged.
I will close this as not-an-issue in Trino.
We can continue conversation here, or on #dev
channel on our slack.
See you there!
@findepi hi, I see your answer about issue 7442,and i add presto-maven-plugin in my pom file,but i still fail.when i follow the steps below,i found i will produce a ZIP file, and it contains the presto-main.jar.
1.Add
<packaging>presto-plugin</packaging>
<plugin>
<groupId>io.prestosql</groupId>
<artifactId>presto-maven-plugin</artifactId>
<version>8</version>
<extensions>true</extensions>
</plugin>
2.Remove the shade plugin. The above will produce a ZIP file , and i unzipped in the server plugin directory. 3.Remove src/main/resources/META-INF/services/io.prestosql.spi.Plugin
i am writing a plugin for presto 326,i find a error when i start presto with my plugin,like this: java.lang.NoClassDefFoundError: io/prestosql/operator/aggregation/state/StateCompiler at org.hao.aggregation.LongBitmapAggregation.(LongBitmapAggregation.java:13)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:330)
at java.lang.invoke.DirectMethodHandle$EnsureInitialized.computeValue(DirectMethodHandle.java:327)
at java.lang.ClassValue.getFromHashMap(ClassValue.java:227)
at java.lang.ClassValue.getFromBackup(ClassValue.java:209)
at java.lang.ClassValue.get(ClassValue.java:115)
at java.lang.invoke.DirectMethodHandle.checkInitialized(DirectMethodHandle.java:351)
at java.lang.invoke.DirectMethodHandle.ensureInitialized(DirectMethodHandle.java:341)
at java.lang.invoke.DirectMethodHandle.internalMemberNameEnsureInit(DirectMethodHandle.java:291)
at io.prestosql.$gen.VarbinaryBigintLongToBmAccumulator_20210329_083533_9.addInput(Unknown Source)
at io.prestosql.operator.Aggregator.processPage(Aggregator.java:58)
at io.prestosql.operator.AggregationOperator.addInput(AggregationOperator.java:152)
at io.prestosql.operator.Driver.processInternal(Driver.java:384)
at io.prestosql.operator.Driver.lambda$processFor$8(Driver.java:283)
at io.prestosql.operator.Driver.tryWithLock(Driver.java:675)
at io.prestosql.operator.Driver.processFor(Driver.java:276)
at io.prestosql.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1075)
at io.prestosql.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
at io.prestosql.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:484)
at io.prestosql.$gen.Presto_326____20210329_083505_2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: io.prestosql.operator.aggregation.state.StateCompiler
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at io.prestosql.server.PluginClassLoader.loadClass(PluginClassLoader.java:85)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 24 more
i test the plugin example "avg_double" success. But why my plugin fail can someone help me ? my pom file: