Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 84419 invoked from network); 3 May 2004 21:35:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 May 2004 21:35:56 -0000 Received: (qmail 63551 invoked by uid 500); 3 May 2004 21:35:38 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 63536 invoked by uid 500); 3 May 2004 21:35:38 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 63515 invoked from network); 3 May 2004 21:35:37 -0000 Received: from unknown (HELO verify.seagullsoftware.com) (12.6.96.143) by daedalus.apache.org with SMTP; 3 May 2004 21:35:37 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [VFS] Crashing when trying to set username Date: Mon, 3 May 2004 17:35:42 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [VFS] Crashing when trying to set username Thread-Index: AcQxSzARjfQVPtN+TjW42ItkZndgoQACymBw From: "Gary Gregory" To: "Jakarta Commons Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Here is what I suggest for getting better feedback from this list: - Use a current build, and refer to it by it's date in communications. - Provide the stack trace Even better: create a Bugzilla ticket with above info on how to reproduce. Thank you, Gary=20 > -----Original Message----- > From: Adam R. B. Jack [mailto:ajack@trysybase.com] > Sent: Monday, May 03, 2004 13:12 > To: commons-user@jakarta.apache.org > Subject: [VFS] Crashing when trying to set username >=20 > When I run some VFS-using code (a few months old) using this code: >=20 > public static FileSystemManager createFSM(String name, String base) > throws FileSystemException { > DefaultFileSystemManager fsm =3D new StandardFileSystemManager(); > fsm.init(); > // Set Base Directory for Resolving Relative To... > fsm.setBaseFile(new java.io.File(base)); > return fsm; > } >=20 > it crashes in this code (saying you can't pass a null username) at this > point: >=20 > /** > * Returns the client for this file system. > */ > protected HttpClient getClient() > throws FileSystemException > { > if (client =3D=3D null) > { > // Create an Http client > final GenericFileName rootName =3D (GenericFileName) = getRootName(); > client =3D new HttpClient(new = MultiThreadedHttpConnectionManager()); > final HostConfiguration config =3D new HostConfiguration(); > config.setHost(rootName.getHostName(), rootName.getPort()); > client.setHostConfiguration(config); > final UsernamePasswordCredentials creds =3D > new UsernamePasswordCredentials(rootName.getUserName(), > rootName.getPassword ()); > client.getState().setCredentials(null, rootName.getHostName(), creds); > } > return client; > } >=20 > Any pointers on how I get past this? It would seem that somehow I need to > set a username on that rootName, but I'm not sure how. >=20 > Thanks in advance, >=20 > regards, >=20 > Adam > -- > Experience the Unwired Enterprise: > http://www.sybase.com/unwiredenterprise > Try Sybase: http://www.try.sybase.com >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org