代码之家  ›  专栏  ›  技术社区  ›  Hari Krishna

de.hybris.platform.persistence.ejbitemNotFoundException:未找到代码为cmssite的组合类型

  •  0
  • Hari Krishna  · 技术社区  · 6 年前

    我遵循以下步骤。

    A.我安装了“B2C-ACC-PLUS”配方。 安装.bat-r b2c_acc_plus'

    b.使用modulegen安装加速器模块 ant modulegen-dinput.module=accelerator-dinput.name=megastore-dinput.package=com.hybris.megastore-dinput.template=develop

    C.蚂蚁清理所有

    d.hybrisserver.bat(虚拟服务器.bat)

    当我运行服务器时,我在控制台日志中看到下面的严重消息。

    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.103 | SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [/megastorestorefront] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 7 of 16. Current filter: 'com.hybris.megastore.storefront.filters.cms.CMSSiteFilter@4e1baf'!; nested exception is de.hybris.platform.servicelayer.search.exceptions.FlexibleSearchException: type code 'CMSSite' invalid] with root cause
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.103 | de.hybris.platform.persistence.EJBItemNotFoundException: no composed type with code CMSSite found.[HY-4711]
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.type.TypeManagerEJB.getComposedType(TypeManagerEJB.java:476)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.property.DBPersistenceManager.loadAndCacheInfo(DBPersistenceManager.java:254)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.property.DBPersistenceManager.getPersistenceInfoInternal(DBPersistenceManager.java:241)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.property.DBPersistenceManager.getPersistenceInfo(DBPersistenceManager.java:202)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.flexiblesearch.typecache.impl.DefaultFlexibleSearchTypeCacheProvider.getCachedTypeData(DefaultFlexibleSearchTypeCacheProvider.java:151)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.104 |     at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:89)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:75)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at de.hybris.platform.persistence.flexiblesearch.FromClause.createSingleType(FromClause.java:86)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at de.hybris.platform.persistence.flexiblesearch.FromClause.translateNested(FromClause.java:70)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at de.hybris.platform.persistence.flexiblesearch.ParsedText$2.translate(ParsedText.java:292)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at de.hybris.platform.persistence.flexiblesearch.FlexibleSearchTools.replace(FlexibleSearchTools.java:307)
    INFO   | jvm 1    | main    | 2018/12/22 13:25:08.105 |     at
    

    当我点击url' https://localhost:9002/megastorestorefront/ '我在堆栈跟踪下看到。

    de.hybris.platform.persistence.EJBItemNotFoundException: no composed type with code CMSSite found.[HY-4711]
            at de.hybris.platform.persistence.type.TypeManagerEJB.getComposedType(TypeManagerEJB.java:476)
            at de.hybris.platform.persistence.property.DBPersistenceManager.loadAndCacheInfo(DBPersistenceManager.java:254)
            at de.hybris.platform.persistence.property.DBPersistenceManager.getPersistenceInfoInternal(DBPersistenceManager.java:241)
            at de.hybris.platform.persistence.property.DBPersistenceManager.getPersistenceInfo(DBPersistenceManager.java:202)
            at de.hybris.platform.persistence.flexiblesearch.typecache.impl.DefaultFlexibleSearchTypeCacheProvider.getCachedTypeData(DefaultFlexibleSearchTypeCacheProvider.java:151)
            at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:89)
            at de.hybris.platform.persistence.flexiblesearch.ParsedType.<init>(ParsedType.java:75)
            at de.hybris.platform.persistence.flexiblesearch.FromClause.createSingleType(FromClause.java:86)
            at de.hybris.platform.persistence.flexiblesearch.FromClause.translateNested(FromClause.java:70)
            at de.hybris.platform.persistence.flexiblesearch.ParsedText$2.translate(ParsedText.java:292)
            at de.hybris.platform.persistence.flexiblesearch.FlexibleSearchTools.replace(FlexibleSearchTools.java:307)
            at de.hybris.platform.persistence.flexiblesearch.ParsedText.translate(ParsedText.java:286)
            at de.hybris.platform.persistence.flexiblesearch.FromClause.translate(FromClause.java:45)
            at de.hybris.platform.persistence.flexiblesearch.ParsedQuery.translate(ParsedQuery.java:467)
            at de.hybris.platform.persistence.flexiblesearch.ParsedQuery.getTranslatedQuery(ParsedQuery.java:237)
            at de.hybris.platform.persistence.flexiblesearch.QueryParser.translateQuery(QueryParser.java:233)
            at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.translate(FlexibleSearch.java:2001)
            at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1411)
            at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.search(FlexibleSearch.java:1385)
            at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:418)
            at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:1)
            at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:89)
            at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.getJaloResult(DefaultFlexibleSearchService.java:396)
            at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.search(DefaultFlexibleSearchService.java:168)
            at de.hybris.platform.servicelayer.internal.dao.AbstractItemDao.search(AbstractItemDao.java:73)
            at de.hybris.platform.cms2.servicelayer.daos.impl.DefaultCMSSiteDao.findAllCMSSites(DefaultCMSSiteDao.java:39)
            at de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSSiteService.getSites(DefaultCMSSiteService.java:278)
            at de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSSiteService.getSiteForURL(DefaultCMSSiteService.java:230)
            at de.hybris.platform.acceleratorcms.context.impl.DefaultContextInformationLoader.initializeSiteFromRequest(DefaultContextInformationLoader.java:96)
            at com.hybris.megastore.storefront.filters.cms.CMSSiteFilter.processNormalRequest(CMSSiteFilter.java:173)
            at com.hybris.megastore.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:97)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at com.hybris.megastore.storefront.filters.RequestLoggerFilter.doFilterInternal(RequestLoggerFilter.java:71)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at com.hybris.megastore.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at de.hybris.platform.servicelayer.web.WebAppMediaFilter.doFilter(WebAppMediaFilter.java:128)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:99)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:44)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at de.hybris.platform.servicelayer.web.session.HybrisSpringSessionFilter.doFilter(HybrisSpringSessionFilter.java:69)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:297)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.processStandardFilterChain(AbstractPlatformFilterChain.java:206)
            at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:183)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
            at com.hybris.megastore.storefront.filters.UrlPathFilter.doFilterInternal(UrlPathFilter.java:82)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
            at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
            at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at com.hybris.megastore.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:90)
            at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
            at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:358)
            at de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:306)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
            at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
            at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:748)
    

    有人能告诉我这个错误的原因和解决方法吗?

    1 回复  |  直到 6 年前
        1
  •  0
  •   Hari Krishna    6 年前

    最后通过从管理控制台导入下面的语句解决了错误。

    # CMS Site
    UPDATE CMSSite;uid[unique=true];urlPatterns;
    ;electronics;(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=electronics)(|\&.*)$,(?i)^https?://electronics\.[^/]+(|/.*|\?.*)$,(?i)^https?://api\.hybrisdev\.com(:[\d]+)?/rest.*$,(?i)^https?://[^/]*/megastorestorefront((?![\?\&]site=).)*;
    
    推荐文章