[jcifs] Re: Help with inital setup of jcifs

Tim Love tim.love at fnf.com
Fri May 26 13:57:59 GMT 2006


 <Steven_Chen <at> computerhorizons.com> writes:

> 
> 
> Hey Tim
> Do u use NTLMFilter? What's your config?
> Steven


I have tried both configuration found in the install-setup guide but
 can’t get either to work with just using an intranet address.

One other thing I don’t know if it matters or not, but the domain I 
am using is a local domain meaning it is like "mydoamin" 
not "mydoamin.com"

Also in the log I see the following line
	treeConnect: unc=\\<removed domain>\IPC$,service=?????
That unc path is incorrect.  
There is no server with the name of our domain.

This is my current configuration.
	<filter>
	    <filter-name>NtlmHttpFilter</filter-name>
    	<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
	    <init-param>
        	<param-name>jcifs.netbios.wins</param-name>
    	    <param-value>10.250.129.18,10.250.129.19</param-value>
	    </init-param>
    	<init-param>
	        <param-name>jcifs.smb.client.domain</param-name>
        	<param-value>*mydomain*</param-value>
    	</init-param>
    	 
	    <init-param>
        	<param-name>jcifs.smb.client.username</param-name>
    	    <param-value>*LDAP-Uid*</param-value>
	    </init-param>
	    <init-param>
    	    <param-name>jcifs.smb.client.password</param-name>
        	<param-value>*LDAP-Pwd*</param-value>
    	</init-param>
    	<init-param>
    		<param-name>jcifs.util.loglevel</param-name>
    		<param-value>3</param-value>
    	</init-param>
	</filter>

	<filter-mapping>
    	<filter-name>NtlmHttpFilter</filter-name>
    	<url-pattern>/*</url-pattern>
	</filter-mapping>

This is the log file from the start of the server 
to the error occurring.

launching Jetty webapp: / on address: localhost:80 using dir: 
	[C:\Documents and Settings\tim.love\workspace-web\SIMON\WebContent] 
17:13:23.375 INFO[main] org.mortbay.log.LogImpl.add(LogImpl.java:109)
	 >16> added org.mortbay.log.OutputStreamLogSink at fb56b1
17:13:23.328 INFO[main] org.mortbay.log.LogImpl.reset
		(LogImpl.java:228) >11> reset
17:13:23.375 INFO[main] org.mortbay.log.LogImpl.add(LogImpl.java:109)
 >11> added org.mortbay.log.OutputStreamLogSink at e32802
May 25, 2006 5:13:23 PM org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.11RC0
May 25, 2006 5:13:23 PM org.mortbay.util.FileResource <clinit>
INFO: Checking Resource aliases
May 25, 2006 5:13:23 PM org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.servlet.WebApplicationHandler at 8ff4cf
#JCIFS PROPERTIES
#Thu May 25 17:13:23 EDT 2006
jcifs.smb.client.password=J3G0d\:16
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition 
	sun.boot.library.path=C\:\\Program Files\\Java\\jre1.5.0_06\\bin
java.vm.version=1.5.0_06-b05
jcifs.smb.client.username=<removed Uid from config file> 
	java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http\://java.sun.com/
path.separator=;
jcifs.netbios.cachePolicy=1200
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.country=US
sun.os.patch.level=Service Pack 2
java.vm.specification.name=Java Virtual Machine Specification 
		user.dir=C:\Documents and Settings\tim.love\workspace-web\SIMON
java.runtime.version=1.5.0_06-b05
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files\Java\jre1.5.0_06\lib\endorsed
os.arch=x86
java.io.tmpdir=C\:\\DOCUME~1\\TIM~1.LOV\\LOCALS~1\\Temp\\
line.separator=\r\n
java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows XP
org.apache.commons.logging.LogFactory=org.mortbay.log.Factory
sun.jnu.encoding=Cp1252
java.library.path=C\:\\Program Files\\Java\\jre1.5.0_06\\bin;.;
		C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;
		C:\WINDOWS;C\:\\WINDOWS\\system32\\WBEM;C\:\\ibmdebug\\bin;
		C:\WDSC;C\:\\PROGRA~1\\IBM\\CLIENT~1;
		C\:\\PROGRA~1\\IBM\\CLIENT~1\\Shared;
		C\:\\PROGRA~1\\IBM\\CLIENT~1\\Emulator;
		C\:\\Program Files\\QuickTime\\QTSystem\\;
		C\:\\Program Files\\Microsoft SQL Server\\80\\Tools\\BINN;
		C\:\\Program Files\\IDM Computer Solutions\\UltraEdit-32;
		C\:\\Program\\CvsntClient
java.specification.name=Java Platform API Specification 
	java.class.version=49.0 
	jetty.home=C:\jetty sun.management.compiler=HotSpot Client Compiler
os.version=5.1
org.mortbay.xml.XmlParser.NotValidating=true
user.home=C\:\\Documents and Settings\\tim.love 
	user.timezone=America/New_York 
	java.awt.printerjob=sun.awt.windows.WPrinterJob
jcifs.smb.client.soTimeout=300000
file.encoding=Cp1252
java.specification.version=1.5
jcifs.util.loglevel=3
user.name=Tim.Love
java.class.path=C:\jetty\ext\ant.jar;C:\jetty\ext\commons-el.jar;
	C:\jetty\ext\commons-logging.jar;C:\jetty\ext\jasper-compiler.jar;
	C:\jetty\ext\jasper-runtime.jar;C:\jetty\ext\mx4j-remote.jar;
	C\:\\jetty\\ext\\mx4j-tools.jar;C\:\\jetty\\ext\\mx4j.jar;
	C\:\\jetty\\ext\\xercesImpl.jar;C\:\\jetty\\ext\\xml-apis.jar;
	C:\jetty\ext\xmlParserAPIs.jar;C:\jetty\lib\org.mortbay.jetty.jar;
	C\:\\jetty\\lib\\javax.servlet.jar;
	C:\eclipse\plugins\com.iw.plugins.jettylauncher_1.3.0\runner.jar;
	C:\Documents and Settings\tim.love\
			workspace-web\SIMON\WebContent\WEB-INF\classes
java.vm.specification.version=1.0
sun.arch.data.model=32
java.home=C:\Program Files\Java\jre1.5.0_06 
	java.specification.vendor=Sun Microsystems Inc.
user.language=en
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.5.0_06
java.ext.dirs=C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\ext
sun.boot.class.path=C:\Program Files\Java\jre1.5.0_06\lib\rt.jar;
	C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\i18n.jar;
	C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\sunrsasign.jar;
	C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\jsse.jar;
	C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\jce.jar;
	C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\charsets.jar;
	C:\Program Files\Java\jre1.5.0_06\classes java.vendor=Sun Micros...
file.separator=\\
jcifs.smb.client.domain=<removed domain from config file> 
	java.vendor.url.bug=http\://java.sun.com/cgi-bin/bugreport.cgi
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
jcifs.netbios.wins=10.250.129.18,10.250.129.19
sun.desktop=windows
sun.cpu.isalist=
May 25, 2006 5:13:24 PM org.mortbay.util.Container start
INFO: Started WebApplicationContext[/,SIMON] May 25, 2006 5:13:24 PM 
	org.mortbay.http.SocketListener start
INFO: Started SocketListener on 127.0.0.1:80 May 25, 2006 5:13:24 PM 
	org.mortbay.util.Container start
INFO: Started org.mortbay.jetty.Server at 3820e New data read: 
	Transport1[<removed domain from config file><1C>/10.250.129.28:0]
00000: FF 53 4D 42 72 00 00 00 00 98 03 C0 00 00 00 00  
	|ÿSMBr......À....|
00010: 00 00 00 00 00 00 00 00 00 00 72 E2 00 00 01 00  
	|..........râ....|

byteCount=56 but readBytesWireFormat returned 26
treeConnect: unc=\\<removed domain>\IPC$,service=?????
May 25, 2006 5:13: PM org.mortbay.jetty.servlet.ServletHandler handle
SEVERE: /Driver: 
java.lang.NullPointerException
	at jcifs.smb.SmbComSessionSetupAndX.writeParameterWordsWireFormat
		(SmbComSessionSetupAndX.java:58)
	at jcifs.smb.AndXServerMessageBlock.writeAndXWireFormat
		(AndXServerMessageBlock.java:95)
	at jcifs.smb.AndXServerMessageBlock.encode
		(AndXServerMessageBlock.java:65)
	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.SmbSession.interrogate(SmbSession.java:82)
	at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:111)
	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
	at org.mortbay.jetty.servlet.
		WebApplicationHandler$CachedChain.doFilter
			(WebApplicationHandler.java:821)
	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
		(WebApplicationHandler.java:471)
	at org.mortbay.jetty.servlet.ServletHandler.handle
		(ServletHandler.java:568)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
	at org.mortbay.jetty.servlet.WebApplicationContext.handle
		(WebApplicationContext.java:633)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
	at org.mortbay.http.HttpConnection.handleNext
		(HttpConnection.java:986)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
	at org.mortbay.http.SocketListener.handleConnection
		(SocketListener.java:245)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
java.net.SocketTimeoutException: Receive timed out
	at java.net.PlainDatagramSocketImpl.receive0(Native Method)
	at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
	at java.net.DatagramSocket.receive(Unknown Source)
	at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
	at java.lang.Thread.run(Unknown Source)
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(Unknown Source)
	at jcifs.util.transport.Transport.readn(Transport.java:29)
	at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:351)
	at jcifs.util.transport.Transport.loop(Transport.java:100)
	at jcifs.util.transport.Transport.run(Transport.java:248)
	at java.lang.Thread.run(Unknown Source)


Thanks for your help.




More information about the jcifs mailing list