[jcifs] Re: Long Unicode Share Names
Volodymyr Bychkoviak
vbychkoviak at i-hypergrid.com
Fri Nov 24 15:11:50 GMT 2006
Hi Michael.
Further debugging show cause of this problem.
Problem is in NameServiceClient.send() method.
if WINS property is empty then variable max
int max = NbtAddress.NBNS.length
is equals zero and
while (max-- > 0){...}
loop is never executed and name request is not sent to broadcast address.
> Michael B Allen wrote:
>> I'm about to sign off on the 1.2.10 release but it would be nice if
>> others could report that they are seeing long Unicode share names now.
>>
>> Anyone else test this?
>>
>> Mike
>>
>
> Yes I've testes this to check if long Unicode shares are present.
> It works good, however in debug mode (when executed step by step) it
> prints "Invalid state: 3"
>
> But I was unable to retrieve list of hosts from domain.
> Code that worked in 1.2.9 now throws an UnknownHostException:
>
> java.net.UnknownHostException: <myDomainName>
> at jcifs.UniAddress.getByName(UniAddress.java:301)
> at jcifs.smb.SmbFile.getAddress(SmbFile.java:757)
> at jcifs.smb.SmbFile.getType(SmbFile.java:1132)
> at jcifs.smb.SmbFile.list(SmbFile.java:1564)
> at jcifs.smb.SmbFile.list(SmbFile.java:1456)
> at myClass.main()
>
> Code looks like:
>
> NtlmPasswordAuthentication authentication = new
> NtlmPasswordAuthentication(domain, user, password);
>
> try {
> SmbFile file = new SmbFile("smb://"+domain, authentication);
> String[] strings = file.list();
> return new ArrayList(Arrays.asList((Object[]) strings));
> } catch (MalformedURLException e) {
> e.printStackTrace();
> } catch (SmbException e) {
> e.printStackTrace();
> }
> return Collections.EMPTY_LIST;
>
> Debugging show that point is in UniAddress.lookupServerOrWorkgroup()
> method.
>
> in 1.2.9 query thread q1x returns address.
> in 1.2.10 both query threads return null addresess.
>
>
More information about the jcifs
mailing list