[jcifs] help

Ravi Thota thotara at FusionTech.Com
Tue Nov 15 12:13:35 GMT 2005


Hi,

	I am new to this, can you provide me the basic concepts like how
it work with examples.

Thanks & Regards,

  Ravi Thota


-----Original Message-----
From: jcifs-request at lists.samba.org
[mailto:jcifs-request at lists.samba.org] 
Sent: Tuesday, November 15, 2005 5:30 PM
To: jcifs at lists.samba.org
Subject: jcifs Digest, Vol 35, Issue 11

Send jcifs mailing list submissions to
	jcifs at lists.samba.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.samba.org/mailman/listinfo/jcifs
or, via email, send a message with subject or body 'help' to
	jcifs-request at lists.samba.org

You can reach the person managing the list at
	jcifs-owner at lists.samba.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of jcifs digest..."


Today's Topics:

   1. Logging (Maxim Gordienko)
   2. Re: Logging (Christopher R. Hertel)
   3. Re: Logging (Michael B Allen)
   4. Connection timeout, then the transport stays "in error" (Tom Shaw)
   5. Re: Logging (Maxim Gordienko)
   6. Re: Logging (Maxim Gordienko)


----------------------------------------------------------------------

Message: 1
Date: Mon, 14 Nov 2005 16:38:16 +0300
From: Maxim Gordienko <mgordienko at gmail.com>
Subject: [jcifs] Logging
To: jcifs at lists.samba.org
Message-ID:
	<96c268400511140538o56c3c78ey2b6cc24ecafe3b41 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello!

Why there is not standard logging infrastructure in JCIFS?
Some classes uses custom LogStream, others -- System.out.println.
Why not to use log4 or commons-logging?
I can implement JCIFS logging using commons-logging if you interested.

Thank you!

Maxim


------------------------------

Message: 2
Date: Mon, 14 Nov 2005 16:50:43 -0600
From: "Christopher R. Hertel" <crh at ubiqx.mn.org>
Subject: Re: [jcifs] Logging
To: Maxim Gordienko <mgordienko at gmail.com>
Cc: jcifs at lists.samba.org
Message-ID: <20051114225043.GK22209 at Favog.ubiqx.mn.org>
Content-Type: text/plain; charset=us-ascii

Maxim,

Mike has sent out invitations for more folks to hack at the jCIFS code,
so 
if you have something you want to contribute just send in a patch for 
review.

As a general rule, it's better not to be reliant on something outside of

the normal Java SDK, but commons-logging looks as though it may be 
workable.

Mike?  Thoughts?

Chris -)-----

On Mon, Nov 14, 2005 at 04:38:16PM +0300, Maxim Gordienko wrote:
> Hello!
> 
> Why there is not standard logging infrastructure in JCIFS?
> Some classes uses custom LogStream, others -- System.out.println.
> Why not to use log4 or commons-logging?
> I can implement JCIFS logging using commons-logging if you interested.
> 
> Thank you!
> 
> Maxim
> 

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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


------------------------------

Message: 3
Date: Mon, 14 Nov 2005 20:24:58 -0500
From: Michael B Allen <mba2000 at ioplex.com>
Subject: Re: [jcifs] Logging
To: "Christopher R. Hertel" <crh at ubiqx.mn.org>
Cc: jcifs at lists.samba.org
Message-ID: <20051114202458.7e82ae06.mba2000 at ioplex.com>
Content-Type: text/plain; charset=US-ASCII

On Mon, 14 Nov 2005 16:50:43 -0600
"Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:

> Maxim,
> 
> Mike has sent out invitations for more folks to hack at the jCIFS
code, so 
> if you have something you want to contribute just send in a patch for 
> review.
> 
> As a general rule, it's better not to be reliant on something outside
of 
> the normal Java SDK, but commons-logging looks as though it may be 
> workable.
> 
> Mike?  Thoughts?

Logging is fine just the way it is I think. Also, we're largely in
maintainence mode for the indefinite future. If someone finds a bug then
by all means report it of course.

Mike


------------------------------

Message: 4
Date: Tue, 15 Nov 2005 15:19:53 +0800
From: Tom Shaw <tomisfaraway at gmail.com>
Subject: [jcifs] Connection timeout, then the transport stays "in
	error"
To: jcifs at lists.samba.org
Message-ID:
	<ca770bba0511142319q6f379176r1dbf04a41209f958 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi folks

We've been running into a problem with jCIFS where a connect() times
out, and then every subsequent attempt to connect to that particular
server fails.

Our application is trying to call listFiles() on a SmbFile directory.

It's possible that the initial exception is reasonable, because we
only find it happening to one of our servers which is 1000km away, so
packet loss may be occurring. The main problem though is that once the
initial error has occured, jCIFS can't recover from the situation.

The initial exception is:
jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Transport2 timedout waiting
for response to
SmbComSessionSetupAndX[command=SMB_COM_SESSION_SETUP_ANDX,received=false
,errorCode=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=0,pid=28490,uid=0,
mid=920,wordCount=13,byteCount=95,andxCommand=0x75,andxOffset=156,snd_bu
f_size=16644,maxMpxCount=10,VC_NUMBER=1,sessionKey=0,passwordLength=24,u
nicodePasswordLength=24,capabilities=84,accountName=20013059,primaryDoma
in=?,NATIVE_OS=SunOS,NATIVE_LANMAN=jCIFS]
        at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
        at jcifs.smb.SmbTransport.send(SmbTransport.java:580)
        at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:264)
        at jcifs.smb.SmbSession.send(SmbSession.java:223)
        at jcifs.smb.SmbTree.treeConnect(SmbTree.java:144)
        at jcifs.smb.SmbFile.connect(SmbFile.java:792)
        at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
        at jcifs.smb.SmbFile.send(SmbFile.java:660)
        at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1684)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1575)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1539)
...


Then whenever the application attempts to talk to that server again,
we get this exception. As far as I can tell, the exception means "this
transport is in error, and this is what caused it (Connection
timeout)":

jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Connection in error
jcifs.util.transport.TransportException: Connection timeout
        at jcifs.util.transport.Transport.connect(Transport.java:175)
        at jcifs.smb.SmbTransport.connect(SmbTransport.java:271)
        at jcifs.smb.SmbTree.treeConnect(SmbTree.java:129)
        at jcifs.smb.SmbFile.connect(SmbFile.java:792)
        at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
        at jcifs.smb.SmbFile.send(SmbFile.java:660)
        at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1684)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1575)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1539)
...
        at jcifs.util.transport.Transport.connect(Transport.java:155)
        at jcifs.smb.SmbTransport.connect(SmbTransport.java:271)
        at jcifs.smb.SmbTree.treeConnect(SmbTree.java:129)
        at jcifs.smb.SmbFile.connect(SmbFile.java:792)
        at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
        at jcifs.smb.SmbFile.send(SmbFile.java:660)
        at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1684)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1575)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1539)
...
        at jcifs.smb.SmbTransport.connect(SmbTransport.java:273)
        at jcifs.smb.SmbTree.treeConnect(SmbTree.java:129)
        at jcifs.smb.SmbFile.connect(SmbFile.java:792)
        at jcifs.smb.SmbFile.connect0(SmbFile.java:762)
        at jcifs.smb.SmbFile.send(SmbFile.java:660)
        at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1684)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1575)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1539)

So is this a jCIFS bug or should our application be somehow detecting
the error and closing/resetting the transport when there's an error in
connecting?

Regards
Tom Shaw


------------------------------

Message: 5
Date: Tue, 15 Nov 2005 12:49:11 +0300
From: Maxim Gordienko <mgordienko at gmail.com>
Subject: Re: [jcifs] Logging
To: "Christopher R. Hertel" <crh at ubiqx.mn.org>
Cc: jcifs at lists.samba.org
Message-ID:
	<96c268400511150149m3bc13c4p94f3312c9ffb046b at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Ok, if you want to stay with JSDK api only there is logging facility
in jsdk 1.4.
Is JCIFS compatible with jsdk 1.2 and 1.3? If not, logging via 1.4
loggers do not introduce new dependency.

On 11/15/05, Christopher R. Hertel <crh at ubiqx.mn.org> wrote:
> Maxim,
>
> Mike has sent out invitations for more folks to hack at the jCIFS
code, so
> if you have something you want to contribute just send in a patch for
> review.
>
> As a general rule, it's better not to be reliant on something outside
of
> the normal Java SDK, but commons-logging looks as though it may be
> workable.
>
> Mike?  Thoughts?
>
> Chris -)-----
>
>
> --
> "Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
> 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
>


------------------------------

Message: 6
Date: Tue, 15 Nov 2005 12:50:07 +0300
From: Maxim Gordienko <mgordienko at gmail.com>
Subject: Re: [jcifs] Logging
To: jcifs at lists.samba.org
Message-ID:
	<96c268400511150150r19a1c710l30dae64e62b6bfba at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello, Mike!
Excuse me for my insolent opinion, but current logging is not fine.
Transport1 floods log with messages with no way to silence it,
System.out.println is used.
Besides, using custom LogStream force developer to decide log or not
some event, instead of delegating this decision to log system.

On 11/15/05, Michael B Allen <mba2000 at ioplex.com> wrote:
> On Mon, 14 Nov 2005 16:50:43 -0600
> "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
>
>
> Logging is fine just the way it is I think. Also, we're largely in
> maintainence mode for the indefinite future. If someone finds a bug
then
> by all means report it of course.
>
> Mike
>


------------------------------

_______________________________________________
jcifs mailing list
jcifs at lists.samba.org
https://lists.samba.org/mailman/listinfo/jcifs


End of jcifs Digest, Vol 35, Issue 11
*************************************


More information about the jcifs mailing list