[jcifs] NTML and dynamic domain controller

shibaram dunumania at yahoo.co.in
Mon Jan 5 23:40:04 GMT 2009


I am facing the same problem too using infact using jcifs-1.3.1.jar  also.
I have tried all the ways.. Setting the System property

  as  
-Djcifs.properties=C:\Workspace\JCIFS\WebContent\WEB-INF\opt\jcifs.properties

in the tomcat (version 6) command line system proerty setup fileds. (By
setting under Java options: by editing the "Java" tab running "tomcat6w.exe" 
file existing under  <TOMCAT_HOME>/bin/  ) 

Tried also creating a own Filter class extending from NtlmHttpFilter as
below code:

public class NtlmCustomisedHttpFilter extends NtlmHttpFilter {

	 public void init( FilterConfig filterConfig ) throws ServletException {
		  
		 super.init(filterConfig);
		 Config.setProperty( "jcifs.smb.lmCompatibility", "3" );
		 String propFile = filterConfig.getInitParameter("jcifs.properties");
		 System.setProperty( "jcifs.properties", propFile );
//		 Config.setProperty("jcifs.properties", propFile);
    }
}

and used this Filter and passed the fully absolute path
(C:\Workspace\JCIFS\WebContent\WEB-INF\opt\jcifs.properties) of the property
file to the init-param in the filter.

But either setting the jcifs.properties  from the Filter class or in the
Tomcat System property setup config.
Both does not work..
I am still getting the error as below:

jcifs.smb.SmbException: A domain was not specified
	at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:90)
	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:157)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:121)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
	at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
	at java.lang.Thread.run(Thread.java:595)



Any help, appreciated.

Thanks
Shibaram


		  

Christensen, Scott M wrote:
> 
> Extend the NTLM filter to read the property from the System properties
> and store it in the jcifs.http.domainController jCIFS property (I think
> the jcifs.Config object will let you do this).  The NTLM filter is
> really just an example of how to use jCIFS, not a hard and steadfast
> rule.
> 
> Thanks,
> Scott
> 
> -----Original Message-----
> From: jcifs-bounces+schrist1=amfam.com at lists.samba.org
> [mailto:jcifs-bounces+schrist1=amfam.com at lists.samba.org] On Behalf Of
> eliboni at gmail.com
> Sent: Sunday, August 26, 2007 12:50 PM
> To: jcifs at lists.samba.org
> Subject: [jcifs] NTML and dynamic domain controller
> 
> Hi,
>  I've been looking through the mailing list and tried this for 
> days... pls. help!
> 
> I'd need NTML authentication in a web application, 
> but I do not want to specify any static IP address or domain name in 
> the web.xml: I would like to store jcifs.http.domainController value in 
> a props file, set the value via System.setProperties() when the web 
> application fires up (i.e. setting it from a servlet that is invoked at 
> startup). 
> 
> But it does not work, the filter is complaining about:
> jcifs.smb.SmbException: A domain was not specified
> if the jcifs.http.
> domainController params is not in the web.xml.
> While if I specify it in 
> the web.xml I can't override the value...
> 
> I'm using jcifs 1.2.17
> 
> Any 
> idea?
> 
> Thanks in advance,
> Enrico
> 
> 

-- 
View this message in context: http://www.nabble.com/NTML-and-dynamic-domain-controller-tp12336807p21301542.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.



More information about the jcifs mailing list