title: Grails 3 "MissingMethodException" error on domain class save() method (and other methods)
body: <p>Domain Class:</p>
  
  <pre><code>package com.myapp.gorm.log
  
  import com.myapp.gorm.security.User
  import com.myapp.gorm.system.TransactionJournal
  
  class LogJournal {
  
      static constraints = {
        message nullable: false
        category nullable: false
        user1 nullable: false
      }
  
      static mapping = {
        dateCreated column: "ts"
        lastUpdated column: "ts_update"
      }
  
  LogMessage        message
  LogCategory       category
  User               user1
  User               user2
  String             value
  TransactionJournal transaction
  
  Date dateCreated
  Date lastUpdated
  
  
  boolean equals(o) {
      if (this.is(o)) return true
      if (getClass() != o.class) return false
  
      LogJournal that = (LogJournal) o
  
      if (category != that.category) return false
      if (dateCreated != that.dateCreated) return false
      if (id != that.id) return false
      if (lastUpdated != that.lastUpdated) return false
      if (message != that.message) return false
      if (transaction != that.transaction) return false
      if (user1 != that.user1) return false
      if (user2 != that.user2) return false
      if (value != that.value) return false
  
      return true
  }
  
  int hashCode() {
      int result
      result = message.hashCode()
      result = 31 * result + category.hashCode()
      result = 31 * result + user1.hashCode()
      result = 31 * result + (user2 != null ? user2.hashCode() : 0)
      result = 31 * result + (value != null ? value.hashCode() : 0)
      result = 31 * result + (transaction != null ? transaction.hashCode() : 0)
      result = 31 * result + dateCreated.hashCode()
      result = 31 * result + (lastUpdated != null ? lastUpdated.hashCode() : 0)
      result = 31 * result + id.hashCode()
      return result
    }
  
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>groovy.lang.MissingMethodException: No signature of method:     c       com.domainboost.gorm.log.LogJournal.save() is applicable for argument types: ()     values: []
  Possible solutions: save(), save(boolean), save(java.util.Map), wait(), last(), any()
  </code></pre>
  
  <p>Or other domain classes work normally, only this one has a problem. I see grails cannot perform any method on this class instance.</p>
  
  <p>There are no any  validation errors.</p>
  
  <p>Where I call this domain  class (it's logback: appender): </p>
  
  <pre><code>class SystemAppender extends AppenderBase&lt;ILoggingEvent&gt;  {
  
     static appInitialized = false
  
    @Override
    public void append(ILoggingEvent event) {
      if (appInitialized) {
          LogMessage logMessage = LogMessage.findByMessage(event.getMessage())
          if (!logMessage) {
              logMessage = new LogMessage()
              logMessage.message = event.getMessage()
              logMessage.save(flash: true)
          }
          String categoryStr = event.argumentArray[0]
          LogCategory logCategory = LogCategory.findByCategory(categoryStr)
          if (!logCategory) {
              logCategory = new LogCategory()
              logCategory.category = categoryStr
              logCategory.save(flash: true)
          }
          User user1 = null
          if (event.argumentArray.contains(1)) {
              user1 = event.argumentArray[1]
          }
          User user2 = null
          if (event.argumentArray.contains(2)) {
              user1 = event.argumentArray[2]
          }
          TransactionJournal tj = null
          if (event.argumentArray.contains(3)) {
              tj = event.argumentArray[3]
          }
          LogJournal logJournal = new LogJournal()
          logJournal.category = logCategory
          logJournal.message = logMessage
          logJournal.user1 = user1
          logJournal.user2 = user2
          logJournal.transaction = tj
          LogJournal.save()
  
        }
    }
  }
  </code></pre>
  
  <p>And how I test this in grails console </p>
  
  <pre><code>import org.slf4j.Logger
  import org.slf4j.LoggerFactory
  
  def Logger logger = LoggerFactory.getLogger("sysLog")
  logger.info("message", "category")
  </code></pre>
  
  <p>Error is on 
       LogJournal.save()</p>
  
  <p>The code which ended with an error is in GormStaticApi.groovy</p>
  
  <pre><code>@CompileStatic(TypeCheckingMode.SKIP)
      def methodMissing(String methodName, Object args) {
      FinderMethod method = gormDynamicFinders.find { FinderMethod f -&gt;   f.isMethodMatch(methodName) }
      if (!method) {
          throw new MissingMethodException(methodName, persistentClass, args)
      }
  </code></pre>
  
  <p>So it seems that method "save" is not found..
  WTF ?</p>