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

Freeman Yue Fang edited comment on CAMEL-16967 at 9/29/21, 11:49 PM:
---------------------------------------------------------------------

Eventually I figured out what's going on here.

"setitimer" is an posix API, but this shouldn't be used when using JDK, the 
java implementation should be used instead.

The reason is from robotframework codebase, the src/robot/utils/platform.py
The way to determine if java is used is like
{code}
java_match = re.match(r'java(\d+)\.(\d+)\.(\d+)', sys.platform)
if java_match:
    JYTHON = True
    JAVA_VERSION = tuple(int(i) for i in java_match.groups())
{code}
This works while java version is like "11.0.12" or "1.8.0_261". However this 
doesn't work while java version is "17" (or something like 18-ea), which is the 
latest JDK17 release version. This will cause JYTHON = false and hence can't 
load JYTHON lib when using JAVA

raised a ticket in robotframework here
https://github.com/robotframework/robotframework/issues/4099
This is quickly fixed at robotframework and the coming robotfamework 4.1.2 will 
contain the fix.



was (Author: ffang):
Eventually I figured out what's going on here.

"setitimer" is an posix API, but this shouldn't be used when using JDK, the 
java implementation should be used instead.

The reason is from robotframework codebase, the src/robot/utils/platform.py
The way to determine if java is used is like
{code}
java_match = re.match(r'java(\d+)\.(\d+)\.(\d+)', sys.platform)
if java_match:
    JYTHON = True
    JAVA_VERSION = tuple(int(i) for i in java_match.groups())
{code}
This works while java version is like "11.0.12" or "1.8.0_261". However this 
doesn't work while java version is "17" (or something like 18-ea), which is the 
latest JDK17 release version. This will cause JYTHON = false and hence can't 
load JYTHON lib when using JAVA

raised a ticket in robotframework here
https://github.com/robotframework/robotframework/issues/4099


> tests in camel-robotframework failed with JDK17
> -----------------------------------------------
>
>                 Key: CAMEL-16967
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16967
>             Project: Camel
>          Issue Type: Sub-task
>            Reporter: Freeman Yue Fang
>            Assignee: Freeman Yue Fang
>            Priority: Major
>
> caused by
> {code}
> [ERROR] WARNING: Illegal reflective access by org.python.core.io.StreamIO 
> (file:/Users/ffang/.m2/repository/org/robotframework/robotframework/4.1/robotframework-4.1.jar)
>  to field java.io.FilterOutputStream.out
> {code}



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

Reply via email to