You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "tyler fan (Jira)" <ji...@apache.org> on 2020/01/10 03:19:00 UTC

[jira] [Commented] (FLINK-15218) java.lang.NoClassDefFoundError: org/apache/flink/table/sources/TableSource

    [ https://issues.apache.org/jira/browse/FLINK-15218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012418#comment-17012418 ] 

tyler fan commented on FLINK-15218:
-----------------------------------

thanks a lot

> java.lang.NoClassDefFoundError: org/apache/flink/table/sources/TableSource
> --------------------------------------------------------------------------
>
>                 Key: FLINK-15218
>                 URL: https://issues.apache.org/jira/browse/FLINK-15218
>             Project: Flink
>          Issue Type: Bug
>         Environment: IDEA 2019.2
> jdk 1.8
> no local flink envirment
>            Reporter: tyler fan
>            Priority: Major
>
> trying application develop in IDE,
>  
> making a simple app like read csv file and register like a table,
> ------------------------------------
> final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> BatchTableEnvironment tableEnv = BatchTableEnvironment.create(env);
> String[] colname = new String[] \{"CountryName","CountryCode","IndicatorName","IndicatorCode","1960"};
> TypeInformation<?>[] coltype = new TypeInformation<?>[] \{Types.STRING,Types.STRING,Types.STRING,Types.STRING,Types.STRING};
> TableSource dds = new CsvTableSource("/home/tylerf/sampledata/gpd.csv",colname,coltype);
> tableEnv.registerTableSource("gpd", dds);
> Table tab = tableEnv.scan("gpd");
>  
> -------------------------------------
> In IDEA
> got the error like this when i running the sample.
> ------------------------------------
> java.lang.NoClassDefFoundError: org/apache/flink/table/sources/TableSource
> ------------------------------------
> pom is configed the dependence by the document 1.9
> -------------------------------------
> <dependency>
>  <groupId>org.apache.flink</groupId>
>  <artifactId>flink-java</artifactId>
>  <version>${flink.version}</version>
>  <scope>provided</scope>
> </dependency>
> <dependency>
>  <groupId>org.apache.flink</groupId>
>  <artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
>  <version>${flink.version}</version>
>  <scope>provided</scope>
> </dependency>
> <dependency>
>  <groupId>org.apache.flink</groupId>
>  <artifactId>flink-table-api-java-bridge_2.11</artifactId>
>  <version>1.9.0</version>
>  <scope>provided</scope>
> </dependency>
> ---------------------------------------------------------
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)