You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "David Goodenough (JIRA)" <ji...@apache.org> on 2008/04/02 20:27:24 UTC

[jira] Created: (OPENJPA-553) Improved diagnostics to include field names when Exceptions thrown.

Improved diagnostics to include field names when Exceptions thrown.
-------------------------------------------------------------------

                 Key: OPENJPA-553
                 URL: https://issues.apache.org/jira/browse/OPENJPA-553
             Project: OpenJPA
          Issue Type: Wish
          Components: diagnostics
    Affects Versions: 1.0.2
            Reporter: David Goodenough


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.


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