mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Therning <nik...@trillian.se>
Subject Re: exception in OrderedThreadPoolExecutor
Date Wed, 20 Feb 2008 07:23:12 GMT
Wilson Yeung wrote:
> After sending a bunch of UDP datagrams, sleep for 30 seconds, then
> this gets printed to console:
>
>      [java] Exception in thread "pool-1-thread-1" java.lang.NullPointerException
>      [java] 	at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor.getSessionBuffer(OrderedThreadPoolExecutor.java:447)
>      [java] 	at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor.access$900(OrderedThreadPoolExecutor.java:52)
>      [java] 	at
> org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:492)
>      [java] 	at java.lang.Thread.run(Thread.java:613)
>
> And then no more messages are ever sent despite how I might try.
>
> If I modify OrderedThreadPoolExecutor like so:
>
> clara:executor wilson$ svn diff OrderedThreadPoolExecutor.java
> Index: OrderedThreadPoolExecutor.java
> ===================================================================
> --- OrderedThreadPoolExecutor.java	(revision 627903)
> +++ OrderedThreadPoolExecutor.java	(working copy)
> @@ -489,7 +489,9 @@
>                      }
>
>                      try {
> -                        runTasks(getSessionBuffer(session));
> +                       if (session != null) {
> +                            runTasks(getSessionBuffer(session));
> +                        }
>                      } finally {
>                          idleWorkers.incrementAndGet();
>                      }
>
> Then all is well.  Any ideas?  Am I abusing Mina, or is it an honest
> to goodness Mina bug?
>
> Wilson
>   

Do you have a test case which triggers this problem? You should open up 
a JIRA issue and attach your test case and we will have a look at it.

/Niklas


Mime
View raw message