Torque
  1. Torque
  2. TORQUE-79

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3-RC1
    • Fix Version/s: 3.3
    • Component/s: Runtime
    • Labels:
      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Thomas Fox
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development