[jcifs] JCIFS error, Oracle VM Issue, or Novell Again?

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed Jul 24 08:42:49 EST 2002


Thanks. Sending to the list for future reference...

> -----Original Message-----
> From:	Michael Dunston [SMTP:michael.dunston at oracle.com]
> Sent:	Tuesday, July 23, 2002 1:52 PM
> To:	Allen, Michael B (RSCH); 'Benjamin Farr'
> Subject:	RE: [jcifs] JCIFS error, Oracle VM Issue, or Novell Again?
> 
> Unfortunately I do not know of any work around except to run the service
> which is providing smb support except to use hotspot (or other).
> 
> I have been working with the JDeveloper OJVM (currently only available on
> windows) to track down issues under OJVM and have a working version on
> windows.  However, the other platforms can not be addressed by my group.  It
> is advised to post a complete stack trace to otn.oracle.com and also if
> possible log a bug for the JVM team who works on the DB and/or OC4J.
> 
> Mike
> 
> > -----Original Message-----
> > From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> > Sent: Monday, July 22, 2002 6:28 PM
> > To: 'Benjamin Farr'; 'michael.dunston at oracle.com'
> > Subject: RE: [jcifs] JCIFS error, Oracle VM Issue, or Novell Again?
> >
> >
> > Michael,
> >
> > Do you have an official workaround for Ben? Will you be issuing a
> > patch for your
> > VM anytime soon? If it's not too intrusive, perhaps we can add a
> > patch to jCIFS
> > to bypass this little problem until a more satisfactory solution
> > is in place.
> >
> > > -----Original Message-----
> > > From:	Benjamin Farr [SMTP:Benjamin.Farr at mim.com.au]
> > > Sent:	Monday, July 22, 2002 9:23 PM
> > > To:	'Allen, Michael B (RSCH)'
> > > Subject:	RE: [jcifs] JCIFS error, Oracle VM Issue, or Novell Again?
> > >
> > > Michael,
> > >
> > > Thanks, it was Oracles JVM, it worked fine on Suns.
> > >
> > > Regards
> > >
> > > Ben
> > >
> > > -----Original Message-----
> > > From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> > > Sent: Tuesday, 23 July 2002 11:11
> > > To: 'Benjamin Farr'
> > > Cc: 'jcifs at samba.org'
> > > Subject: RE: [jcifs] JCIFS error, Oracle VM Issue, or Novell Again?
> > >
> > >
> > > 1) Try your code against NT 4 if you can just to rule out a client side
> > > issue.
> > > 2) Try the latest version of jCIFS if you are not already. We
> > just fixed an
> > > issue with Novell.
> > > 5) Try Suns JRE. You're using Oracle's VM which is known to
> > have an issue
> > > with jCIFS:
> > >
> > >   http://lists.samba.org/pipermail/jcifs/2002-May/002192.html
> > >
> > > This should determine if the issue is with Oracle's VM, Novell
> > server, or
> > > jCIFS. The socket is
> > > just being blatantly closed after that write, thus the
> > "Unexpected EOF". The
> > > VM SocketImpl
> > > could be choking on the larger write or Novell might be dying
> > on an error
> > > it's not equipped to
> > > respond to.
> > >
> > > > -----Original Message-----
> > > > From:	Benjamin Farr [SMTP:Benjamin.Farr at mim.com.au]
> > > > Sent:	Monday, July 22, 2002 12:15 AM
> > > > To:	'Allen, Michael B (RSCH)'
> > > > Subject:	RE: [jcifs] JCIFS error
> > > >
> > > > Michael,
> > > >
> > > > I tried the exist program and it ran fine. I then adapted it
> > upload a file
> > > > as I
> > > > was with my code. Below is the output. This resulted in t.jpg on the
> > > server
> > > > with a
> > > > size of 1 write (1kb).
> > > >
> > > > The exists file I changed is below.
> > > > /* examples for the jcifs smb client library in Java
> > > >  * Copyright (C) 2000  "Michael B. Allen" <jcifs at samba dot org>
> > > >  *
> > > >  * This program is free software; you can redistribute it
> > and/or modify
> > > >  * it under the terms of the GNU General Public License as
> > published by
> > > >  * the Free Software Foundation; either version 2 of the License, or
> > > >  * (at your option) any later version.
> > > >  *
> > > >  * This program is distributed in the hope that it will be useful,
> > > >  * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > >  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > >  * GNU General Public License for more details.
> > > >  *
> > > >  * You should have received a copy of the GNU General Public License
> > > >  * along with this program; if not, write to the Free Software
> > > >  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> > > >  */
> > > >
> > > > import java.io.*;
> > > > import java.util.*;
> > > >
> > > > import jcifs.smb.SmbFileOutputStream;
> > > > import jcifs.smb.SmbFile;
> > > >
> > > > public class Exists {
> > > >     static Properties mProps;
> > > >     public Exists() {
> > > >      System.setProperty("jcifs.properties","C:\\myjcifs.properties");
> > > >
> > > >     }
> > > >     public static void main( String argv[] ) throws Exception {
> > > >         Exists e = new Exists();
> > > >         SmbFile f = new
> > > >
> > SmbFile("smb://meo:meo123@dev.holdings.mim.com.au/exe/HRPhotos/t.jpg" );
> > > >         if( f.exists() ) {
> > > >             System.out.println( argv[0] + " exists" );
> > > >         } else {
> > > >             System.out.println( argv[0] + " does not exist" );
> > > >         }
> > > >         SmbFileOutputStream smbOut = new  SmbFileOutputStream(f);
> > > >         File ifile = new File("C:\\t.jpg");
> > > >         FileInputStream in = new FileInputStream(ifile);
> > > >         byte[] b = new byte[1024];
> > > >         int n;
> > > >         while(( n = in.read( b )) > 0 ) {
> > > >          System.out.println(n + " bytes read this time");
> > > >          try {
> > > >               smbOut.write(b, 0, n );
> > > >          }
> > > >          catch (Exception ne) {
> > > >             System.out.println("A : " + ne.getMessage());
> > > >               ne.printStackTrace();
> > > >
> > > >          }
> > > >        }
> > > >        in.close();
> > > >     }
> > > > }
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> > > > Sent: Monday, 22 July 2002 12:44
> > > > To: 'Benjamin Farr'; 'jcifs at samba.org'
> > > > Subject: RE: [jcifs] JCIFS error
> > > >
> > > >
> > > > 1) Try your code against NT 4 if you can just to rule out a
> > client side
> > > > issue.
> > > > 2) Try the latest version of jCIFS if you are not already. We
> > just fixed
> > > an
> > > > issue with Novell.
> > > > 3) Try the examples/Exists.java program just to rule out an
> > issue specific
> > > > to your code.
> > > > 4) Send me output of java -Dlog=ALL Exists
> > smb://me@novel.server/foo....
> > > If
> > > > this doesn't
> > > > fail then send me -Dlog=ALL of something that does (also,
> > send it as an
> > > > attachment).
> > > >
> > > > > -----Original Message-----
> > > > > From:	Benjamin Farr [SMTP:Benjamin.Farr at mim.com.au]
> > > > > Sent:	Sunday, July 21, 2002 10:28 PM
> > > > > To:	'Allen, Michael B (RSCH)'; 'jcifs at samba.org'
> > > > > Subject:	RE: [jcifs] JCIFS error
> > > > >
> > > > > Michael,
> > > > >
> > > > > I setup a properties file and that is working fine. I removed the
> > > timeout
> > > > > settings.
> > > > >
> > > > >
> > > > > I believe the server is Novell.
> > > > >
> > > > > The file does get created on the server but has an exception with
> > > > > f.exists();
> > > > >
> > > > > This is the exeption output of checking for f.exists();
> > > > >
> > > > > S : Timeout waiting for response from server.
> > > > > dev.holdings.mim.com.au/158.54.111.195 Jul 22 12:19:10.211
> > - exception
> > > > > reading from socket input java.net.SocketException: Descriptor not a
> > > > socket:
> > > > > JVM_recv in socket input stream read 	int
> > > > > java.net.SocketInputStream.socketRead(byte[], int, int) 	int
> > > > > java.net.SocketInputStream.read(byte[], int, int) 	int
> > > > >
> > jcifs.netbios.SessionServicePacket.readPacketType(java.io.InputStream,
> > > > > byte[], int) 	int jcifs.netbios.SocketInputStream.read(byte[],
> > > int, int)
> > > > > int jcifs.netbios.SocketInputStream.read() 	int
> > > > > java.io.FilterInputStream.read() 	int
> > > > > java.io.PushbackInputStream.read() 	void
> > jcifs.smb.SmbTransport.run()
> > > > > void java.lang.Thread.run() jcifs.smb.SmbException: Timeout
> > waiting for
> > > > > response from server. dev.holdings.mim.com.au/158.54.111.195 	void
> > > > > jcifs.smb.SmbTransport.sendTransaction(jcifs.smb.SmbComTransaction,
> > > > > jcifs.smb.SmbComTransactionResponse) 	void
> > > > > jcifs.smb.SmbSession.sendTransaction(jcifs.smb.SmbComTransaction,
> > > > > jcifs.smb.SmbComTransactionResponse) 	void
> > > > > jcifs.smb.SmbTree.sendTransaction(jcifs.smb.SmbComTransaction,
> > > > > jcifs.smb.SmbComTransactionResponse) 	void
> > > > > jcifs.smb.SmbFile.sendTransaction(jcifs.smb.SmbComTransaction,
> > > > > jcifs.smb.SmbComTransactionResponse) 	jcifs.smb.Info
> > > > > jcifs.smb.SmbFile.queryPath(int) 	boolean
> > jcifs.smb.SmbFile.exists()
> > > > > void com.mim.mimsj.hr.HREmpPhotos.createFile(java.io.InputStream,
> > > > > java.lang.String, java.lang.String, java.lang.String,
> > java.lang.String,
> > > > > java.lang.String) 	java.lang.String
> > > > >
> > > >
> > >
> > com.mim.mimsj.hr.HREmpPhotos.uploadFile(javax.servlet.http.HttpSer
> > vletReques
> > > > > t) 	void
> > _HREmpPhoto3._jspService(javax.servlet.http.HttpServletRequest,
> > > > > javax.servlet.http.HttpServletResponse) 	void
> > > > > oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
> > > > > javax.servlet.ServletResponse) 	void
> > > > >
> > > >
> > >
> > oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpS
> > ervletRequ
> > > > > est, javax.servlet.http.HttpServletResponse, java.lang.String) 	void
> > > > >
> > > >
> > >
> > oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http
> > .HttpServl
> > > > > etRequest, javax.servlet.http.HttpServletResponse) 	void
> > > > >
> > > >
> > >
> > oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpSer
> > vletReques
> > > > > t, javax.servlet.http.HttpServletResponse) 	void
> > > > > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> > > > > javax.servlet.ServletResponse) 	void
> > > > >
> > > >
> > >
> > com.evermind.server.http.ServletRequestDispatcher.invoke(javax.ser
> > vlet.Servl
> > > > > etRequest, javax.servlet.ServletResponse) 	void
> > > > >
> > > >
> > >
> > com.evermind.server.http.ServletRequestDispatcher.forwardInternal(
> > javax.serv
> > > > > let.ServletRequest, javax.servlet.http.HttpServletResponse)
> > > boolean
> > > > >
> > > >
> > >
> > com.evermind.server.http.HttpRequestHandler.processRequest(com.eve
> > rmind.serv
> > > > > er.ApplicationServerThread,
> > > > > com.evermind.server.http.EvermindHttpServletRequest,
> > > > > com.evermind.server.http.EvermindHttpServletResponse,
> > > java.io.InputStream,
> > > > > java.io.OutputStream, boolean) 	void
> > > > >
> > com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread) 	void
> > > > > com.evermind.util.ThreadPoolThread.run()
> > > > >
> > > > >
> > > > >
> > > > > // Function
> > > > > public static void createFile(InputStream aSrc,String aHost,String
> > > > > aUserName,String aPassword,String aPath,String aFilename) throws
> > > > > MimException{
> > > > >     SmbFileOutputStream smbOut = null;
> > > > >
> > > > >     try {
> > > > >       SmbFile f = new SmbFile("smb://"+aUserName+":" + aPassword +
> > > > > "@"+aHost+aPath+ "/" +aFilename);
> > > > >       smbOut = new  SmbFileOutputStream(f);
> > > > >        try {
> > > > >           if( f.exists()) {
> > > > >           }
> > > > >           else {
> > > > >           }
> > > > >          }
> > > > >          catch(Exception e){
> > > > >            System.out.println("S : " + e.getMessage());
> > > > >            e.printStackTrace();
> > > > >            throw new MimException(e);
> > > > >          }
> > > > >       byte[] b = new byte[1024];
> > > > >       int n;
> > > > >       while(( n = aSrc.read( b )) > 0 ) {
> > > > >          System.out.println(n + " bytes read this time");
> > > > >          try {
> > > > >               smbOut.write(b, 0, n );
> > > > >          }
> > > > >          catch (Exception e) {
> > > > >             System.out.println("A : " + e.getMessage());
> > > > >               e.printStackTrace();
> > > > >
> > > > >          }
> > > > >       }
> > > > >       smbOut.close();
> > > > >     }
> > > > >     catch(Exception e) {
> > > > >       throw new MimException(e);
> > > > >     }
> > > > >   }
> > > > >
> > > > > -----Original Message-----
> > > > > From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> > > > > Sent: Monday, 22 July 2002 11:15
> > > > > To: 'Benjamin Farr'; 'jcifs at samba.org'
> > > > > Subject: RE: [jcifs] JCIFS error
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From:	Benjamin Farr [SMTP:Benjamin.Farr at mim.com.au]
> > > > > >
> > > > > >
> > > > > >     try {
> > > > > >
> > > > > >       /*
> > > > > >       if( f.exists()) {
> > > > > 	[Allen, Michael B (RSCH)]
> > > > >
> > > > > 	If you test f.exists(), that will result in an
> > additional network
> > > > > message. If you want to delete the file just call try { f.delete() }
> > > > catch(
> > > > > SmbException se ) { // do nothing }.
> > > > >
> > > > > >         // should delete it ????
> > > > > >       } else {
> > > > > >
> > > > > >       }    */
> > > > > >     }catch(Exception e){
> > > > > >       throw new MimException(e);
> > > > > >     }
> > > > > >     try {
> > > > > >
> > > > > >       System.setProperty( "jcifs.smb.client.username", "meo" );
> > > > > >       System.setProperty( "jcifs.smb.client.password", "meo123" );
> > > > > >       System.setProperty( "jcifs.smb.client.domain", "mimh" );
> > > > > >       System.setProperty(
> > "jcifs.smb.client.responseTimeout", "50000"
> > > );
> > > > > >       System.setProperty( "jcifs.smb.client.soTimeout", "50000" );
> > > > > >       System.setProperty( "jcifs.netbios.soTimeout", "15000" );
> > > > > >
> > > > > 	[Allen, Michael B (RSCH)]  You cannot set
> > properties like this. Read
> > > > > the
> > > > > 	javadoc page on Setting Client Properties. In short
> > you cannot set
> > > > > properties after
> > > > > 	you have referenced Smb* classes. It would be best
> > if you used a
> > > > > properties file and
> > > > > 	specified it's location *before* referencing any
> > jcifs classes like:
> > > > >
> > > > > 	  System.setProperty( "jcifs.properties", "myjcifs.prp" );
> > > > > 	  SmbFile f = new SmbF...
> > > > >
> > > > > 	Technically the above might work but not always so
> > the general rule
> > > > > is don't do it. As for
> > > > > 	the Exception, that might mean jCIFS is
> > incompatible with the
> > > > > server. What type of server
> > > > > 	is it? Is it NetApp? Novell? Jim's Smb Server 2.0?
> > > > >
> > > > > 	Also, you shouldn't have to mess with
> > responseTimeout or soTimeout.
> > > > > If it takes longer
> > > > > 	than 2 seconds for the client to do it's thing
> > there's something
> > > > > wrong.
> > > > >
> > > > > 	Fix that and let us know if the problem persists.
> > > > >
> > > > > 	Mike
> > > > >
> > > > >
> > > > >
> > **********************************************************************
> > > > > The information contained in this e-mail is confidential and is
> > > > > intended only for the use of the addressee(s).
> > > > > If you receive this e-mail in error, any use, distribution or
> > > > > copying of this e-mail is not permitted. You are requested to
> > > > > forward unwanted e-mail and address any problems to the
> > > > > MIM Holdings Limited Support Centre.
> > > > >
> > > > > For general enquires:	++61 7 3833 8000
> > > > > Support Centre e-mail:	supportcentre at mim.com.au
> > > > > Support Centre phone:  	Australia 1800500646
> > > > >         				International ++61
> > 7 38338042
> > > > >
> > **********************************************************************
> > > > >
> > > >  << File: t.txt >>
> >
> >
> 





More information about the jcifs mailing list