Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-104

EntityToHibernateXml: catch NPE and throw a more descriptive Exception

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Won't Do
    • Minor
    • None
    • Preview 4
    • None
    • None

    Description

      jboss.log:
      ...
      02:31:01,786 INFO [Ejb3Module] Found hibernate.properties file in EJB3 jar or ear
      02:31:01,797 ERROR [Ejb3Module] Starting failed jboss.j2ee:service=EJB3,module=foo.ejb3
      java.lang.NullPointerException
      at org.jboss.ejb3.entity.EntityToHibernateXml.handleOneToMany(EntityToHibernateXml.java:845)
      at org.jboss.ejb3.entity.EntityToHibernateXml.iterateProperties(EntityToHibernateXml.java:220)
      at org.jboss.ejb3.entity.EntityToHibernateXml.handleBasicClass(EntityToHibernateXml.java:1822)
      ...

      Would be nice, if the NPE could be caught and re-throw a more descriptive Exception, so that one gets a hint, what might be wrong. In my example it was a typo in the mappedBy value, but who knows, what else might be the cause ...

      Attachments

        Activity

          People

            kkhan1@redhat.com Kabir Khan
            elkner Jens Elkner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - Not Specified
                Not Specified