cancel
Showing results for 
Search instead for 
Did you mean: 

import com.hybris.cockpitng cannot be resolved - backoffice

3,287

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 
S0011572494
Participant
0 Kudos

Did you find a solution to your problem yet?
I also created a custom backoffice extension and added the default backoffice extension but get this error. For me it seems like the classes under webroot/lib are not detected during build.

Accepted Solutions (0)

Answers (5)

Answers (5)

pooja1_
Explorer

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.

nkatsifarakis
Discoverer
0 Kudos

Is the class you're depending on found within a ".../web/src" folder?

If so, make sure your class in your custom backoffice extension is also within its "yourbackoffice/web/src" folder - and not just within "yourbackoffice/src".

Recall that "extension/web/src/**" classes can access "extension/src/**" classes - but not the other way around.

 

former_member590181
Discoverer
0 Kudos

@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 
VinayKumarS
Active Contributor
0 Kudos

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

Thank you for your reply @Arvind Kumar Avinash @Vinay Kumar Samudrala , but yes i have already added the backoffice extension in my extensioninfo.xml

former_member620692
Active Contributor
0 Kudos

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.

0 Kudos

Thank you for your reply @Arvind Kumar Avinash @Vinay Kumar Samudrala , but yes i have already added the backoffice extension in my extensioninfo.xml

former_member620692
Active Contributor
0 Kudos

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.