Skip to Content
author's profile photo Former Member
Former Member

When I am trying to extend the widget, I am getting controller ClassNotFoundException.

I am trying to extend the OTB ExplorerTreeWidget in the following trial link. But getting the below exception.

https://help.hybris.com/6.6.0/hcd/8bda5dec866910148593fca2c20f6a0e.html

 ERROR [hybrisHTTP26] [DefaultCockpitWidgetEngine] Could not find controller class 'com.hybris.cockpitng.widgets.common.explorertree.CustomExplorerTreeController '.
 java.lang.ClassNotFoundException: com.hybris.cockpitng.widgets.common.explorertree.CustomExplorerTreeController
         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892) ~[catalina.jar:7.0.82]
         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735) ~[catalina.jar:7.0.82]
         at com.hybris.cockpitng.core.persistence.packaging.WidgetClassLoader.loadClass(WidgetClassLoader.java:402) ~[cockpitcore-6.6.0.0-RC8.jar:?]
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_152]
         at com.hybris.cockpitng.core.persistence.packaging.WidgetClassLoader.loadClass(WidgetClassLoader.java:402) ~[cockpitcore-6.6.0.0-RC8.jar:?]
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_152]
         at com.hybris.cockpitng.core.persistence.packaging.WidgetClassLoader.loadClass(WidgetClassLoader.java:402) ~[cockpitcore-6.6.0.0-RC8.jar:?]
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_152]
         at java.lang.Class.forName0(Native Method) ~[?:1.8.0_152]
         at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_152]
         at com.hybris.cockpitng.core.impl.DefaultCockpitComponentDefinitionService.createAutowiredComponent(DefaultCockpitComponentDefinitionService.java:95) ~[cockpitcore-6.6.0.0-RC8.jar:?]


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 09, 2018 at 09:38 AM

    Hi ,

    Please check if nad packaging is correct - ClassNotFound indicates that either there is no such class, or it was loaded by different classloader. I would definitively bet on the fact that such class in fact does not exist.

    Cheer, Jacek

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi ,

      After compilation the path is fine (yet in developement it should be in resources rather then in classes. Still it is definitively loaded properly, as you get ClassNotFound. It also goes through WidgetClassLoader so everything looks fine. I'm guessing you have backoffice-module set to true in your extensioninfo.xml and the widget controller class is located in extension/backoffice/src folder?

      Cheers, Jacek

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.