org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException: Tenant could not be resolved outside a web request

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by goeh
, 1 year ago
Tenant could not be resolved outside a web request
org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException: Tenant could not be resolved outside a web request
at org.grails.datastore.mapping.multitenancy.web.SessionTenantResolver.resolveTenantIdentifier(SessionTenantResolver.groovy:39)
at grails.gorm.multitenancy.Tenants.currentId(Tenants.groovy:58)
at current.tenant.issue.Person.beforeValidate(Person.groovy:27)
at org.grails.datastore.gorm.support.EventTriggerCaller$MethodCaller.call(EventTriggerCaller.java:147)
at org.grails.datastore.gorm.support.EventTriggerCaller.call(EventTriggerCaller.java:90)
at org.grails.orm.hibernate.support.ClosureEventListener.onValidate(ClosureEventListener.java:383)
at org.grails.orm.hibernate.EventTriggeringInterceptor.onValidate(EventTriggeringInterceptor.java:181)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382)
at org.grails.datastore.gorm.events.ConfigurableApplicationContextEventPublisher.publishEvent(ConfigurableApplicationContextEventPublisher.groovy:30)
at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.save(AbstractHibernateGormInstanceApi.groovy:114)
at current.tenant.issue.PersonHandler.createWithCar_closure2(PersonHandler.groovy:29)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.