You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "frank (JIRA)" <ji...@apache.org> on 2016/04/20 08:03:25 UTC

[jira] [Comment Edited] (DIRMINA-1034) java.lang.NoSuchMethodError on java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView

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

frank edited comment on DIRMINA-1034 at 4/20/16 6:03 AM:
---------------------------------------------------------

this library is downloaded by maven from official repository.
I checked the code of version 2.0.9
org.apache.mina.core.session.DefaultIoSessionDataStructureFactory
Line 165:
        public Set<Object> getAttributeKeys(IoSession session) {
            synchronized (attributes) {
                return new HashSet<Object>(attributes.keySet());
            }
        }
double check the code of version 2.0.13, they are the same one.

And, I checked the jar file from Maven Repository, look into the file MANIFEST.MF, it shows that this jar is compiled under JDK 8 

Manifest-Version: 1.0
Bnd-LastModified: 1455295485551
Build-Jdk: 1.8.0_60
Bundle-DocURL: http://mina.apache.org/
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-ManifestVersion: 2
Bundle-Name: Apache MINA Core
Bundle-SymbolicName: org.apache.mina.core
Bundle-Vendor: Apache MINA Project
Bundle-Version: 2.0.13
Created-By: Apache Maven Bundle Plugin



was (Author: surfie):
this library is downloaded by maven from official repository.
I checked the code of version 2.0.9
org.apache.mina.core.session.DefaultIoSessionDataStructureFactory
Line 165:
        public Set<Object> getAttributeKeys(IoSession session) {
            synchronized (attributes) {
                return new HashSet<Object>(attributes.keySet());
            }
        }
比较了一下,2.0.13版本内的代码是一样的。

另外,查看了一下从Maven Repository上下载下来的MANIFEST.MF文件,的确是使用JKD8编译的:
Manifest-Version: 1.0
Bnd-LastModified: 1455295485551
Build-Jdk: 1.8.0_60
Bundle-DocURL: http://mina.apache.org/
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-ManifestVersion: 2
Bundle-Name: Apache MINA Core
Bundle-SymbolicName: org.apache.mina.core
Bundle-Vendor: Apache MINA Project
Bundle-Version: 2.0.13
Created-By: Apache Maven Bundle Plugin


> java.lang.NoSuchMethodError on java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-1034
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1034
>             Project: MINA
>          Issue Type: Bug
>          Components: Handler
>    Affects Versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13
>         Environment: Oracle JDK 7
>            Reporter: frank
>            Priority: Critical
>             Fix For: 2.0.14
>
>
> [WARN] [NioProcessor-2] org.apache.mina.core.filterchain.DefaultIoFilterChain - Unexpected exception from exceptionCaught handler.
> java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
> 	at org.apache.mina.core.session.DefaultIoSessionDataStructureFactory$DefaultIoSessionAttributeMap.getAttributeKeys(DefaultIoSessionDataStructureFactory.java:165)
> 	at org.apache.mina.core.session.AbstractIoSession.getAttributeKeys(AbstractIoSession.java:654)
> 	at org.red5.server.net.rtmp.RTMPMinaIoHandler$1.operationComplete(RTMPMinaIoHandler.java:240)
> 	at org.red5.server.net.rtmp.RTMPMinaIoHandler$1.operationComplete(RTMPMinaIoHandler.java:234)
> 	at org.apache.mina.core.future.DefaultIoFuture.notifyListener(DefaultIoFuture.java:411)
> 	at org.apache.mina.core.future.DefaultIoFuture.addListener(DefaultIoFuture.java:345)
> 	at org.apache.mina.core.future.DefaultCloseFuture.addListener(DefaultCloseFuture.java:78)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)