Save method is disappearing intermittantly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Save method is disappearing intermittantly

scryan
We have a domain object that is a subclass of another object in a 3 deep hierarchy.  We have been using the object in our grails application for over 6 months but recently we have been getting a missing method exception on an intermittent basis which suggest the exact method we are calling but it can't find the method.  Here is the stack trace and am wondering what i am missing or not seeing or any  ideas on how to debug

Here is the groovy line

fields.each {
        if (!it.save())
        {
          log?.error "PROBLEM SAVING field " + it
        }
      }


Error 500: Executing action [saveEngagementData] of controller [com.soaring.om.controller.engagement.EngagementController] caused exception: groovy.lang.MissingMethodException: No signature of method: static com.soaring.om.domain.engagement.EngagementField.save() is applicable for argument types: () values: [] Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
Servlet: grails
URI: /om/grails/engagement/saveEngagementData.dispatch
Exception Message: No signature of method: static com.soaring.om.domain.engagement.EngagementField.save() is applicable for argument types: () values: [] Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
Caused by: No signature of method: static com.soaring.om.domain.engagement.EngagementField.save() is applicable for argument types: () values: [] Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
Class: EngagementController
At Line: [967]
Code Snippet:
Stack Trace

groovy.lang.MissingMethodException: No signature of method: static com.soaring.om.domain.engagement.EngagementField.save() is applicable for argument types: () values: []
Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)

Scott Ryan

Reply | Threaded
Open this post in threaded view
|

Re: Save method is disappearing intermittantly

Jeff Scott Brown
On Fri, Nov 12, 2010 at 2:07 PM, Scott Ryan <[hidden email]> wrote:

> We have a domain object that is a subclass of another object in a 3 deep
> hierarchy.  We have been using the object in our grails application for over
> 6 months but recently we have been getting a missing method exception on an
> intermittent basis which suggest the exact method we are calling but it
> can't find the method.  Here is the stack trace and am wondering what i am
> missing or not seeing or any  ideas on how to debug
> Here is the groovy line
> fields.each {
>         if (!it.save())
>         {
>           log?.error "PROBLEM SAVING field " + it
>         }
>       }
>
> Error 500: Executing action [saveEngagementData] of controller
> [com.soaring.om.controller.engagement.EngagementController] caused
> exception: groovy.lang.MissingMethodException: No signature of method:
> static com.soaring.om.domain.engagement.EngagementField.save() is applicable
> for argument types: () values: [] Possible solutions: save(),
> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
> Servlet: grails
> URI: /om/grails/engagement/saveEngagementData.dispatch
> Exception Message: No signature of method: static
> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
> argument types: () values: [] Possible solutions: save(),
> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
> Caused by: No signature of method: static
> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
> argument types: () values: [] Possible solutions: save(),
> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
> Class: EngagementController
> At Line: [967]
> Code Snippet:
> Stack Trace
>
> groovy.lang.MissingMethodException: No signature of method: static
> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
> argument types: () values: []
> Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map),
> wait(), any(), wait(long)
>
> Scott Ryan
>

The error message suggests that you are invoking a static method.  Is
it possible that the fields collection has the EngagementField class
(not an instance of the class) in it?  If you were effectively calling
EngagementField.save(), that might explain the error.



jb

--
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Save method is disappearing intermittantly

kaaloo
Hi Jeff,

We just noticed this issue with some very innocent looking code that
clearly does not involve the class but a regular instance (and that
works locally):

              def image = new Image(data: scaledBytes, contentType: 'image/png')
              user.photo = image.save()

Are AST transformations being used now somewhere down the line now
that if buggy could have this effect ?  I don't see why method search
for save fails.  I'm going to try changing the image variable
declaration to an explicit Image type to see if that helps.  I'll post
here if I see anything new.

Luis

groovy.lang.MissingMethodException: No signature of method: static
com.mybalsamiq.domain.Image.save() is applicable for argument types:
() values: []
Possible solutions: wait(), any(), wait(long),
each(groovy.lang.Closure), sleep(long), any(groovy.lang.Closure)
        at UserController$_closure11_closure18.doCall(UserController.groovy:134)
        at $Proxy19.doInTransaction(Unknown Source)
        at UserController$_closure11.doCall(UserController.groovy:121)
        at UserController$_closure11.doCall(UserController.groovy)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at com.mybalsamiq.servlet.StaticAssetsFilter.doFilter(StaticAssetsFilter.java:49)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:343)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
        at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
        at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
        at com.studentsonly.grails.plugins.uiperformance.CacheFilter.doFilter(CacheFilter.java:67)
        at com.balsamiq.tomcat.CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:113)
        at java.lang.Thread.run(Thread.java:636)

On Fri, Nov 12, 2010 at 9:22 PM, Jeff Brown <[hidden email]> wrote:

> On Fri, Nov 12, 2010 at 2:07 PM, Scott Ryan <[hidden email]> wrote:
>> We have a domain object that is a subclass of another object in a 3 deep
>> hierarchy.  We have been using the object in our grails application for over
>> 6 months but recently we have been getting a missing method exception on an
>> intermittent basis which suggest the exact method we are calling but it
>> can't find the method.  Here is the stack trace and am wondering what i am
>> missing or not seeing or any  ideas on how to debug
>> Here is the groovy line
>> fields.each {
>>         if (!it.save())
>>         {
>>           log?.error "PROBLEM SAVING field " + it
>>         }
>>       }
>>
>> Error 500: Executing action [saveEngagementData] of controller
>> [com.soaring.om.controller.engagement.EngagementController] caused
>> exception: groovy.lang.MissingMethodException: No signature of method:
>> static com.soaring.om.domain.engagement.EngagementField.save() is applicable
>> for argument types: () values: [] Possible solutions: save(),
>> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
>> Servlet: grails
>> URI: /om/grails/engagement/saveEngagementData.dispatch
>> Exception Message: No signature of method: static
>> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
>> argument types: () values: [] Possible solutions: save(),
>> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
>> Caused by: No signature of method: static
>> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
>> argument types: () values: [] Possible solutions: save(),
>> save(java.lang.Boolean), save(java.util.Map), wait(), any(), wait(long)
>> Class: EngagementController
>> At Line: [967]
>> Code Snippet:
>> Stack Trace
>>
>> groovy.lang.MissingMethodException: No signature of method: static
>> com.soaring.om.domain.engagement.EngagementField.save() is applicable for
>> argument types: () values: []
>> Possible solutions: save(), save(java.lang.Boolean), save(java.util.Map),
>> wait(), any(), wait(long)
>>
>> Scott Ryan
>>
>
> The error message suggests that you are invoking a static method.  Is
> it possible that the fields collection has the EngagementField class
> (not an instance of the class) in it?  If you were effectively calling
> EngagementField.save(), that might explain the error.
>
>
>
> jb
>
> --
> Jeff Brown
> SpringSource
> http://www.springsource.com/
>
> Autism Strikes 1 in 166
> Find The Cause ~ Find The Cure
> http://www.autismspeaks.org/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email