You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mnemonic.apache.org by "Wang, Gang (Jira)" <ji...@apache.org> on 2021/04/17 19:18:00 UTC

[jira] [Comment Edited] (MNEMONIC-640) [JDK11] Upgrade issue about object is not an instance of declaring class

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

Wang, Gang edited comment on MNEMONIC-640 at 4/17/21, 7:17 PM:
---------------------------------------------------------------

The _InvokeCleaner_  method does not exist in JDK11 and old versions. the newer versions e.g. JDK12-17(latest one) do have it. so suggest migrating to JDK12 and above.


was (Author: qichfan):
The _InvokeCleaner_  method does not exist in JDK11 and old versions. the newer versions e.g. JDK12-16(latest one) do have it. so suggest migrating to JDK12 and above.

> [JDK11] Upgrade issue about object is not an instance of declaring class
> ------------------------------------------------------------------------
>
>                 Key: MNEMONIC-640
>                 URL: https://issues.apache.org/jira/browse/MNEMONIC-640
>             Project: Mnemonic
>          Issue Type: Bug
>          Components: Example, JDK Upgrade
>    Affects Versions: 0.15.0
>            Reporter: Wang, Gang
>            Priority: Major
>             Fix For: 0.15.0
>
>
>  
> The following issue is caused by deprecated buffer cleaner on higher version of JDK11, it needs to be investigated and refactor the code logic according to new method for native memory backed bytebuffer cleaning.
> {code:java}
> Manually destroy Buffer  at 759EBB3D.
> Reclaim Memory Buffer: 759EBB3D  Size: 1329017
> Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at org.apache.mnemonic.SysMemAllocator$1.reclaim(SysMemAllocator.java:106)
>         at org.flowcomputing.commons.resgc.ResCollector.destroyRes(ResCollector.java:158)
>         at org.flowcomputing.commons.resgc.ResHolder.destroy(ResHolder.java:132)
>         at org.flowcomputing.commons.resgc.ResHolder.destroy(ResHolder.java:118)
>         at org.apache.mnemonic.examples.Main.main(Main.java:155)
> {code}
>  



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