Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6625

EcomSEO generates an error when used in multi-tenancy setup

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • 17.12.01
    • ecommerce

    Description

      When using the ecomseo application of the ecommerce component in a tenant the tenant entity can't be accessed, and the following error is returned.

           [java] 2015-09-17 22:44:33,906 |http-bio-8443-exec-8 |GenericDelegator              |I| Can't access entity of entityGroup = org.ofbiz.tenant using tenant delegator default#enantId, use base delegator instead
           [java] 2015-09-17 22:44:33,906 |http-bio-8443-exec-8 |GenericDelegator              |E| Failure in findByCondition operation for entity [Tenant]: org.ofbiz.entity.GenericEntityException: There is no datasource (Helper) configured for the entity-group [org.ofbiz.tenant]; was trying to find datasource (helper) for entity [Tenant]. Rolling back transaction.
           [java] org.ofbiz.entity.GenericEntityException: There is no datasource (Helper) configured for the entity-group [org.ofbiz.tenant]; was trying to find datasource (helper) for entity [Tenant]
           [java] 	at org.ofbiz.entity.GenericDelegator.getEntityHelper(GenericDelegator.java:544) ~[ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1774) ~[ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.entity.GenericDelegator.findList(GenericDelegator.java:1811) [ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.product.category.SeoContextFilter.doFilter(SeoContextFilter.java:300) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.ofbiz.product.category.SeoContentUrlFilter.doFilter(SeoContentUrlFilter.java:105) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:338) [ofbiz-product.jar:?]
           [java] 	at org.ofbiz.product.category.CatalogUrlSeoFilter.doFilter(CatalogUrlSeoFilter.java:68) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
           [java] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
           [java] 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
           [java] 2015-09-17 22:44:33,907 |http-bio-8443-exec-8 |TransactionUtil               |I| Transaction rolled back
           [java] 2015-09-17 22:44:33,907 |http-bio-8443-exec-8 |SeoContextFilter              |W| Unable to get Tenant
           [java] org.ofbiz.entity.GenericEntityException: org.ofbiz.entity.GenericEntityException: There is no datasource (Helper) configured for the entity-group [org.ofbiz.tenant]; was trying to find datasource (helper) for entity [Tenant] (There is no datasource (Helper) configured for the entity-group [org.ofbiz.tenant]; was trying to find datasource (helper) for entity [Tenant])
           [java] 	at org.ofbiz.entity.GenericDelegator.findList(GenericDelegator.java:1831) ~[ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.product.category.SeoContextFilter.doFilter(SeoContextFilter.java:300) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.ofbiz.product.category.SeoContentUrlFilter.doFilter(SeoContentUrlFilter.java:105) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.ofbiz.product.category.CatalogUrlFilter.doFilter(CatalogUrlFilter.java:338) [ofbiz-product.jar:?]
           [java] 	at org.ofbiz.product.category.CatalogUrlSeoFilter.doFilter(CatalogUrlSeoFilter.java:68) [ofbiz-product.jar:?]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) [tomcat-7.0.59-catalina.jar:7.0.59]
           [java] 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
           [java] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
           [java] 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-7.0.59-tomcat-coyote.jar:7.0.59]
           [java] 	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
           [java] Caused by: org.ofbiz.entity.GenericEntityException: There is no datasource (Helper) configured for the entity-group [org.ofbiz.tenant]; was trying to find datasource (helper) for entity [Tenant]
           [java] 	at org.ofbiz.entity.GenericDelegator.getEntityHelper(GenericDelegator.java:544) ~[ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1774) ~[ofbiz-entity.jar:?]
           [java] 	at org.ofbiz.entity.GenericDelegator.findList(GenericDelegator.java:1811) ~[ofbiz-entity.jar:?]
           [java] 	... 25 more
      
      

      This is due to the fact that the tenant entity is only available via the default delegator, and not via the delegator#<tenantId> delegator

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jleroux Jacques Le Roux
            pierresmits Pierre Smits
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment