Announcement Announcement Module
Collapse
No announcement yet.
Strange Java Problem GGTS 3.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange Java Problem GGTS 3.2

    I'm baffled by this error message since it implies that my project files are located in the GGTS installation directory, and they are not:

    General error during canonicalization: /Users/shawntho/springsource/ggts-3.2.0.RELEASE/GGTS.app/Contents/MacOS/grails-app/conf/Config.groovy (No such file or directory)

    The application will not compile in GGTS (though it will from the terminal).

    When I attempt to run the application I get strange Hibernate exceptions:
    | Error 2013-04-30 11:33:09,419 [http-bio-8080-exec-2] ERROR errors.GrailsExceptionResolver - ClassCastException occurred when processing request: [GET] /Mocah/story/show/3
    com.sun.proxy.$Proxy25 cannot be cast to org.springframework.orm.hibernate3.HibernateCallba ck. Stacktrace follows:
    Message: com.sun.proxy.$Proxy25 cannot be cast to org.springframework.orm.hibernate3.HibernateCallba ck

    Any help would be appreciated.

    -Shawn

  • #2
    The first thing I would try is deleting your grails project metadata:

    1. remove the project from the workspace (but don't delete from the file system)
    2. delete the .classpath, .project, and .settings files/folder
    3. re-import into GGTS.

    If this doesn't fix things, then something funny is going on. Check your error log. Window -> Show view -> Other -> Error log. Paste anything that looks relevant.

    Comment


    • #3
      Thanks Andrew. I just deleted everything and and re-downloaded the application from Subversion and let GGTS convert it into a grails project. The .classpath and .project .setting files/folders were re-generated but I still have the same problem. The error log isn't very helpful. I can't find an error that looks related to the project and they seem to be in a random order.

      Comment


      • #4
        OK I've narrowed it down--GGTS cannot resolve an abstract class with an annotation. I'm using the Grails i18n Fields Plugin. The application compiles and runs fine from the command line, just not in GGTS. Here's my class definition:

        @i18nfields.I18nFields

        abstract class Content implements Comparable {
        }

        If I remove the annotation the class compiles in GGTS.

        Comment


        • #5
          So... is this a known problem or should I file some sort of report?

          -Shawn

          Comment


          • #6
            Apologies for the delayed response. I'm taking a look at this right now. It looks like there are problems with the AST transform. From what I see, I am getting errors regardless of whether or not the class is abstract.

            Comment


            • #7
              Raised a bug here: https://issuetracker.springsource.com/browse/STS-3362

              Is this the problem that you are having?

              Comment


              • #8
                Yes!
                Is there a workaround you would suggest? I could try to contact the plugin author but I wonder if this is a common convention in Grails plugins.

                -Shawn

                Comment


                • #9
                  There is a hacky workaround as I describe in the bug report, but fundamentally, the plugin should be changed. It is making too many assumptions about how it is going to be called and what will be initialized when it is called.

                  Comment


                  • #10
                    I filed a jira with the plugin author:
                    http://jira.grails.org/browse/GPI18NFIELDS-9

                    Comment


                    • #11
                      Thanks. Will make a comment there. I determined a reliable fix.

                      Comment

                      Working...
                      X