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

NPE on Map entity property

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.0.0.RC3
    • Component/s: @ CORE
    • Labels:
      None

      Description

      When adds a property like this to a JPA entity:

          private Map<String, String> attributes;
      

      Roo shell throws a NPE exception:

      java.lang.NullPointerException
          at org.springframework.roo.model.JavaType.isNumber(JavaType.java:867)
          at org.springframework.roo.addon.web.mvc.views.AbstractViewGenerationService.createFieldItem(AbstractViewGenerationService.java:1160)
          at org.springframework.roo.addon.web.mvc.views.AbstractViewGenerationService.getFieldViewItems(AbstractViewGenerationService.java:1056)
          at org.springframework.roo.addon.web.mvc.views.AbstractViewGenerationService.addCreateView(AbstractViewGenerationService.java:457)
          at org.springframework.roo.addon.web.mvc.views.AbstractViewGeneratorMetadataProvider.getMetadata(AbstractViewGeneratorMetadataProvider.java:443)
          at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:253)
      

        Attachments

          Activity

            People

            Assignee:
            jmvivo Jose Manuel Vivó ( Chema ) - DISID.
            Reporter:
            jmvivo Jose Manuel Vivó ( Chema ) - DISID.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: