Announcement Announcement Module
Collapse
No announcement yet.
GSP: Invalid duplicate class definition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GSP: Invalid duplicate class definition

    Hello.

    When opening a GSP in GGTS 3.2-M2 using Groovy-Compiler 1.7 and Grails 1.3.0 I am getting errors with the following scheme:
    Code:
    org.codehaus.groovy.control.messages.SyntaxErrorMessage@5a1185eb
    /liquid/shop/grails-app/conf/__2F_liquid_2F_shop_2F_grails_2D_app_2F_views_2F_standardShop_2F_home_2E_gsp.groovy: 6 Groovy:Invalid duplicate class definition of class __2F_liquid_2F_shop_2F_grails_2D_app_2F_views_2F_standardShop_2F_home_2E_gsp : The source /home/cklein/Entwicklung/projekte/liquid/shop/grails-app/conf/__2F_liquid_2F_shop_2F_grails_2D_app_2F_views_2F_standardShop_2F_home_2E_gsp.groovy contains at least two definitions of the class __2F_liquid_2F_shop_2F_grails_2D_app_2F_views_2F_standardShop_2F_home_2E_gsp.
    org.codehaus.groovy.control.messages.SyntaxErrorMessage@13c780e
    /liquid/shop/grails-app/conf/__2F_liquid_2F_shop_2F_grails_2D_app_2F_views_2F_standardShop_2F_home_2E_gsp.groovy: 181 Groovy:Catch statement parameter type is not a subclass of Throwable.
    Thus I am not able to use all features within a GSP.

    I am not sure whats going on here. Why does the compiler expect compiled classes at the grails-app/conf location? If I look into this folder I don't see such files.

    NOTE: Grails 1.3.0 uses Groovy-1.7.2 while GGTS uses Groovy-1.7.10. Is this any kind of problem origin?

    Regards,
    cklein

  • #2
    Now using Grails-1.3.9 with Groovy 1.7.8. Still the same problem. Anyone an idea on this compile errors?

    Comment


    • #3
      GSP support works by converting your gsp in memory into a regular groovy class. It uses this class to determine things like content assist and navigation inside of the gsp.

      It looks like there is something in your gsp that is causing GGTS's parser to produce an invalid gsp class. This might be a bug. Most likely this is something that is working on more recent versions of grails but has broken in the 1.3.x stream.

      It happens to be that GGTS will pretend that the source for the class exists in the conf folder. That is why you are seeing error messages in that folder.

      If you can send over the project and tell me which gsp it is, I can have a look. If you can't send the project, then send over the gsp alone. You could also help to diagnose the problem by trimming down the gsp file and finding out what the problematic text is.

      Comment


      • #4
        Indeed that error does not occur at any of our numerous GSP pages. Nevertheless one behaviour will lead to GGTS failing for us: We can't navigate to any model variables and only to some methods and/or tag libs etc. even when there is no GSP compile error. Neither are we able to jump from a GSP view to the appropriate controller or able to use auto complete features efficiently.

        Our frontend developers need these features and are used to that from using IntelliJ. Unfortunately we can't switch to Eclipse with that insufficiencies present.

        Are those deficiencies also present when using the latest grails version / groovy compiler? That would be the last chance for us to use Eclipse instead of intelliJ...

        PS: How can I attach the GSP the forum post? I can send you a copy of one erroneous GSP via email if you want.

        Comment

        Working...
        X