Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rest-dev] [External] : Re: TCK compilation error in JDK17
  • From: Alwin Joseph <alwin.joseph@xxxxxxxxxx>
  • Date: Fri, 29 Mar 2024 15:58:28 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J9G6NHyYFbbXk7bSJDi2oBxKDD1Ze8ZxK9QzWoUYmmg=; b=FYYgguIR7qPQ9u/W0cM3PB7wGBG/Ks8hGggzmBNEO7xXdWapmd5jV1VFn4goPMeu42o0oIpUEprHzW63kGgiJ5vqO4+poLhJgfI3UEboFmrohifqFplEJIYgd2h9j/WlOXSyfJeI7sI9HFcjjOqeH2fzFzEqaWaF3HoeBJBpt1awl2PW1sbqyMnH4RH8n8hvohP9WTRLYLugCu1x3N5dlRo57jiGLBVduH3/jP3bNjmWtfl3YMHHm2XIWGYmfsAXGaQCjs2Oiyf30EbX++TxY/gWNjYb5F2rMFY4GsDy1Kwgm2Y3A+rRV03R1MMk5qMHmYBbauLTbAD0eJsfuB9vTQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f37Bj1WhOqdU9DOmQppYdMij5OzP7rf1L619bKK8PWQaNKSTs54HaXNPulAfR7SEn14VFm1TRK5oYsSeCySs0tjbXCn8OpDOs8repxuyXLoh13NwnMAKXXGoN/y81EBHggPFrcy+UT2m28hncVkmqkC3unHBsPbLPbFb+m3Vg7aWYLLEOeZ2oRPUBsJqSR+Hmf4bASZ6MSvXoJ8RxwQnenz+1uFk2Be2+nMQlcyZgLckfwel+1erdDTJTMuWUyD6j2X5yo+KqqlaSBdAf8lAANho0uLEvTVbQE/SEcfEePVuEAZXPKCRMh1YsFK/uOsY5yY/WUcFm33iDwe3Wngajw==
  • Delivered-to: rest-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/rest-dev/>
  • List-help: <mailto:rest-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHagemxM6deF9j+ZUCPdiiKZIMBJLFO1yEAgAAErHY=
  • Thread-topic: [External] : Re: [rest-dev] TCK compilation error in JDK17

Thanks James. I upgraded Java version to 17.0.10 and build passes locally for me.

 

The Jenkins dropdown only has *jdk17latest without any info on patch versions. I will check if I can upgrade the JDK to higher than 17.0.2 in Jenkins.

 

Regards,
Alwin Joseph

 

From: James Perkins <jperkins@xxxxxxxxxx>
Date: Friday, 29 March 2024 at 8:56
PM
To: Jakarta Rest project developer discussions <rest-dev@xxxxxxxxxxx>
Cc: Alwin Joseph <alwin.joseph@xxxxxxxxxx>
Subject: [External] : Re: [rest-dev] TCK compilation error in JDK17

Hi Alwin,

I'm not seeing any issues locally with Java 17. My versions for maven and Java are:
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: /home/jperkins/apps/maven
Java version: 17.0.9, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-3.fc39.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.9-200.fc39.x86_64", arch: "amd64", family: "unix"

 

The second error I've seen before. IIRC before I fixed it by upgrading the maven-compiler-plugin. However, we're not that far behind. The latest being 3.13.0 and we're using 3.12.1. Maybe a newer version of Java is needed. It looks like 17.0.2 is being used and we may be hitting https://bugs.openjdk.org/browse/JDK-8262095.

 

On Fri, Mar 29, 2024 at 8:15AM Alwin Joseph via rest-dev <rest-dev@xxxxxxxxxxx> wrote:

Hi Team,

 

There seems to be restful-ws TCK compilation error happening only in JDK17 with the current main branch as run in https://ci.eclipse.org/rest/job/TCK_EFTL_build_and_stage/6/.

 

Apparently the TCK build passed with JDK17 on March 19 https://ci.eclipse.org/rest/job/TCK_EFTL_build_and_stage/3/.

The TCK build also passes with JDK21 with latest changes https://ci.eclipse.org/rest/job/TCK_EFTL_build_and_stage/7/.

 

The 2 types of issues are as below:

 

  1. non-varargs call of varargs method with inexact argument type for last parameter;

[ERROR]   cast to java.lang.Object for a varargs call

[ERROR]   cast to java.lang.Object[] for a non-varargs call and to suppress this warning.


This can be resolved by an Object cast as  JaxrsUtil.iterableToString(";", (Object) headers))  in below files:
jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/beanparam/BeanParamCommonClient.java
jaxrs-tck/src/main/java/ee/jakarta/tck/ws/rs/ee/rs/cookieparam/JAXRSClientIT.java.

 

 

  1. Errors like below which also appeared as warnings first.

APPLICATION_SVG_XML in jakarta.ws.rs.core.MediaType has been deprecated and marked for removal
APPLICATION_SVG_XML_TYPE in jakarta.ws.rs.core.MediaType has been deprecated and marked for removal
Integer(int) in java.lang.Integer has been deprecated and marked for removal

after an error message : java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Type.getThrownTypes()" because "tree.meth.type" is null

 

Does any know the solution for the second problem which occurs only in JDK17.

To reproduce :

-set JDK17 as java home,

-mvn clean install ;

-cd jaxrs-tck; mvn clean install

 

Thanks & Regards,
Alwin Joseph

 

_______________________________________________
rest-dev mailing list
rest-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org


 

--

James R. Perkins

JBoss by Red Hat


Back to the top