Sebb
added a comment - 15/Mar/11 00:36 The following sequence:
LIST ACTIVE alt.fan.*
00000000000000 000000000000000 y
java.io.IOException: 00000000000000 000000000000000 y
shows that the code thinks the server has responded with an invalid reply to the LIST ACTIVE command.
It should return something like:
LIST ACTIVE alt.fan.*
215 Newsgroups in form "group high low flags" .
000000000000000 000000000000000 y
For some reason the 215 response seems to be missing.
The IOException message is rather cryptic, and needs to be improved.
Does this happen every time?

Sebb
added a comment - 15/Mar/11 01:04 Also, try the listNewsgroups(pattern) method as well, as that uses a different method of handling the replies.
The group names returned by the server look rather odd, as they don't start with alt.fan. Maybe the server is misbehaving?
The program works fine on my news server (which has over 3000 groups under alt.fan).
[I've updated the IOException messages]

so I do need to update my svn rep?
I will give you a different output when using no pattern at all!

As you can see I have disabled the first newsgroup listening. In that case the second is running proberly. However still only 31 groups are listed. My server has more than 1000, that I know for sure...

So what I see is that when running the 2 independand commands the server gives me the IO

Sebb
added a comment - 15/Mar/11 12:05 Yes, to get the updated exception messages you will need to refresh SVN and rebuild.
Please also try using the other method, something like:
for ( String s : client.listNewsgroups(pattern)) {
System .out.println(s);
}
Also, if you can edit your previous comment, please can you enclose the output in {noformat} tags as it's very difficult to read at present.

Bas
added a comment - 15/Mar/11 13:52 This morning at around 7 o'clock the update was not in the SVN, the above was created using latest SVN at that time.
When I am home I will
svn update
After that:
mvn package
And then I will do the test as asked:
for(String s : client.listNewsgroups(pattern)) {
System.out.println(s);
}

Sebb
added a comment - 15/Mar/11 17:25 Looks like there is a problem interpreting the response from the server, and NET thinks the listing has finished.
I'm working on an update to your test program which will dump out the complete response contents to a file.
This can then be checked to see what's happening.

Sebb
added a comment - 15/Mar/11 17:40 Amended version of your test program.
Writes the response from the server to the file "listing.txt".
It would be helpful if you could run this and attach the output file, which should not contain any private information - but please check first.

The server is broken, as it does not double periods (full stops) at the start of the line
See RFC977, 2.4.1. Text Responses.

This is confusing the code, which thinks it has found end of text.
When the next command is sent, it gets the next line of text, rather than the proper reply (which would presumably be sent after the final period), so reports an error.

Having said that, it should be possible to allow for this bad behaviour, as the termination line does look uniquely identifiable.

==

The situation is that the server is not RFC-compliant.
Also that LIST ACTIVE does not seem to work.
If it is not supported, it should treat it like "LIST invalid" and respond with "501 bad command usage" or something similar.

The initial part of the listing looks rather odd - why does the server allow such strange names?
And at the end, there are a couple of odd names, too.

Sebb
added a comment - 15/Mar/11 20:30 The server is broken, as it does not double periods (full stops) at the start of the line
See RFC977, 2.4.1. Text Responses.
This is confusing the code, which thinks it has found end of text.
When the next command is sent, it gets the next line of text, rather than the proper reply (which would presumably be sent after the final period), so reports an error.
Having said that, it should be possible to allow for this bad behaviour, as the termination line does look uniquely identifiable.
==
The situation is that the server is not RFC-compliant.
Also that LIST ACTIVE does not seem to work.
If it is not supported, it should treat it like "LIST invalid" and respond with "501 bad command usage" or something similar.
The initial part of the listing looks rather odd - why does the server allow such strange names?
And at the end, there are a couple of odd names, too.

Sebb
added a comment - 15/Mar/11 22:04 At present the code terminates upon reading CRLF<period><not-period> and ignores any data thereafter.
I'm hoping to update the code so it only terminates when it sees CRLF<period>CRLF as per the RFC, but this may take a while.
If you wish to continue testing NET code, you will need to use a different server for the time being.
Meanwhile, you may wish to report the broken behaviour of the server to their support department.

Bas
added a comment - 17/Mar/11 16:54 Sebb, great, just tested it, and all examples are now working.
Read about the 375. Probably this fixed my issue.
Going to play with it more after the weekend, but for now I can confirm it is fixed.