Strange Exception at read

向雅 fyaoxy at gmail.com
Mon Nov 9 04:27:50 PST 2009


Hi All,
I tried AIO with a ftp download client test in windows7. it seems work
at most case, but a PASV ftp command.
I get an error, which is Access Denied, very strange. stack as follows:
java.io.IOException: 拒绝访问。(Access Denied)

	at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
	at sun.nio.ch.Iocp.access$700(Iocp.java:46)
	at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
	at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:717)

I trace it, it errno equal 5. a just windows error, but which is not a
WSA error. it happen at asChannel$ReadTask.run#native.read0.

The Main can test.just type any string ok.

--ERROR part
	USER {
			void parse(FTPSession session) {
				if (session.isReply("230")) {
					session.command = RUNNING;
					session.command("pasv");<-----------can replace with any other
ftp command and no error, just pasv error.
				} else if (session.isReply("3")) {
					session.command = PASSWORD;
					session.command("pass anonymous");
				} else {
					session.close();
				}
			}
		},

I guess, NO error at other commands, only pasv, read0 native method
buffer should OK.
so error many be at overlapp struct parameter?

Regards,

qinxian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.java
Type: application/octet-stream
Size: 7580 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20091109/fa12987e/attachment.obj 


More information about the nio-dev mailing list