db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gus Heck <gus.h...@olin.edu>
Subject Re: Progress on MetaDataManager bug?
Date Mon, 02 Feb 2004 20:31:18 GMT
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.<init>(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


Mime
View raw message