apache / paimon

Apache Paimon is a lake format that enables building a Realtime Lakehouse Architecture with Flink and Spark for both streaming and batch operations.
https://paimon.apache.org/
Apache License 2.0
2.42k stars 949 forks source link

[Bug] Caused by: java.util.ServiceConfigurationError: org.apache.paimon.factories.Factory: org.apache.paimon.flink.action.MigrateDatabaseActionFactory not a subtype #3375

Open antshan opened 5 months ago

antshan commented 5 months ago

Search before asking

Paimon version

0.8

Compute Engine

flink 1.18.1 flink-cdc 3.1

Minimal reproduce step

sync the data of mysql to paimon, warehouse is local filesystem flink is based on standalone

What doesn't meet your expectations?

after the job submitted to flink, some error occured Caused by: java.lang.RuntimeException: Unexpected error when trying to load service provider. at org.apache.paimon.factories.FactoryUtil.discoverFactories(FactoryUtil.java:118) at org.apache.paimon.factories.FactoryUtil.discoverFactory(FactoryUtil.java:38) at org.apache.paimon.catalog.CatalogFactory.createCatalog(CatalogFactory.java:73) at org.apache.paimon.catalog.CatalogFactory.createCatalog(CatalogFactory.java:66) at org.apache.paimon.flink.FlinkCatalogFactory.createPaimonCatalog(FlinkCatalogFactory.java:80) at org.apache.flink.cdc.connectors.paimon.sink.v2.PaimonWriter.(PaimonWriter.java:77) at org.apache.flink.cdc.connectors.paimon.sink.v2.PaimonSink.createWriter(PaimonSink.java:67) at org.apache.flink.cdc.connectors.paimon.sink.v2.PaimonSink.createWriter(PaimonSink.java:39) at org.apache.flink.streaming.runtime.operators.sink.StatelessSinkWriterStateHandler.createWriter(StatelessSinkWriterStateHandler.java:39) at org.apache.flink.streaming.runtime.operators.sink.SinkWriterOperator.initializeState(SinkWriterOperator.java:149) at org.apache.flink.cdc.runtime.operators.sink.DataSinkWriterOperator.initializeState(DataSinkWriterOperator.java:126) at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.initializeOperatorState(StreamOperatorStateHandler.java:122) at org.apache.flink.streaming.api.operators.AbstractStreamOperator.initializeState(AbstractStreamOperator.java:274) at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:106) at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:753) at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55) at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:728) at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:693) at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:953) at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:922) at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:746) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:562) at java.base/java.lang.Thread.run(Thread.java:842) Caused by: java.util.ServiceConfigurationError: org.apache.paimon.factories.Factory: org.apache.paimon.flink.action.MigrateDatabaseActionFactory not a subtype at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) at org.apache.paimon.factories.FactoryUtil.discoverFactories(FactoryUtil.java:105)

Anything else?

No response

Are you willing to submit a PR?

star-m commented 5 months ago

How To resolve It? We meet this question too!

star-m commented 5 months ago

We add classloader.resolve-order: parent-first to resolve it!