[jcifs] java.net.MalformedURLException further analysis

Glass, Eric eric.glass at capitalone.com
Thu Dec 12 23:08:58 EST 2002


> 
> This would detect that the classloader used to load the URL 
> class is not
> able to access the jcifs.smb.Handler class.  For people like 
> me, who use
> jCIFS primarily for NTLM authentication, this would have an 
> unfortunate
> (albeit relatively minor) side effect; the NTLM filter 
> apparently doesn't
> currently depend on SMB URLs, and functions properly when 
> installed under
> the web application.  Preventing such a deployment would break this
> (although the workaround would be fairly simple -- install jCIFS as an
> extension library).  Another option would be to print a 
> warning rather than
> throwing an exception if a "bad" installation is detected.
> 
> Eric
>  

Ouch.  First off, the detection code I gave doesn't work; a
ClassNotFoundException is still thrown, even when the classes are installed
correctly.  A more reliable (and much simpler) test is simply to put (at the
very end of the static init block in jcifs.Config):

try {
    new URL("smb://localhost");
} catch (MalformedURLException ex) {
    throw new IllegalStateException("Unable to create SMB URL.  " +
            "Ensure jCIFS is installed properly.");
}

Second, I have uncovered some other significant issues stemming from the
whole classloader thing; I am compiling more information, but it is not
good...


Eric
 
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.



More information about the jcifs mailing list