Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4592

Cannot load parametersInfo class (ClassNotFoundException) if hst:parametersinfoclassname is used

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 13.0.0, 13.1.1
    • 13.2.0
    • None

    Description

      If hst:parametersinfoclassname property [1] used alternatively to the default annotation of the component class, then you will meet the following error when you click on "View" menu in CMS document editor:

      [INFO] [talledLocalContainer] 07.05.2019 11:47:38 WARN  http-nio-8080-exec-8 [ParametersInfoAnnotationUtils.getParametersInfoAnnotation:218] Cannot load parametersInfo class: org.onehippo.cms7.essentials.components.info.EssentialsMenuComponentInfo
      [INFO] [talledLocalContainer] java.lang.ClassNotFoundException: org.onehippo.cms7.essentials.components.info.EssentialsMenuComponentInfo
      [INFO] [talledLocalContainer] 	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1328) ~[catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) ~[catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.util.ParametersInfoAnnotationUtils.getParametersInfoAnnotation(ParametersInfoAnnotationUtils.java:215) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.util.ParametersInfoAnnotationUtils.getParametersInfoAnnotation(ParametersInfoAnnotationUtils.java:201) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.getParameterNames(DocumentParamsScanner.java:139) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.getNames(DocumentParamsScanner.java:121) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.findDocumentPathsRecursive(DocumentParamsScanner.java:84) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.findDocumentPathsRecursive(DocumentParamsScanner.java:102) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.findDocumentPathsRecursive(DocumentParamsScanner.java:72) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.linking.DocumentParamsScanner.findDocumentPathsRecursive(DocumentParamsScanner.java:59) ~[hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.LocationMapTreeComponentDocuments.add2LocationMap(LocationMapTreeComponentDocuments.java:98) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.LocationMapTreeComponentDocuments.<init>(LocationMapTreeComponentDocuments.java:56) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.configuration.site.HstSiteService.getLocationMapTreeComponentDocuments(HstSiteService.java:427) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.DefaultHstLinkCreator$HstLinkResolver.resolveToLocationMapTreeItem(DefaultHstLinkCreator.java:1113) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.DefaultHstLinkCreator$HstLinkResolver.createHstLink(DefaultHstLinkCreator.java:1073) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.DefaultHstLinkCreator$HstLinkResolver.resolveToHstLink(DefaultHstLinkCreator.java:1052) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.DefaultHstLinkCreator$HstLinkResolver.resolveAllCanonicals(DefaultHstLinkCreator.java:733) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.linking.DefaultHstLinkCreator.createAllAvailableCanonicals(DefaultHstLinkCreator.java:213) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.services.DocumentServiceImpl.lambda$getPreviewChannels$0(DocumentServiceImpl.java:80) ~[hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at java.util.Optional.ifPresent(Optional.java:159) [?:1.8.0_144]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.services.DocumentServiceImpl.getPreviewChannels(DocumentServiceImpl.java:69) [hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.platform.services.DocumentServiceImpl.getPreviewChannels(DocumentServiceImpl.java:134) [hst-platform-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.onehippo.cms7.channelmanager.plugins.channelactions.ChannelActionsPlugin.createMenu(ChannelActionsPlugin.java:162) [hippo-addon-channel-manager-frontend-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.onehippo.cms7.channelmanager.plugins.channelactions.ChannelActionsPlugin.access$000(ChannelActionsPlugin.java:68) [hippo-addon-channel-manager-frontend-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.onehippo.cms7.channelmanager.plugins.channelactions.ChannelActionsPlugin$1.getContent(ChannelActionsPlugin.java:118) [hippo-addon-channel-manager-frontend-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.addon.workflow.MenuButton$1.updateContent(MenuButton.java:78) [hippo-cms-workflowmenu-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.addon.workflow.MenuButton$1.onClick(MenuButton.java:93) [hippo-cms-workflowmenu-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:85) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:155) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:601) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source) ~[?:?]
      [INFO] [talledLocalContainer] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
      [INFO] [talledLocalContainer] 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) [wicket-request-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) [wicket-core-7.11.0.jar:7.11.0]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.hippoecm.frontend.plugins.login.ConcurrentLoginFilter.doFilter(ConcurrentLoginFilter.java:54) [hippo-cms-login-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.FilterChainInvokingValve.invoke(FilterChainInvokingValve.java:72) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.JCRSessionStatefulConcurrencyValve.invoke(JCRSessionStatefulConcurrencyValve.java:56) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.SubjectBasedSessionValve.invoke(SubjectBasedSessionValve.java:58) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.SecurityValve.invoke(SecurityValve.java:177) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.LocalizationValve.invoke(LocalizationValve.java:101) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.CmsSecurityValve.invoke(CmsSecurityValve.java:59) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.InitializationValve.invoke(InitializationValve.java:37) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline.invokeValves(HstSitePipeline.java:173) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstSitePipeline.invoke(HstSitePipeline.java:155) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.core.container.HstRequestProcessorImpl.processRequest(HstRequestProcessorImpl.java:79) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.container.HstDelegateeFilterBean.doFilter(HstDelegateeFilterBean.java:465) [hst-core-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.container.DelegatingFilter.doFilter(DelegatingFilter.java:68) [hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.hippoecm.hst.container.HstFilter.doFilter(HstFilter.java:51) [hst-commons-13.1.0.jar:13.1.0]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) [tomcat-coyote.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) [tomcat-coyote.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
      [INFO] [talledLocalContainer] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
      [INFO] [talledLocalContainer] 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.13]
      [INFO] [talledLocalContainer] 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
      

      This seems caused by this:

      ParametersInfoAnnotationUtils.java
          public static ParametersInfo getParametersInfoAnnotation(final String componentClazzName,
                                                                   final String parametersInfoClassName,
                                                                   final ClassLoader classLoader) {
              Class<?> componentClazz = null;
      
              if (componentClazzName != null && !componentClazzName.isEmpty()) {
                  try {
                      componentClazz = classLoader.loadClass(componentClazzName);
                  } catch (Exception e) {
                      log.warn("Component class not loadable: {}", componentClazzName);
                  }
              }
      
              return getParametersInfoAnnotation(componentClazz, parametersInfoClassName);
          }
      

      In the final line, "return getParametersInfoAnnotation(componentClazz, parametersInfoClassName);" should have passed the input classLoader to use the site webapp's classloader.

      [1] https://documentation.bloomreach.com/library/concepts/component-development/define-component-configuration-parameters.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: