[jcifs] SmbFile getURL OpenStream not working SmbAuthException account currently disabled.

Michael B Allen ioplex at gmail.com
Thu Sep 9 17:47:14 MDT 2010


Hi Ashokkumar,

Ahh. I didn't read your message carefully. I understand your problem now.

The problem is that the java.net.URL class instance returned by getURL
will not propagate the supplied credential. If you want to use the
java.net.URL class, you will have to use default credential properties
jcifs.smb.client.{domain,username,password}.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

On Thu, Sep 9, 2010 at 3:51 AM, Ashokkumar <ashokkumar.bala at tcs.com> wrote:
> Michael B Allen <ioplex <at> gmail.com> writes:
>
>>
>> Hi Ashokkumar,
>>
>> You are not supplying suitable credentials and JCIFS is falling back
>> to "GUEST" which is almost always disabled on the server. Create a
>> proper NtlmPasswordAuthentication object for your SmbFile instances.
>>
>> Mike
>>
>
>
> Hi Mike,
>
> I believe I am passing a valid NtlmPasswordAuthentication object for the
> SmbFile instance. Thats why the below coding works fine.
>
> InputStream inputStream = smbFile.getInputStream();
>
> Whereas the below coding is not working (Getting the URL and its corresponding
> stream)
>
> InputStream inputStream = smbFile.getURL().openStream();
>
> Kindly let me know if it is not clear or I am doing wrong.
>
> Thanks and Regards,
> Ashokkumar B.
>
>


More information about the jCIFS mailing list