db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fischer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-79) TorqueInstance.getConnection should throw an interpretable error message if Torque is not initialized
Date Fri, 26 Jan 2007 20:18:49 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467900

Thomas Fischer commented on TORQUE-79:

But Torque,init() also passes through Torque.getInstance(), so if you check there, you cannot
initialize any more. Besides, I'd think that one should be able to use Torque without the
static facade one day, so I'd rather not put functionality in there.
What do you mean by "automatic initialization" ? I cannot see from where Torque should guess
the db url, username and password ?

> TorqueInstance.getConnection should throw an interpretable error message if Torque is
not initialized
> -----------------------------------------------------------------------------------------------------
>                 Key: TORQUE-79
>                 URL: https://issues.apache.org/jira/browse/TORQUE-79
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>    Affects Versions: 3.3-RC1
>            Reporter: Thomas Fischer
>         Assigned To: Thomas Fischer
>            Priority: Trivial
>             Fix For: 4.0
> From the users mailing list, if Torque.getConection() is called and Torque is not initiialized,
the error message is now 
> java.lang.NullPointerException: There was no DataSourceFactory configured for the connection
>          at org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:711)
>          at org.apache.torque.Torque.getConnection(Torque.java:268)
>          at org.apache.torque.util.Transaction.beginOptional(Transaction.java:80)
>          at org.apache.torque.util.Transaction.begin(Transaction.java:62)
> .....
> There should be a check whether Torque is initialized, and an exception thrown which
says that Torque is not initialized if it is not.
> This issue does not block the release of Torque-3.3-RC2

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message