Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3330

create JPA serializable embeddable: UnsupportedOperationException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.2.RELEASE
    • Fix Version/s: 1.2.3.RELEASE
    • Component/s: PERSISTENCE
    • Labels:
    • Environment:
      Windows XP x64, java full version "1.6.0_21-b07", maven 3.0.4, Roo 1.2.2 RELEASE

      Description

      Run this script:
      project --topLevelPackage org.andromda.timetracker
      jpa setup --provider HIBERNATE --database H2_IN_MEMORY
      embeddable --class org.andromda.timetracker.domain.TimePeriod --serializable

      Results in:
      java.lang.UnsupportedOperationException
      at java.util.AbstractList.add(AbstractList.java:91)
      at org.springframework.roo.addon.jpa.JpaOperationsImpl.newEmbeddableClass(JpaOperationsImpl.java:560)
      at org.springframework.roo.addon.jpa.JpaCommands.createEmbeddableClass(JpaCommands.java:82)

      This command succeeds without the --serializable modifier.
      line 560:
      if (serializable) {
      annotations.add(new AnnotationMetadataBuilder(ROO_SERIALIZABLE));

      Embedded classes have to be serializable for the Entity to be serializable.

        Attachments

          Activity

            People

            • Assignee:
              stewarta Alan Stewart
              Reporter:
              bobfields Bob Fields
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: