OpenJPA
  1. OpenJPA
  2. OPENJPA-553

Improved diagnostics to include field names when Exceptions thrown.

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.2
    • Fix Version/s: None
    • Component/s: diagnostics
    • Labels:
      None

      Description

      I just got an error message which said:-

      Exception in thread "main" <openjpa-1.0.2-r420667:627158 nonfatal general
      error> org.apache.openjpa.persistence.PersistenceException: java.util.Date
      cannot be cast to java.util.Collection

      In this (and the accompanying stack trace) there is no indication which Date
      object cannot be cast to a Collection.  Yes from the stack trace I know that
      I was trying to persist a particular root object, but I have no idea which
      class and field this error refers to.  Simply adding the class and field would
      make debugging so much easier.

      Then once I know which Date field it might be, I can start to try to work out
      why it wanted to cast it to a collection.  Presumably this was it was trying
      to map this to a particular table, or to a set of objects of a given type, and
      again it would be useful to know what application object as opposed to raw
      java class it was trying to map to.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            David Goodenough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development