[ https://issues.apache.org/jira/browse/DIRMINA-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525636 ]
Matthew Phillips commented on DIRMINA-435: ------------------------------------------ It is reproducible, and happens all the time, no significant load. I don't even know where to begin trying to create a test case, but if you're willing to grab the project from SVN at https://avis.svn.sourceforge.net/svnroot/avis/trunk and run the test case in server/src/test/org/avis/federation/JUTestFederation.java (JUnit 4.1), you should find it fails on WinXP. If you have ant 1.7, "cd server && ant tests" will do it (I'm running it in JUnit under Eclipse). I've run the exact same test on Mac OS X on both a G4 Powerbook and an Intel Mac Pro, and it runs fine there. It also runs on an (old'ish) FC3 Linux box. Like I said, very odd. > 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.1.2 > 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 > > 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.