[jcifs] operation for ????? service

Michael B Allen ioplex at gmail.com
Mon Mar 9 16:37:57 GMT 2009


On Mon, Mar 9, 2009 at 5:14 AM, Vincent MOREAU <vmoreau at proginov.com> wrote:
> Hi,
>
>
>
> I have an application using JCIFS and in some random cases it doesn’t work .
>  When the application start we make the init like this :
>
>
>
> jcifs.Config.setProperty("jcifs.resolveOrder", "DNS");
>
> jcifs.Config.setProperty("jcifs.smb.client.domain", domain);
>
> jcifs.Config.setProperty("jcifs.smb.client.username", nom_user);
>
> jcifs.Config.setProperty("jcifs.smb.client.password", pwd_user);
>
> jcifs.Config.setProperty("jcifs.encoding", "UTF-8");

The above property is invalid.

> And when we need to access a file over the Samba share we make :
>
>
>
> file = new
> SmbFile("smb://domasp2.com/dfs/docbur/repbur/centrale/PartageWeb/Doc/test.txt");
>
> System.out.println("Exist : " + file.exists());
>
>
>
> And have the following exception :
>
>
>
> jcifs.smb.SmbException: Invalid operation for ????? service
>
>       at jcifs.smb.SmbTree.send(SmbTree.java:92)

I'm not sure why this error would occur. The only think I can think of
that might cause an error like this is if you tried to use multiple
threads with the same SmbFile instance.

>
>       at jcifs.smb.SmbFile.send(SmbFile.java:728)
>
>       at jcifs.smb.SmbFile.queryPath(SmbFile.java:1307)
>
>       at jcifs.smb.SmbFile.exists(SmbFile.java:1361)
>
>       at
> pnv.wicket.util.resource.UBrtFileResource.<init>(UBrtFileResource.java:32)
>
>
>
> If we made another call like : file.getDfsPath(); we have the following
> exception
>
>
>
> jcifs.smb.SmbException: NT_STATUS_NOT_FOUND
>
>       at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:717)

There is a bug in JCIFS where if you use an IP address instead of a
hostname in an SMB URL with a stand-alone DFS root, you can get this
error. But if you're really using a URL as shown above this is not the
issue.

Mike

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


More information about the jcifs mailing list