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

Wang, Gang commented on MNEMONIC-640:
-------------------------------------

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)

Reply via email to