Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 32677 invoked from network); 2 Feb 2004 20:36:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Feb 2004 20:36:12 -0000 Received: (qmail 67865 invoked by uid 500); 2 Feb 2004 20:35:51 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 67831 invoked by uid 500); 2 Feb 2004 20:35:51 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 67713 invoked from network); 2 Feb 2004 20:35:50 -0000 Received: from unknown (HELO olinexvs01.olin.edu) (4.21.173.2) by daedalus.apache.org with SMTP; 2 Feb 2004 20:35:50 -0000 Received: from olinexfe01.olin.edu ([10.1.15.93]) by olinexvs01.olin.edu with Microsoft SMTPSVC(5.0.2195.6713); Mon, 2 Feb 2004 15:35:52 -0500 Received: from olin.edu ([4.36.33.205]) by olinexfe01.olin.edu (SAVSMTP 3.0.0.44) with SMTP id M2004020215355401024 for ; Mon, 02 Feb 2004 15:35:54 -0500 Message-ID: <401EB396.8040100@olin.edu> Date: Mon, 02 Feb 2004 15:31:18 -0500 From: Gus Heck User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030917 X-Accept-Language: en-us, en MIME-Version: 1.0 To: OJB Developers List Subject: Re: Progress on MetaDataManager bug? References: <401EA22D.6080206@olin.edu> <401EA497.8080403@apache.org> In-Reply-To: <401EA497.8080403@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Feb 2004 20:35:52.0664 (UTC) FILETIME=[26989580:01C3E9CC] 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 I didn't actually get an NPE. It was Andy who suggested the possibility of an NPE. The problem on my end was that the null or whatever was interpreted as nobody@draco.research.olin.edu with no password... when of course I need a specific password and user. The code that causes this looks like this... JdbcConnectionDescriptor descriptor = cRepos.getDescriptor(new PBKey("myCon")); //descriptor.setUserName("foo"); //descriptor.setPassWord("bar"); Connection existing; try { existing = cf.lookupConnection(descriptor); } catch (LookupException le) { throw new RuntimeException("Failed looking up connection from descriptor."); } if I uncomment line 2 and 3 (with the actual username and password, not these) it works fine. -Gus [org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR: Error getting Connection from DriverManager with url (jdbc:mysql://localhost:3306/fdbjunit) and driver (com.mysql.jdbc.Driver) Invalid authorization specification, message from server: "Access denied for user: 'nobody@draco.research.olin.edu' (Using password: NO)" java.sql.SQLException: Invalid authorization specification, message from server: "Access denied for user: 'nobody@draco.research.olin.edu' (Using password: NO)" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1825) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1752) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:833) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1734) at com.mysql.jdbc.Connection.(Connection.java:562) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:193) at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDriverManager(ConnectionFactoryAbstractImpl.java:234) at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory.makeObject(ConnectionFactoryPooledImpl.java:215) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source) at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.getConnectionFromPool(ConnectionFactoryPooledImpl.java:66) at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(ConnectionFactoryAbstractImpl.java:101) at org.cs101.fdb.impl.jdo.TorqueBugMain.main(TorqueBugMain.java:115) Exception in thread "main" java.lang.RuntimeException: Failed looking up connection from descriptor. at org.cs101.fdb.impl.jdo.TorqueBugMain.main(TorqueBugMain.java:117) Armin Waibel wrote: > Hi Gus, > > did you tried latest version from CVS HEAD (not 1.0_branch)? > I thought if have fixed it. If you still get NPE, please send me the > stack trace. > > regards, > Armin > > Gus Heck wrote: > >> I'm curious if there has been any progress on this bug: It is >> currently forcing me to put passwords in my code which I don't really >> like to do. >> >> http://www.mail-archive.com/ojb-user@db.apache.org/msg06331.html >> >> - Gus >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org >> For additional commands, e-mail: ojb-dev-help@db.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org > For additional commands, e-mail: ojb-dev-help@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org