[yjavac] 1. ERROR cannot be resolved to a type in Hybris?

Extensions can have dependencies on one another. While working with Hybris you come across a scenario, where you want to import a class from the different extension. The build only works if the required extension is available.
Ensure the below steps to works it smoothly.

Dependencies to Non-Platform(not located in /platform/ext) Extension

  • The required extension should be there in localextensions.xml
  • Add the required extension in extensioninfo.xml (e.g <requires-extension name="hmc"/>) of the dependent extension
  • In your eclipse(IDE), add required extension in build path of the dependent extension to resolve IDE dependecy.
    Note: Adding required extension in IDE build path won't resolve extension dependency of your platform. It only resolved by extensioninfo.xml
  • Rebuild the system (ant clean all)

Dependencies to Platform Extension

By default, all extensions have the dependency on Platform extension(located at /platform/ext). Therefore, you do not required to specify requires-extension for the Platform extensions in extensioninfo.xml file.


Author Image

Ankitkumar Patel

Sr. SAP Hybris consultant, having 6+ years experience in Hybris, Java, J2EE. Extensive hands-on experience in SAP Hybris development, third-party integrations with Hybris, project architecture and design... Read more

Comments

Popular posts from this blog

Hybris flexible search query examples

How to remove or update all data records in Hybris?

Hybris backoffice customization