Griffon
  1. Griffon
  2. GRIFFON-487

NullPointerException when running an app whose name ends in "Controller"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.5-rc2
    • Fix Version/s: 0.9.5
    • Component/s: rt
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Repro:

      1) griffon create-app AirTrafficController
      2) cd AirTrafficController
      3) griffon a
      4) Behold the exception:

      Launching application ...
      2012-03-30 16:27:09,011 [main] INFO griffon.swing.SwingApplication - Initializing all startup groups: [airTrafficController]
      2012-03-30 16:27:09,021 [main] ERROR griffon.util.GriffonExceptionHandler - Uncaught Exception
      java.lang.NullPointerException
      at org.codehaus.griffon.runtime.core.DefaultMVCGroupManager.selectClassesPerMember(DefaultMVCGroupManager.java:159)
      at org.codehaus.griffon.runtime.core.DefaultMVCGroupManager.buildMVCGroup(DefaultMVCGroupManager.java:104)
      at org.codehaus.griffon.runtime.core.AbstractMVCGroupManager.createMVCGroup(AbstractMVCGroupManager.java:238)
      at org.codehaus.griffon.runtime.core.AbstractMVCGroupManager.createMVCGroup(AbstractMVCGroupManager.java:186)
      at org.codehaus.griffon.runtime.core.AbstractGriffonApplication.createMVCGroup(AbstractGriffonApplication.java:499)
      at org.codehaus.griffon.runtime.core.AbstractGriffonApplication.startup(AbstractGriffonApplication.java:313)
      at griffon.swing.AbstractSwingGriffonApplication.realize(AbstractSwingGriffonApplication.java:78)
      at griffon.swing.AbstractSwingGriffonApplication.run(AbstractSwingGriffonApplication.java:132)
      at griffon.swing.SwingApplication.main(SwingApplication.java:36)

        Activity

        Hide
        Andres Almiray added a comment -

        Fixed with https://github.com/griffon/griffon/commit/d9800f7cab9e6375dd988a37d32a2b839398a14a

        The problem was that Griffon automatically removes a redundant suffix for a matching artifact, in this case the default MVC group contains airtrafficontroller.AirTrafficController instead of airtrafficontroller.AirTrafficControllerController as expected by Application.groovy. Double suffix is not allowed but a developer may force it by applying a rename refactor after the group has been created.

        Show
        Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon/commit/d9800f7cab9e6375dd988a37d32a2b839398a14a The problem was that Griffon automatically removes a redundant suffix for a matching artifact, in this case the default MVC group contains airtrafficontroller.AirTrafficController instead of airtrafficontroller.AirTrafficControllerController as expected by Application.groovy . Double suffix is not allowed but a developer may force it by applying a rename refactor after the group has been created.

          People

          • Assignee:
            Andres Almiray
            Reporter:
            Dean Iverson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: