[jcifs] java.net.MalformedURLException: unknown protocol: smb

Michael B. Allen miallen at eskimo.com
Sat Nov 2 05:55:42 EST 2002


On Fri, 1 Nov 2002 12:38:14 +0100
Mats.Svensson at astrazeneca.com wrote:

> 
> Solved, I just had to add the jcifs jar to the 
> resin classpath, not just the webapp classpath. 

Ahh, imporant information. Thanks. So you have to put it in the top
level lib/ directory.

> 
> /Mats
> 
> > -----Original Message-----
> > From: Svensson, Mats 
> > Sent: den 24 oktober 2002 11:42
> > To: jcifs at samba.org
> > Subject: [jcifs] java.net.MalformedURLException: unknown protocol: smb
> > 
> > 
> > Hi!
> > 
> > I try to use the NetworkExplorer servlet on: 
> > jcifs 0705b
> > resin 215
> > jdk 141_01
> > w2k sp3
> > 
> > but I keep getting the exception included below.
> > 
> > 1) I can't find any documentation (other than the source) on 
> > how the URL (PathInfo) is supposed to be used, I guess it is 
> > http://servletContainerHost/NetworkExplorer/someHostIwantToExp
> > lore/Share
> > 
> > 
> > java.net.MalformedURLException: unknown protocol: smb
> > 	at java.net.URL.<init>(URL.java:586)
> > 	at java.net.URL.<init>(URL.java:476)
> > 	at java.net.URL.<init>(URL.java:425)
> > 	at jcifs.smb.SmbFile.<init>(SmbFile.java:401)
> > 	at jcifs.http.NetworkExplorer.doGet(NetworkExplorer.java:421)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> > 	at
> > com.caucho.server.http.FilterChainServlet.doFilter(FilterChain
> > Servlet.java:9
> > 6)
> > 	at 
> > com.caucho.server.http.Invocation.service(Invocation.java:312)
> > 	at
> > com.caucho.server.http.CacheInvocation.service(CacheInvocation
> > .java:135)
> > 	at
> > com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
> > 	at
> > com.caucho.server.http.HttpRequest.handleConnection(HttpReques
> > t.java:163)
> > 	at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
> > 	at java.lang.Thread.run(Thread.java:536)
> > 
> > web.xml:
> > <web-app>
> >   <classpath id='WEB-INF/lib/jcifs-0.7.0b5.jar'/>
> >     <servlet>
> >         <servlet-name>NetworkExplorer</servlet-name>
> >         <servlet-class>jcifs.http.NetworkExplorer</servlet-class>
> >         <init-param>
> >             <param-name>jcifs.smb.client.domain</param-name>
> >             <param-value>ADOMAIN</param-value>
> >         </init-param>
> >         <init-param>
> >             <param-name>jcifs.netbios.wins</param-name>
> >             <param-value>192.168.1.32</param-value>
> >         </init-param>
> >     </servlet>
> >     <servlet-mapping>
> >         <servlet-name>NetworkExplorer</servlet-name>
> >         <url-pattern>/NetworkExplorer/*</url-pattern>
> >     </servlet-mapping>
> > </web-app>
> > 


-- 
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