[jcifs] MalformedURLException

Michael B. Allen miallen at eskimo.com
Wed Nov 20 06:22:12 EST 2002


On Tue, 19 Nov 2002 12:14:58 -0500
r holley <rkholley at comcast.net> wrote:

> Mike,
> 
> I'm not exactly sure what the problem was but once I spelled the jcifs 
> jar file name correctly (I had "_" instead of "-") in my classpath the 
> MalformedException problem cleared up.  I still wonder where it was 
> getting the Java 1.1 version of java.net.URL from, but it's unimportant 
> now.

Mmm, ok. That's kinda wierd, because if the jCIFS classes were missing
alltogether you would hanve gotten a ClassNotFoundException. The only
other way you can get the unknown protocol: smb message is if you're
referencing java.net.URL directly and try to create an SMB URL without
calling Class.forName( "jcifs.Config" ) first.

Whatever. Glad to here it's working for you. Say "Hi" to Karen for us :~)

> 
> Thanks for the help.
> 
> Russ
> 
> 
> 
> 
> ----- Original Message -----
> From: "Allen, Michael B (RSCH)" <Michael_B_Allen at ml.com>
> Date: Monday, November 18, 2002 7:09 pm
> Subject: RE: [jcifs] MalformedURLException
> 
> > If you are absolutely sure there is no way that the Java 1.1 
> > java.net.URL class is
> > not being loaded then this would be a bug in jCIFS. But I doubt it.
> > 
> > See the first news bullet on our website.
> > 
> > > -----Original Message-----
> > > From:	Russell & Karen Holley [SMTP:rkholley at comcast.net]
> > > Sent:	Monday, November 18, 2002 6:55 PM
> > > To:	Christopher R. Hertel
> > > Cc:	jcifs at lists.samba.org
> > > Subject:	Re: [jcifs] MalformedURLException
> > > 
> > > Chris,
> > > 
> > > Thanks for the reply.  This certainly sounds like it could be a 
> > cause for
> > > the problem, but
> > > I'm still perplexed as to how to deal with it.  I compiled the
> > > CreateFile.java code with
> > > JDK 1.3, so that should be OK, and CreateFile again after 
> > changing the
> > > classpath so that
> > > the JDK 1.3 jar files were first in the classpath.  But I'm 
> > afraid that
> > > didn't do anything for me,
> > > I got the same exception.
> > > 
> > > Thanks,
> > > 
> > > Russ
> > > 
> > > ----- Original Message -----
> > > From: "Christopher R. Hertel" <crh at ubiqx.mn.org>
> > > To: "r holley" <rkholley at comcast.net>
> > > Cc: <jcifs at lists.samba.org>
> > > Sent: Monday, November 18, 2002 11:50 AM
> > > Subject: Re: [jcifs] MalformedURLException
> > > 
> > > 
> > > > The problem is that the URL class provided by Java 1 is not as 
> > good as
> > > > that provided by Java 2.
> > > >
> > > > It would be nice if jCIFS were able to work under both Java 1 
> > and Java 2,
> > > > but the list of problems supporting both continued to grow.  
> > The error you
> > > > are seeing is generally caused by the Java 1 URL class.
> > > >
> > > > Chris -)-----
> > > >
> > > > On Mon, Nov 18, 2002 at 08:26:59AM -0500, r holley wrote:
> > > > >
> > > > > Folks,
> > > > >
> > > > > I think this has come up before, but I'm not sure I 
> > understood the
> > > > > answer to my problem.  I've just downloaded jcifs and I'm 
> > trying to
> > > > > learn how to use it.  I thought I'd try the CreateFile.java 
> > example in
> > > > > the examples directory of the download.  After I compiled it 
> > I tried to
> > > > > run it with the following type command line (machine_name is 
> > the server
> > > > > I'm trying to reach, user_name is a valid user on the 
> > server, and
> > > > > user_pwd is the users' password) "java CreateFile
> > > > > smb://user_name:userPwd@machine_name/C/temp.txt".  The 
> > result I get
> > > > > is "java.net.MalformedURLException: unknown protocol: smb" 
> > thrown from
> > > > > java.net.URL.
> > > > >
> > > > > If I'm not mistaken a previous poster has the same problem 
> > and it was
> > > > > resolved by changing the classpath, but I'm not sure I 
> > understand how
> > > > > the problem was solved.
> > > > >
> > > > > Can anyone give me some help on this?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Russ
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Samba Team -- http://www.samba.org/     -)-----   Christopher 
> > R. Hertel
> > > > jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx 
> > development,> uninq.
> > > > ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> > > > OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
> > > 
> > 
> > 
> 


-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 



More information about the jcifs mailing list