Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1740

JPA Connector - WorkspaceEntity hashCode() has NullPointerException on Websphere 8.0.0.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.8.4.Final
    • 2.8.3.Final
    • Storage
    • None

      I see NullPointerException during creation of workspace entity. After debugging I found that apache provided bean validation library used by hibernate on Websphere 8. Exception occurred on preInsert() phase, when BeanValidationEventListener#validate was called.
      This exception happends because org.apache.bval.jsr303.GroupValidationContextImpl uses HashMap to execute some validation operations and WorksapaceEntity has hashCode() implementation which assumes that id is not null:

      return id.hashCode()

      , but on preInsert phase id is null.
      I see that NodeEntity has ID declared as "long" primitive, but WorkspaceEntity, NamespaceEntity and ChangeLogEntity has ID declared as "Long" wrapper.
      Also there is DNA_CHANGELOG, DNA_WORKSPACES and DNA_NAMESPACES old table names.

              Unassigned Unassigned
              eshevchenko_jira evgeniy shevchenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: