You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/12/05 00:09:43 UTC

[jira] Closed: (DIRMINA-435) NullPointerException in IoServiceListenerSupport

     [ https://issues.apache.org/jira/browse/DIRMINA-435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee closed DIRMINA-435.
-------------------------------


> NullPointerException in IoServiceListenerSupport
> ------------------------------------------------
>
>                 Key: DIRMINA-435
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-435
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.0.4, 1.1.1, 1.0.5, 1.1.2, 1.0.6, 1.1.3, 1.0.7, 1.1.4, 1.0.8, 1.1.5
>         Environment: WinXP SP 2
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
>            Reporter: Matthew Phillips
>            Assignee: Trustin Lee
>             Fix For: 1.0.9, 1.1.6
>
>         Attachments: mina.patch
>
>
> This is an odd one, since it occurs on WinXP and not on Mac OS X. The error was seen under 1.5, but also occurs on 1.6. I see the following NPE :
> -----
> Exception trace:
> java.lang.NullPointerException
> 	at java.util.concurrent.ConcurrentHashMap.hash(Unknown Source)
> 	at java.util.concurrent.ConcurrentHashMap.putIfAbsent(Unknown Source)
> 	at org.apache.mina.common.support.IoServiceListenerSupport.fireSessionCreated(IoServiceListenerSupport.java:152)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor.doAddNew(SocketIoProcessor.java:135)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$300(SocketIoProcessor.java:44)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:444)
> 	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:39)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> ------
> The NPE is being caused by IoSession.getServiceAddress () returning null, which then bombs the attempt to use it as a key in the map (IoServiceListenerSupport:151):
>        SocketAddress serviceAddress = session.getServiceAddress(); // null
>         // Get the session set.
>         Set<IoSession> s = new IdentityHashSet<IoSession>();
>         Set<IoSession> sessions = managedSessions.putIfAbsent(serviceAddress,
>                 Collections.synchronizedSet(s));
> This has me stumped. Can anyone help?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.