Grails
  1. Grails
  2. GRAILS-8769

"No property found for name" exception on unit tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.1
    • Component/s: Testing
    • Labels:
      None
    • Environment:
      Debian unstable amd64
    • Testcase included:
      yes

      Description

      I've created a sample project demonstrating the issue:

      https://github.com/rosenfeld/grails_bug_unitfails

      For my actual application, I don't need to reproduce all those steps. Just running "grails test-app unit:" will trigger the issue in my actual application.

        Activity

        Hide
        Jeff Scott Brown added a comment -

        The attached unit tests are passing. What steps are involved in making them fail?

        Show
        Jeff Scott Brown added a comment - The attached unit tests are passing. What steps are involved in making them fail?
        Hide
        Jeff Scott Brown added a comment -

        I looked through the source code and found a comment describing how to reproduce the problem.

        Thanks.

        Show
        Jeff Scott Brown added a comment - I looked through the source code and found a comment describing how to reproduce the problem. Thanks.
        Hide
        Rodrigo Rosenfeld Rosas added a comment -

        Yes, sorry, I should have pointed out to the instructions directly in the link. I've done it in a separate commit for easying the review process:

        https://github.com/rosenfeld/grails_bug_unitfails/commit/9537ea11c0a579a066032eef86328a5959a8393b

        I hope looking only at the commit will make it clear for others that try to replicate the issue.

        Thanks for taking a look at it.

        Show
        Rodrigo Rosenfeld Rosas added a comment - Yes, sorry, I should have pointed out to the instructions directly in the link. I've done it in a separate commit for easying the review process: https://github.com/rosenfeld/grails_bug_unitfails/commit/9537ea11c0a579a066032eef86328a5959a8393b I hope looking only at the commit will make it clear for others that try to replicate the issue. Thanks for taking a look at it.
        Hide
        Rodrigo Rosenfeld Rosas added a comment -

        I'm waiting the Hudson build to complete before I can confirm if that fixed the issue for my application as well. Thanks!

        Show
        Rodrigo Rosenfeld Rosas added a comment - I'm waiting the Hudson build to complete before I can confirm if that fixed the issue for my application as well. Thanks!
        Hide
        Rodrigo Rosenfeld Rosas added a comment -

        Ok, my tests are passing again, thanks! I'll revert my commit that replaced mongo-morphia with GMongo in a separate branch for checking if it still works on this new version and will let you know.

        Show
        Rodrigo Rosenfeld Rosas added a comment - Ok, my tests are passing again, thanks! I'll revert my commit that replaced mongo-morphia with GMongo in a separate branch for checking if it still works on this new version and will let you know.
        Hide
        Rodrigo Rosenfeld Rosas added a comment -

        The mongo-morphia is still broken after reverting the commit. The error message is a different one now though:

        Error 2012-02-14 10:18:53,740 [http-bio-8081-exec-4] ERROR filters.LoggingFilters - Failed to insert a logging entry
        Message: No signature of method: myapp.Log.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
        Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), isCase(java.lang.Object), use([Ljava.lang.Object

        Unfortunately I won't be able to help on this anytime soon as I have already moved away from any Mongo plugin and have other tasks to be completed by this week... Trust me, if I could easily create an example application reproducing the issue I would do it, but I have no idea on how to reproduce it...

        Show
        Rodrigo Rosenfeld Rosas added a comment - The mongo-morphia is still broken after reverting the commit. The error message is a different one now though: Error 2012-02-14 10:18:53,740 [http-bio-8081-exec-4] ERROR filters.LoggingFilters - Failed to insert a logging entry Message: No signature of method: myapp.Log.save() is applicable for argument types: (java.util.LinkedHashMap) values: [ [flush:true] ] Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), isCase(java.lang.Object), use([Ljava.lang.Object Unfortunately I won't be able to help on this anytime soon as I have already moved away from any Mongo plugin and have other tasks to be completed by this week... Trust me, if I could easily create an example application reproducing the issue I would do it, but I have no idea on how to reproduce it...
        Hide
        Stéphane Maldini added a comment -

        the mongo morphia is not related to this one isn't it ?

        Show
        Stéphane Maldini added a comment - the mongo morphia is not related to this one isn't it ?
        Hide
        Graeme Rocher added a comment -

        I tried the mongo morphia plugin and it works fine for me, although I needed to move the domain classes from grails-app/domain to grails-app/mongo to get it to work

        Show
        Graeme Rocher added a comment - I tried the mongo morphia plugin and it works fine for me, although I needed to move the domain classes from grails-app/domain to grails-app/mongo to get it to work
        Hide
        Rodrigo Rosenfeld Rosas added a comment -

        I placed the comment here because I got the same error messages as this issue before this one was fixed. Now the error message changed, so I agree that this is a different issue. Sorry for posting about it in this JIRA. Graeme, yes, mongo morphia uses grails-app/mongo instead of grails-app/domain, but my setup is correct as it was working in 2.0.0. But as I said, I don't know how to replicate the issue in a sample application.

        Show
        Rodrigo Rosenfeld Rosas added a comment - I placed the comment here because I got the same error messages as this issue before this one was fixed. Now the error message changed, so I agree that this is a different issue. Sorry for posting about it in this JIRA. Graeme, yes, mongo morphia uses grails-app/mongo instead of grails-app/domain, but my setup is correct as it was working in 2.0.0. But as I said, I don't know how to replicate the issue in a sample application.

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Rodrigo Rosenfeld Rosas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development