glassfish
  1. glassfish
  2. GLASSFISH-11400

J2EETransaction suppresses error messages

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1
    • Fix Version/s: V3
    • Component/s: jts
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Linux

    • Issuezilla Id:
      11,400

      Description

      If Hibernate throws an Exception, then J2EETransaction marks the transaction as
      rollback-only and drops the exception. Upon commit, the only thing you see is a
      "transaction marked as rollback"-Exception but not the original exception. This
      means hours of debugging as you cannot see the reason for the rollback.

      In my case, I had a 'nullable = "false"' on an EntityBean-field, but the
      corresponding column was marked as nullable. When trying to change a row where
      this field was db-null, I got an exception from Hibernate:

      org.hibernate.PropertyValueException: not-null property references a null or
      transient value:
      de.scooterattack.sams.ejb.persistent.Article.storageLocation.storageLocation

      See? Everything you need to fix this bug. But this exception is never logged by
      Glassfish.

      This is the change where someone addressed the problem of exceptions:

      http://fisheye5.cenqua.com/browse/glassfish/appserv-
      core/src/java/com/sun/enterprise/distributedtx/J2EETransaction.java?
      r2=1.8&r1=1.7

      IMHO, there should be a log of the exception and not swallowing, i.e.

      _logger.log(Level.WARNING, "Exception while committing transaction.", ex);

        Activity

        Hide
        marina vatkina added a comment -

        ->transactions

        Show
        marina vatkina added a comment - ->transactions
        Hide
        marina vatkina added a comment -

        Which version are you using? The RuntimeException is now propagated to the
        client in both, v3 and v2.1.1 versions. See e.g.

        http://fisheye5.cenqua.com/browse/glassfish/appserv-core/src/java/com/sun/enterprise/distributedtx/J2EETransaction.java?r1=1.11.6.3&r2=1.11.6.4

        Show
        marina vatkina added a comment - Which version are you using? The RuntimeException is now propagated to the client in both, v3 and v2.1.1 versions. See e.g. http://fisheye5.cenqua.com/browse/glassfish/appserv-core/src/java/com/sun/enterprise/distributedtx/J2EETransaction.java?r1=1.11.6.3&r2=1.11.6.4
        Hide
        marina vatkina added a comment -

        Please reopen with a test case attached if you still see this issue on v3 or v2.1.1

            • This issue has been marked as a duplicate of 8520 ***
        Show
        marina vatkina added a comment - Please reopen with a test case attached if you still see this issue on v3 or v2.1.1 This issue has been marked as a duplicate of 8520 ***

          People

          • Assignee:
            marina vatkina
            Reporter:
            kurti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: