java.lang.IllegalArgumentException: Incorrect type for parameter [tenantId]

GitHub | goeh | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Allow type coercion for parameter to Tenants.withId()

    GitHub | 7 months ago | goeh
    java.lang.IllegalArgumentException: Incorrect type for parameter [tenantId]

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Incorrect type for parameter [tenantId]

      at org.hibernate.internal.FilterImpl.setParameter()
    2. Hibernate
      FilterImpl.setParameter
      1. org.hibernate.internal.FilterImpl.setParameter(FilterImpl.java:82)
      1 frame
    3. Grails GORM
      AbstractHibernateDatastore$1.call
      1. org.grails.orm.hibernate.AbstractHibernateDatastore.enableMultiTenancyFilter(AbstractHibernateDatastore.java:342)
      2. org.grails.orm.hibernate.AbstractHibernateDatastore$1.call(AbstractHibernateDatastore.java:368)
      2 frames
    4. Groovy
      Closure.call
      1. groovy.lang.Closure.call(Closure.java:430)
      1 frame
    5. Grails GORM
      AbstractHibernateDatastore.withNewSession
      1. org.grails.orm.hibernate.GrailsHibernateTemplate$1.doInHibernate(GrailsHibernateTemplate.java:140)
      2. org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:243)
      3. org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:187)
      4. org.grails.orm.hibernate.GrailsHibernateTemplate.executeWithNewSession(GrailsHibernateTemplate.java:137)
      5. org.grails.orm.hibernate.AbstractHibernateDatastore.withNewSession(AbstractHibernateDatastore.java:322)
      6. org.grails.orm.hibernate.AbstractHibernateDatastore.withNewSession(AbstractHibernateDatastore.java:331)
      6 frames
    6. grails.gorm.multitenancy
      Tenants.withId
      1. grails.gorm.multitenancy.Tenants.withTenantIdInternal_closure1(Tenants.groovy:182)
      2. grails.gorm.multitenancy.Tenants$CurrentTenant.withTenant(Tenants.groovy:273)
      3. grails.gorm.multitenancy.Tenants.withTenantIdInternal(Tenants.groovy:181)
      4. grails.gorm.multitenancy.Tenants.withId(Tenants.groovy:157)
      4 frames