Skip to Content

import com.hybris.cockpitng cannot be resolved - backoffice

Background:

  • SAP Hybris 6.4 running the b2b_acc recipe
  • Created a myextension extension based on ybackoffice
import com.hybris.cockpitng.util.web.authorization.ResetConfigurationAuthenticationSuccessHandler;
           ^^^^^^^^^^^^^^^^^^^^
The import com.hybris.cockpitng cannot be resolved 
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jul 01 at 08:46 AM

    Hi,

    Please move your java file (custom file that extends backofficeAuthenticationSuccessHandler) in backoffice content i.e customBackoffice/backoffice/src folder. It should not be inside customBackoffice/src folder.

    It worked for me. I was supposed to capture last login time of employee while he/she login into backoffice.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 16, 2019 at 12:10 PM

    Hi Gert Mertens - it looks like you have missed to include backoffice extension in the localextensions.xml. Please include it and execute ant all and/or ant clean all again.

    Add a comment
    10|10000 characters needed characters exceeded

    • From your comment, I understand that you have added backoffice extension, as a dependency, in the extensioninfo.xml of myextension extension. I would still suggest you add backoffice extension in the localextensions.xml and try again. If it still doesn't work, please exclude myextension extension from localextensions.xml and execute ant clean all. If it is executed successfully, include your myextension extension into localextensions.xml again and execute ant all.

  • Posted on Aug 16, 2019 at 12:11 PM

    Make sure that in your custom extension you have extensioninfo.xml should have below line.

            <requires-extension name="backoffice"/>

    Also make sure that if you are using IDE. On your custom project please add the dependency to backoffice. Then do ant clean all

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 06 at 04:02 PM

    @gert.mertens2

    I am also facing same issue. in my custombackoffice extentioninfo.xml I have added <requires-extension name="backoffice"/> and my custombackoffice and backoffice both extenion are present in localeextension.xml

    on ant clean all I am getting below error.Any solution on this?

    import com.hybris.cockpitng.core.user.AuthorityGroupService;;^^^^^^^^^^^^^^^^^^^^
    The import com.hybris.cockpitng cannot be resolved 
    Add a comment
    10|10000 characters needed characters exceeded

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.