mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dev@xx" <...@proxiflex.fr>
Subject NullPointerException in ProtocolCodecFilter
Date Thu, 29 Apr 2010 22:02:55 GMT
One of my customers has very rare exceptions like this and I can't find any explanation in
my code :

org.apache.mina.filter.codec.ProtocolEncoderException: java.lang.NullPointerException
at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:313)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:805)
at org.apache.mina.filter.executor.ExecutorFilter.filterWrite(ExecutorFilter.java:706)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:805)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:731)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:506)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:498)
at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:428)
at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:369)
at fr.proxiflex.axx.server.HTTPReceivedHandler.handleMessage(HTTPReceivedHandler.java:38)
at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:232)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:298)
... 24 more

Anybody have any idea of what it can come from ?
I can give more information if necessary, but the exception seams to be internal to Mina.

In case, the HTTPReceivedHandler code is :

public class HTTPReceivedHandler implements MessageHandler
{
 private String root ;

    public HTTPReceivedHandler( String root )
    {
  Log.info( "root=" + root ) ;
  this.root = root ;
 }

 @Override
 public void handleMessage( IoSession session, Object message ) throws Exception
 {
   Log.trace( "R" ) ;
  HTTPMessage msg = (HTTPMessage)message ;
  Log.received( msg ) ;
  msg.execute( root ) ;
  session.write( msg ) ;    // <<<< line 38
 }

}

Thanks

Jean-Yves Linet
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message