You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Arvid Heise <ar...@ververica.com> on 2020/10/02 09:56:57 UTC

Re: Scala: Static methods in interface require -target:jvm-1.8

Also you could check if Java11 profile in Maven was (de)activated for some
reason.

On Mon, Sep 28, 2020 at 3:29 PM Piotr Nowojski <pn...@apache.org> wrote:

> Hi,
>
> It sounds more like an Intellij issue, not a Flink issue. But have you
> checked your configured target language level for your modules?
>
> Best regards,
> Piotrek
>
> pon., 28 wrz 2020 o 10:57 Lu Weizheng <lu...@hotmail.com>
> napisał(a):
>
>> Hi all,
>>
>> I recently upgraded Intellij IEDA from 2019 to 2020.2 Community Edition.
>> I didn’t do anything to Maven.
>> My code could compile correctly before. But now I get the following error:
>>
>> Static methods in interface require -target:jvm-1.8
>>
>> Probably because I use new WatermarkStrategy Scala API:
>>
>> .assignTimestampsAndWatermarks(
>>   WatermarkStrategy
>>     .forBoundedOutOfOrderness(Duration.ofSeconds(1))
>>     .withTimestampAssigner(new SerializableTimestampAssigner[(String,
>> Long, Int)] {
>>       override def extractTimestamp(t: (String, Long,
>> Int), l: Long): Long = t._2
>>     })
>> )
>>
>> My project have both java and scala code. Here’s my POM.xml file:
>>
>> <!-- Scala Compiler -->
>>          <plugin>
>>             <groupId>net.alchim31.maven</groupId>
>>             <artifactId>scala-maven-plugin</artifactId>
>> <!--            <version>3.2.2</version>-->
>>             <executions>
>>                <execution>
>>                   <id>scala-compile-first</id>
>>                   <phase>process-resources</phase>
>>                   <goals>
>>                      <goal>compile</goal>
>>                   </goals>
>>                </execution>
>>             </executions>
>> <!--            <executions>-->
>> <!--               <execution>-->
>> <!--                  <goals>-->
>> <!--                     <goal>compile</goal>-->
>> <!--                     <goal>testCompile</goal>-->
>> <!--                  </goals>-->
>> <!--               </execution>-->
>> <!--            </executions>-->
>>          </plugin>
>>
>> Is there something I need to add to my POM file?
>>
>>
>>
>>
>> Best Regards,
>> Weizheng Lu
>>
>

-- 

Arvid Heise | Senior Java Developer

<https://www.ververica.com/>

Follow us @VervericaData

--

Join Flink Forward <https://flink-forward.org/> - The Apache Flink
Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--
Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji
(Toni) Cheng