[ https://issues.apache.org/jira/browse/FLINK-31660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707207#comment-17707207 ]
Dawid Wysakowicz commented on FLINK-31660: ------------------------------------------ I think the way I did it is that I added one of the table modules (either planner or the uber jar) to the classpath of the test configuration in IntelliJ. ("Modify options" > "Modify classpath") That way I didn't need to change a valid pom configuration which is not handled 100% correctly by IntelliJ. > flink-connectors-kafka ITCases are not runnable in the IDE > ---------------------------------------------------------- > > Key: FLINK-31660 > URL: https://issues.apache.org/jira/browse/FLINK-31660 > Project: Flink > Issue Type: Bug > Components: Table SQL / Ecosystem > Affects Versions: 1.18.0 > Reporter: Natea Eshetu Beshada > Assignee: Natea Eshetu Beshada > Priority: Major > Labels: pull-request-available > > The following exception is thrown when trying to run > {{KafkaChangelogTableITCase}} or {{KafkaTableITCase}} > {code:java} > java.lang.NoClassDefFoundError: > org/apache/flink/table/shaded/com/jayway/jsonpath/spi/json/JsonProvider at > java.base/java.lang.Class.getDeclaredMethods0(Native Method) > at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) > at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307) > at java.base/java.lang.Class.getMethod0(Class.java:3293) > at java.base/java.lang.Class.getMethod(Class.java:2106) > at org.apache.calcite.linq4j.tree.Types.lookupMethod(Types.java:309) > at org.apache.calcite.util.BuiltInMethod.<init>(BuiltInMethod.java:670) > at org.apache.calcite.util.BuiltInMethod.<clinit>(BuiltInMethod.java:357) > at > org.apache.calcite.rel.metadata.BuiltInMetadata$PercentageOriginalRows.<clinit>(BuiltInMetadata.java:344) > at > org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows$RelMdPercentageOriginalRowsHandler.getDef(RelMdPercentageOriginalRows.java:231) > at > org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider.reflectiveSource(ReflectiveRelMetadataProvider.java:134) > at > org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows.<clinit>(RelMdPercentageOriginalRows.java:42) > at > org.apache.calcite.rel.metadata.DefaultRelMetadataProvider.<init>(DefaultRelMetadataProvider.java:42) > at > org.apache.calcite.rel.metadata.DefaultRelMetadataProvider.<clinit>(DefaultRelMetadataProvider.java:28) > at org.apache.calcite.plan.RelOptCluster.<init>(RelOptCluster.java:97) > at org.apache.calcite.plan.RelOptCluster.create(RelOptCluster.java:106) > at > org.apache.flink.table.planner.calcite.FlinkRelOptClusterFactory$.create(FlinkRelOptClusterFactory.scala:36) > at > org.apache.flink.table.planner.calcite.FlinkRelOptClusterFactory.create(FlinkRelOptClusterFactory.scala) > at > org.apache.flink.table.planner.delegation.PlannerContext.<init>(PlannerContext.java:132) > at > org.apache.flink.table.planner.delegation.PlannerBase.<init>(PlannerBase.scala:121) > at > org.apache.flink.table.planner.delegation.StreamPlanner.<init>(StreamPlanner.scala:65) > at > org.apache.flink.table.planner.delegation.DefaultPlannerFactory.create(DefaultPlannerFactory.java:65) > at > org.apache.flink.table.planner.loader.DelegatePlannerFactory.create(DelegatePlannerFactory.java:36) > at > org.apache.flink.table.factories.PlannerFactoryUtil.createPlanner(PlannerFactoryUtil.java:58) > at > org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:127) > at > org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122) > at > org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94) > at > org.apache.flink.streaming.connectors.kafka.table.KafkaTableTestBase.setup(KafkaTableTestBase.java:93) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) > at > org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at > org.apache.flink.util.TestNameProvider$1.evaluate(TestNameProvider.java:45) > at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61) > at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) > at > org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) > at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) > at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) > at > org.testcontainers.containers.FailureDetectingExternalResource$1.evaluate(FailureDetectingExternalResource.java:30) > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54) > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54) > at org.junit.rules.RunRules.evaluate(RunRules.java:20) > at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) > at org.junit.runners.ParentRunner.run(ParentRunner.java:413) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) > at > com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) > at > com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) > Caused by: java.lang.ClassNotFoundException: Class > 'org.apache.flink.table.shaded.com.jayway.jsonpath.spi.json.JsonProvider' not > found. Perhaps you forgot to add the module 'flink-table-runtime' to the > classpath? > at > org.apache.flink.core.classloading.ComponentClassLoader.loadClass(ComponentClassLoader.java:123) > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) > ... 61 more > Caused by: java.lang.ClassNotFoundException: > org.apache.flink.table.shaded.com.jayway.jsonpath.spi.json.JsonProvider > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) > at > org.apache.flink.core.classloading.ComponentClassLoader.loadClassFromOwnerOnly(ComponentClassLoader.java:164) > at > org.apache.flink.core.classloading.ComponentClassLoader.loadClassFromComponentFirst(ComponentClassLoader.java:158) > at > org.apache.flink.core.classloading.ComponentClassLoader.loadClass(ComponentClassLoader.java:104) > ... 62 more {code} > This is a similar problem to > https://issues.apache.org/jira/browse/FLINK-25525 -- This message was sent by Atlassian Jira (v8.20.10#820010)