Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-79

TorqueInstance.getConnection should throw an interpretable error message if Torque is not initialized

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.3-RC1
    • 3.3
    • Runtime
    • None

    Description

      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 XXX
      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

      Attachments

        Activity

          People

            tfischer Thomas Fox
            tfischer Thomas Fox
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: