[jcifs] Re: InvalidOperationException

Michael B Allen mba2000 at ioplex.com
Tue Mar 29 01:48:32 GMT 2005


Shane said:

> I'm now getting the exception (any ideas greatful):
>
> 29-03-05 09:00:53,823 DEBUG HttpRequestHandler-7807290 file.ejb.FileBO:298
>  -
> register the SmbURLHandler
> 29-03-05 09:00:53,839 DEBUG HttpRequestHandler-7807290 file.ejb.FileBO:305
>  -
> auth:SERVER\downeys
> 29-03-05 09:00:53,839 DEBUG HttpRequestHandler-7807290 file.ejb.FileBO:309
>  -
> move the files
> 29-03-05 09:00:53,839 DEBUG HttpRequestHandler-7807290 file.ejb.FileBO:313
>  -
> smb path: smb://domain;downeys:pwd@server/databases/SOE-

I don't know what you're trying to do exactly but allow me to make a few
suggestions.

1) You only need to register the SMB URL handler if you're using smb://
URLs with the java.net.URL class. If you're not, I strongly recommend
*not* installing it because it can screw up URL functionality (e.g. HTTP
POST through java.net.URL will not work).
2) Use an NtlmPasswordAuthentication object to manage credentials. You
should never put creds into a URL. That's only for quick and dirty type
stuff and those special characters ';' '@' and ':' can cause problems.
3) Run your code without a container first to make sure it works as expected.

Mike


More information about the jcifs mailing list