Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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:15 AM 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