cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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:?]


Accepted Solutions (0)

Answers (1)

Answers (1)

former_member625836
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Jacek,

Thanks for your reply! https://help.hybris.com/6.6.0/hcd/8bda5dec866910148593fca2c20f6a0e.html Both class name and package name is correct. I followed the above link.

Please let know my definitions.xml file path is correct or not?

mybackoffice\backoffice\classes\cockpitng\widgets\customexplorertree\definitions.xml

Former Member
0 Kudos

Hi Karthi,

You might have excluded some extension(where required class is present) from localextensions.xml . Please check the extension where that class is present and traverse the dependency tree to ensure its refernced in localextensions.xml

Regards,

former_member625836
Active Contributor
0 Kudos

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