[jcifs] Jcifs and webstart weirdness

Rollo, Dan DRollo at ETS.ORG
Wed Jan 24 20:12:07 GMT 2007

I have two questions:

1. Is there a plan to post newer versions of jcifs to the maven2 repos?
(I'm using m2 and jcifs 1.2.9, which appears a bit out of date now, but
it woas the most recent version I could find in the maven2 repo).

2. I have app that works just fine when run locally, but is failing when
run under webstart the first time it attempts to list the files in a
SmbFile directory. The error is a NPE, that seems similar to an issue
reported in the mailing list related to bad credentials (but the
credentials of this app are hard coded, so the same credentials that
work standalone should work in a signed, all-permissions webstart app I
would think).

	at jcifs.smb.SmbTransport.doSend(SmbTransport.java:402)
	at jcifs.util.transport.Transport.sendrecv(Transport.java:70)
	at jcifs.smb.SmbTransport.send(SmbTransport.java:602)
	at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:269)
	at jcifs.smb.SmbSession.send(SmbSession.java:225)
	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:147)
	at jcifs.smb.SmbFile.connect(SmbFile.java:791)
	at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
	at jcifs.smb.SmbFile.queryPath(SmbFile.java:1167)
	at jcifs.smb.SmbFile.length(SmbFile.java:2160)

The line of code in the app involved here is:
final SmbFile[] dirs = nasURL.getSmbFile().listFiles(
                //yearYYYY + monthMM + "*" // make sure we concat, not

This is the first time an SmbFile object is accessed in the app. The
SmbFile object returned by the call above is created like so:

	final String fullURL = NAS_URL_PREFIX + host + "/" + SHARE_NAME;
            final NtlmPasswordAuthentication ntAuth
                    = new NtlmPasswordAuthentication(NAS_DOMAIN,
NAS_UID, pwd);
                _smbFile = new SmbFile(fullURL, ntAuth);
            catch (MalformedURLException e)
                throw new RuntimeException("Error creating SmbFile: " +
e.getMessage(), e);

Any ideas what's going on here? Do I need to do some kind of classloader
games to make jcifs happy in webstart?

Other info:
Java Web Start 1.5.0_10
Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM
Running on Win XP	


This e-mail and any files transmitted with it may contain privileged or confidential information.
It is solely for use by the individual for whom it is intended, even if addressed incorrectly.
If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute,
or take any action in reliance on the contents of this information; and delete it from
your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.
-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list