You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Yong Wang <ja...@gmail.com> on 2007/08/29 03:56:05 UTC

MINA 2.0 release date?

Is there any schedule that mina 2.0 be released?

Re: Exception in thread "VmPipeIdleStatusChecker" when using Serial Connector

Posted by "Fernando C. de Castro" <fe...@altriz.com.br>.

   I tested the correction and it works perfectly.

   Thanks

Fernando


 Tue, 4 Sep 2007 18:03:27 +0200, Julien Vermillard <jv...@archean.fr> escreveu:

> On Tue,  4 Sep 2007 11:49:20 -0300
> "Fernando C. de Castro" <fe...@altriz.com.br> wrote:
> 
> > Hi people,
> > 
> >    Sorry if this was addressed before. This is my first take on the
> > new Serial Transport, and I decided to adapt the good old NetCat
> > Example as a first attempt. These were my steps:
> > 
> > 1) downloaded mina-core-2.0.0-M1-20070822.130904-57.jar from the
> > trunk;
> > 
> > 2) started a new project using that Mina 2.0 snapshot with the NetCat
> > Example files taken from the website;
> > 
> > 3) Made the necessary adjustments on the code (as the API changed a
> > bit from 1.x) and put the example to work. Worked fine as expected;
> > 
> > 4) Downloaded the rxtx pack and installed the DLL (I'm coding on
> > WindowsXP).
> > 
> > 5) Changed Main.java to use a SerialConnector instead of a
> > SocketConnector, following instructions on the Serial Tutorial.
> > 
> > 6) Run the program. 
> > 
> >    And this is what I get:
> > 
> > 
> > 
> > Native lib Version = RXTX-2.1-7pre20
> > Java lib Version   = RXTX-2.1-7
> > WARNING:  RXTX Version mismatch
> > 	Jar version = RXTX-2.1-7
> > 	native lib Version = RXTX-2.1-7pre20
> > Experimental:  JNI_OnLoad called.
> > 
> > Exception in thread "VmPipeIdleStatusChecker"
> > java.lang.NullPointerException at
> > org.apache.mina.common.IdleStatusChecker.notifyIdleSession(IdleStatusChecker.java:86)
> > at
> > org.apache.mina.common.IdleStatusChecker.access$200(IdleStatusChecker.java:33)
> > at
> > org.apache.mina.common.IdleStatusChecker$Worker.run(IdleStatusChecker.java:77)
> > 
> > 
> >    Apparently there is a version mismatch with RXTX, but I haven't
> > been able to identify why. Any hints on how to sort that out will
> > surely help. Plus, there is the Exception above. I ignored it at
> > first because the program was "cat'ing" whatever text was sent to the
> > serial port, as expected, with either Socket or Serial.
> > 
> >    But then I noticed: sessionIdle() was never called when I used a
> > SerialConnector (and the exception is thrown). When I use the
> > SocketConnector, no Exception is thrown and sessionIdle() is called
> > appropriately.
> > 
> >    My Main.java is as follows:
> > 
> > 
> > public class Main {
> >     public static void main(String[] args) throws Exception {
> > 
> >     	
> >     	System.out.println(RXTXVersion.getVersion());
> >     	
> >         IoConnector connector = new SerialConnector();
> >         connector.setHandler( new NetCatProtocolHandler() );
> >         connector.setConnectTimeout(10);
> >         
> >         SerialAddress portAddress=new SerialAddress( "COM3", 9600, 8,
> > SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE,
> > SerialAddress.FlowControl.NONE );
> > 
> >     
> >         ConnectFuture future = connector.connect( portAddress );
> >         future.await();
> >         IoSession session = future.getSession();
> >         
> > 
> >     }
> > }
> > 
> >    The NetCatProtocolHandler() used is as follows:
> > 
> > 
> > 
> > public class NetCatProtocolHandler extends IoHandlerAdapter {
> >     public void sessionOpened(IoSession session) {
> >         // Set reader idle time to 10 seconds.
> >         // sessionIdle(...) method will be invoked when no data is
> > read // for 10 seconds.
> >         session.getConfig().setIdleTime(IdleStatus.READER_IDLE, 10);
> >     }
> > 
> >     public void sessionClosed(IoSession session) {
> >         // Print out total number of bytes read from the remote peer.
> >         System.err.println("Total " + session.getReadBytes() + "
> > byte(s)"); }
> > 
> >     public void sessionIdle(IoSession session, IdleStatus status) {
> >         // Close the connection if reader is idle.
> >         if (status == IdleStatus.READER_IDLE)
> >             session.close();
> >     }
> > 
> >     public void messageReceived(IoSession session, Object message) {
> >         ByteBuffer buf = (ByteBuffer) message;
> >         // Print out read buffer content.
> >         while (buf.hasRemaining()) {
> >             System.out.print((char) buf.get());
> >         }
> >         System.out.flush();
> >     }
> > 
> >    
> > }
> > 
> > 
> >    Any ideas on what could be throwing the exception and probably
> > hindering sessionIdle() from being called when using the
> > SerialConnector?
> > 
> > 
> >    Thanks in advance.
> > 
> > 
> > Fernando
> > 
> 
> Ok it's fixed in SVN, apparently the SerialSession config wasn't
> correctly initialized.
> 
> Sorry if you lost some time around this issue.
> 
> Julien
> 
> PS : it's me or the mailling list is lagging ?
> 
> 
> 

Re: Exception in thread "VmPipeIdleStatusChecker" when using Serial Connector

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue, 4 Sep 2007 18:03:27 +0200
Julien Vermillard <jv...@archean.fr> wrote:

> On Tue,  4 Sep 2007 11:49:20 -0300
> "Fernando C. de Castro" <fe...@altriz.com.br> wrote:
> 
> > Hi people,
> > 
> >    Sorry if this was addressed before. This is my first take on the
> > new Serial Transport, and I decided to adapt the good old NetCat
> > Example as a first attempt. These were my steps:
> > 
> > 1) downloaded mina-core-2.0.0-M1-20070822.130904-57.jar from the
> > trunk;
> > 
> > 2) started a new project using that Mina 2.0 snapshot with the
> > NetCat Example files taken from the website;
> > 
> > 3) Made the necessary adjustments on the code (as the API changed a
> > bit from 1.x) and put the example to work. Worked fine as expected;
> > 
> > 4) Downloaded the rxtx pack and installed the DLL (I'm coding on
> > WindowsXP).
> > 
> > 5) Changed Main.java to use a SerialConnector instead of a
> > SocketConnector, following instructions on the Serial Tutorial.
> > 
> > 6) Run the program. 
> > 
> >    And this is what I get:
> > 
> > 
> > 
> > Native lib Version = RXTX-2.1-7pre20
> > Java lib Version   = RXTX-2.1-7
> > WARNING:  RXTX Version mismatch
> > 	Jar version = RXTX-2.1-7
> > 	native lib Version = RXTX-2.1-7pre20
> > Experimental:  JNI_OnLoad called.
> > 
> > Exception in thread "VmPipeIdleStatusChecker"
> > java.lang.NullPointerException at
> > org.apache.mina.common.IdleStatusChecker.notifyIdleSession(IdleStatusChecker.java:86)
> > at
> > org.apache.mina.common.IdleStatusChecker.access$200(IdleStatusChecker.java:33)
> > at
> > org.apache.mina.common.IdleStatusChecker$Worker.run(IdleStatusChecker.java:77)
> > 
> > 
> >    Apparently there is a version mismatch with RXTX, but I haven't
> > been able to identify why. Any hints on how to sort that out will
> > surely help. Plus, there is the Exception above. I ignored it at
> > first because the program was "cat'ing" whatever text was sent to
> > the serial port, as expected, with either Socket or Serial.
> > 
> >    But then I noticed: sessionIdle() was never called when I used a
> > SerialConnector (and the exception is thrown). When I use the
> > SocketConnector, no Exception is thrown and sessionIdle() is called
> > appropriately.
> > 
> >    My Main.java is as follows:
> > 
> > 
> > public class Main {
> >     public static void main(String[] args) throws Exception {
> > 
> >     	
> >     	System.out.println(RXTXVersion.getVersion());
> >     	
> >         IoConnector connector = new SerialConnector();
> >         connector.setHandler( new NetCatProtocolHandler() );
> >         connector.setConnectTimeout(10);
> >         
> >         SerialAddress portAddress=new SerialAddress( "COM3", 9600,
> > 8, SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE,
> > SerialAddress.FlowControl.NONE );
> > 
> >     
> >         ConnectFuture future = connector.connect( portAddress );
> >         future.await();
> >         IoSession session = future.getSession();
> >         
> > 
> >     }
> > }
> > 
> >    The NetCatProtocolHandler() used is as follows:
> > 
> > 
> > 
> > public class NetCatProtocolHandler extends IoHandlerAdapter {
> >     public void sessionOpened(IoSession session) {
> >         // Set reader idle time to 10 seconds.
> >         // sessionIdle(...) method will be invoked when no data is
> > read // for 10 seconds.
> >         session.getConfig().setIdleTime(IdleStatus.READER_IDLE, 10);
> >     }
> > 
> >     public void sessionClosed(IoSession session) {
> >         // Print out total number of bytes read from the remote
> > peer. System.err.println("Total " + session.getReadBytes() + "
> > byte(s)"); }
> > 
> >     public void sessionIdle(IoSession session, IdleStatus status) {
> >         // Close the connection if reader is idle.
> >         if (status == IdleStatus.READER_IDLE)
> >             session.close();
> >     }
> > 
> >     public void messageReceived(IoSession session, Object message) {
> >         ByteBuffer buf = (ByteBuffer) message;
> >         // Print out read buffer content.
> >         while (buf.hasRemaining()) {
> >             System.out.print((char) buf.get());
> >         }
> >         System.out.flush();
> >     }
> > 
> >    
> > }
> > 
> > 
> >    Any ideas on what could be throwing the exception and probably
> > hindering sessionIdle() from being called when using the
> > SerialConnector?
> > 
> > 
> >    Thanks in advance.
> > 
> > 
> > Fernando
> > 
> 
> Ok it's fixed in SVN, apparently the SerialSession config wasn't
> correctly initialized.
> 
> Sorry if you lost some time around this issue.
> 
> Julien
> 
> PS : it's me or the mailling list is lagging ?

I uploaded a new 2.0M1 snapshot for fixing the problem.
You can get it here :
http://tinyurl.com/2qjmnz

Julien


Re: Exception in thread "VmPipeIdleStatusChecker" when using Serial Connector

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue,  4 Sep 2007 11:49:20 -0300
"Fernando C. de Castro" <fe...@altriz.com.br> wrote:

> Hi people,
> 
>    Sorry if this was addressed before. This is my first take on the
> new Serial Transport, and I decided to adapt the good old NetCat
> Example as a first attempt. These were my steps:
> 
> 1) downloaded mina-core-2.0.0-M1-20070822.130904-57.jar from the
> trunk;
> 
> 2) started a new project using that Mina 2.0 snapshot with the NetCat
> Example files taken from the website;
> 
> 3) Made the necessary adjustments on the code (as the API changed a
> bit from 1.x) and put the example to work. Worked fine as expected;
> 
> 4) Downloaded the rxtx pack and installed the DLL (I'm coding on
> WindowsXP).
> 
> 5) Changed Main.java to use a SerialConnector instead of a
> SocketConnector, following instructions on the Serial Tutorial.
> 
> 6) Run the program. 
> 
>    And this is what I get:
> 
> 
> 
> Native lib Version = RXTX-2.1-7pre20
> Java lib Version   = RXTX-2.1-7
> WARNING:  RXTX Version mismatch
> 	Jar version = RXTX-2.1-7
> 	native lib Version = RXTX-2.1-7pre20
> Experimental:  JNI_OnLoad called.
> 
> Exception in thread "VmPipeIdleStatusChecker"
> java.lang.NullPointerException at
> org.apache.mina.common.IdleStatusChecker.notifyIdleSession(IdleStatusChecker.java:86)
> at
> org.apache.mina.common.IdleStatusChecker.access$200(IdleStatusChecker.java:33)
> at
> org.apache.mina.common.IdleStatusChecker$Worker.run(IdleStatusChecker.java:77)
> 
> 
>    Apparently there is a version mismatch with RXTX, but I haven't
> been able to identify why. Any hints on how to sort that out will
> surely help. Plus, there is the Exception above. I ignored it at
> first because the program was "cat'ing" whatever text was sent to the
> serial port, as expected, with either Socket or Serial.
> 
>    But then I noticed: sessionIdle() was never called when I used a
> SerialConnector (and the exception is thrown). When I use the
> SocketConnector, no Exception is thrown and sessionIdle() is called
> appropriately.
> 
>    My Main.java is as follows:
> 
> 
> public class Main {
>     public static void main(String[] args) throws Exception {
> 
>     	
>     	System.out.println(RXTXVersion.getVersion());
>     	
>         IoConnector connector = new SerialConnector();
>         connector.setHandler( new NetCatProtocolHandler() );
>         connector.setConnectTimeout(10);
>         
>         SerialAddress portAddress=new SerialAddress( "COM3", 9600, 8,
> SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE,
> SerialAddress.FlowControl.NONE );
> 
>     
>         ConnectFuture future = connector.connect( portAddress );
>         future.await();
>         IoSession session = future.getSession();
>         
> 
>     }
> }
> 
>    The NetCatProtocolHandler() used is as follows:
> 
> 
> 
> public class NetCatProtocolHandler extends IoHandlerAdapter {
>     public void sessionOpened(IoSession session) {
>         // Set reader idle time to 10 seconds.
>         // sessionIdle(...) method will be invoked when no data is
> read // for 10 seconds.
>         session.getConfig().setIdleTime(IdleStatus.READER_IDLE, 10);
>     }
> 
>     public void sessionClosed(IoSession session) {
>         // Print out total number of bytes read from the remote peer.
>         System.err.println("Total " + session.getReadBytes() + "
> byte(s)"); }
> 
>     public void sessionIdle(IoSession session, IdleStatus status) {
>         // Close the connection if reader is idle.
>         if (status == IdleStatus.READER_IDLE)
>             session.close();
>     }
> 
>     public void messageReceived(IoSession session, Object message) {
>         ByteBuffer buf = (ByteBuffer) message;
>         // Print out read buffer content.
>         while (buf.hasRemaining()) {
>             System.out.print((char) buf.get());
>         }
>         System.out.flush();
>     }
> 
>    
> }
> 
> 
>    Any ideas on what could be throwing the exception and probably
> hindering sessionIdle() from being called when using the
> SerialConnector?
> 
> 
>    Thanks in advance.
> 
> 
> Fernando
> 

Ok it's fixed in SVN, apparently the SerialSession config wasn't
correctly initialized.

Sorry if you lost some time around this issue.

Julien

PS : it's me or the mailling list is lagging ?

Re: Exception in thread "VmPipeIdleStatusChecker" when using Serial Connector

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue,  4 Sep 2007 11:49:20 -0300
"Fernando C. de Castro" <fe...@altriz.com.br> wrote:

> Hi people,
> 
>    Sorry if this was addressed before. This is my first take on the
> new Serial Transport, and I decided to adapt the good old NetCat
> Example as a first attempt. These were my steps:
> 
> 1) downloaded mina-core-2.0.0-M1-20070822.130904-57.jar from the
> trunk;
> 
> 2) started a new project using that Mina 2.0 snapshot with the NetCat
> Example files taken from the website;
> 
> 3) Made the necessary adjustments on the code (as the API changed a
> bit from 1.x) and put the example to work. Worked fine as expected;
> 
> 4) Downloaded the rxtx pack and installed the DLL (I'm coding on
> WindowsXP).
> 
> 5) Changed Main.java to use a SerialConnector instead of a
> SocketConnector, following instructions on the Serial Tutorial.
> 
> 6) Run the program. 
> 
>    And this is what I get:
> 
> 
> 
> Native lib Version = RXTX-2.1-7pre20
> Java lib Version   = RXTX-2.1-7
> WARNING:  RXTX Version mismatch
> 	Jar version = RXTX-2.1-7
> 	native lib Version = RXTX-2.1-7pre20
> Experimental:  JNI_OnLoad called.
> 
> Exception in thread "VmPipeIdleStatusChecker"
> java.lang.NullPointerException at
> org.apache.mina.common.IdleStatusChecker.notifyIdleSession(IdleStatusChecker.java:86)
> at
> org.apache.mina.common.IdleStatusChecker.access$200(IdleStatusChecker.java:33)
> at
> org.apache.mina.common.IdleStatusChecker$Worker.run(IdleStatusChecker.java:77)
> 
> 
>    Apparently there is a version mismatch with RXTX, but I haven't
> been able to identify why. Any hints on how to sort that out will
> surely help. Plus, there is the Exception above. I ignored it at
> first because the program was "cat'ing" whatever text was sent to the
> serial port, as expected, with either Socket or Serial.
> 
>    But then I noticed: sessionIdle() was never called when I used a
> SerialConnector (and the exception is thrown). When I use the
> SocketConnector, no Exception is thrown and sessionIdle() is called
> appropriately.
> 
>    My Main.java is as follows:
> 
> 
> public class Main {
>     public static void main(String[] args) throws Exception {
> 
>     	
>     	System.out.println(RXTXVersion.getVersion());
>     	
>         IoConnector connector = new SerialConnector();
>         connector.setHandler( new NetCatProtocolHandler() );
>         connector.setConnectTimeout(10);
>         
>         SerialAddress portAddress=new SerialAddress( "COM3", 9600, 8,
> SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE,
> SerialAddress.FlowControl.NONE );
> 
>     
>         ConnectFuture future = connector.connect( portAddress );
>         future.await();
>         IoSession session = future.getSession();
>         
> 
>     }
> }
> 
>    The NetCatProtocolHandler() used is as follows:
> 
> 
> 
> public class NetCatProtocolHandler extends IoHandlerAdapter {
>     public void sessionOpened(IoSession session) {
>         // Set reader idle time to 10 seconds.
>         // sessionIdle(...) method will be invoked when no data is
> read // for 10 seconds.
>         session.getConfig().setIdleTime(IdleStatus.READER_IDLE, 10);
>     }
> 
>     public void sessionClosed(IoSession session) {
>         // Print out total number of bytes read from the remote peer.
>         System.err.println("Total " + session.getReadBytes() + "
> byte(s)"); }
> 
>     public void sessionIdle(IoSession session, IdleStatus status) {
>         // Close the connection if reader is idle.
>         if (status == IdleStatus.READER_IDLE)
>             session.close();
>     }
> 
>     public void messageReceived(IoSession session, Object message) {
>         ByteBuffer buf = (ByteBuffer) message;
>         // Print out read buffer content.
>         while (buf.hasRemaining()) {
>             System.out.print((char) buf.get());
>         }
>         System.out.flush();
>     }
> 
>    
> }
> 
> 
>    Any ideas on what could be throwing the exception and probably
> hindering sessionIdle() from being called when using the
> SerialConnector?
> 
> 
>    Thanks in advance.
> 
> 
> Fernando
> 

Hi Fernando, 

The version mismatch is due to the fact you use your librxrtx*.so and
your rxtx.jar are from different version. The native libs are the pre20
ones, it's not very important the API is the same but you could updated
it with the http://rxtx.org ones.

For the exception, it's weird, I'm going to take a look. You can
open an issue on the tracker if you want to track this bug.

Thanks for the report,

Julien


Exception in thread "VmPipeIdleStatusChecker" when using Serial Connector

Posted by "Fernando C. de Castro" <fe...@altriz.com.br>.
Hi people,

   Sorry if this was addressed before. This is my first take on the new Serial Transport, and I decided to adapt the good old NetCat Example as a first attempt. These were my steps:

1) downloaded mina-core-2.0.0-M1-20070822.130904-57.jar from the trunk;

2) started a new project using that Mina 2.0 snapshot with the NetCat Example files taken from the website;

3) Made the necessary adjustments on the code (as the API changed a bit from 1.x) and put the example to work. Worked fine as expected;

4) Downloaded the rxtx pack and installed the DLL (I'm coding on WindowsXP).

5) Changed Main.java to use a SerialConnector instead of a SocketConnector, following instructions on the Serial Tutorial.

6) Run the program. 

   And this is what I get:



Native lib Version = RXTX-2.1-7pre20
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.1-7
	native lib Version = RXTX-2.1-7pre20
Experimental:  JNI_OnLoad called.

Exception in thread "VmPipeIdleStatusChecker" java.lang.NullPointerException
	at org.apache.mina.common.IdleStatusChecker.notifyIdleSession(IdleStatusChecker.java:86)
	at org.apache.mina.common.IdleStatusChecker.access$200(IdleStatusChecker.java:33)
	at org.apache.mina.common.IdleStatusChecker$Worker.run(IdleStatusChecker.java:77)


   Apparently there is a version mismatch with RXTX, but I haven't been able to identify why. Any hints on how to sort that out will surely help. Plus, there is the Exception above. I ignored it at first because the program was "cat'ing" whatever text was sent to the serial port, as expected, with either Socket or Serial.

   But then I noticed: sessionIdle() was never called when I used a SerialConnector (and the exception is thrown). When I use the SocketConnector, no Exception is thrown and sessionIdle() is called appropriately.

   My Main.java is as follows:


public class Main {
    public static void main(String[] args) throws Exception {

    	
    	System.out.println(RXTXVersion.getVersion());
    	
        IoConnector connector = new SerialConnector();
        connector.setHandler( new NetCatProtocolHandler() );
        connector.setConnectTimeout(10);
        
        SerialAddress portAddress=new SerialAddress( "COM3", 9600, 8, SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE, SerialAddress.FlowControl.NONE );

    
        ConnectFuture future = connector.connect( portAddress );
        future.await();
        IoSession session = future.getSession();
        

    }
}

   The NetCatProtocolHandler() used is as follows:



public class NetCatProtocolHandler extends IoHandlerAdapter {
    public void sessionOpened(IoSession session) {
        // Set reader idle time to 10 seconds.
        // sessionIdle(...) method will be invoked when no data is read
        // for 10 seconds.
        session.getConfig().setIdleTime(IdleStatus.READER_IDLE, 10);
    }

    public void sessionClosed(IoSession session) {
        // Print out total number of bytes read from the remote peer.
        System.err.println("Total " + session.getReadBytes() + " byte(s)");
    }

    public void sessionIdle(IoSession session, IdleStatus status) {
        // Close the connection if reader is idle.
        if (status == IdleStatus.READER_IDLE)
            session.close();
    }

    public void messageReceived(IoSession session, Object message) {
        ByteBuffer buf = (ByteBuffer) message;
        // Print out read buffer content.
        while (buf.hasRemaining()) {
            System.out.print((char) buf.get());
        }
        System.out.flush();
    }

   
}


   Any ideas on what could be throwing the exception and probably hindering sessionIdle() from being called when using the SerialConnector?


   Thanks in advance.


Fernando


Re: MINA 2.0 release date?

Posted by Trustin Lee <tr...@gmail.com>.
On 8/29/07, Yong Wang <ja...@gmail.com> wrote:
> Is there any schedule that mina 2.0 be released?

Not yet.  At least before OSSummit Asia 2007 held in November.  :D

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6