Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Service not working on publish instance in AEM

Avatar

Level 2

Hi,

   I written one service and then installed as osgi bundle , it is working on author instance, but not working on publish instance

  

   Below is the issue:

Unresolved compilation problems: Only a type can be imported. sample.core.service.FeedbackService resolves to a package Only a type can be imported. sample.core.vo.FeedbackVO resolves to a package FeedbackService cannot be resolved to a type FeedbackService cannot be resolved to a type FeedbackVO cannot be resolved to a type.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Please validate the bundle in OSGi console that the package "sample.core.vo" is exported.

If not, please add a package-info.java in the codebase under this package. 

 

@version("1.0.0")
package sample.core.vo;

import org.osgi.annotation.versioning.Version;

 


Aanchal Sikka

View solution in original post

2 Replies

Avatar

Employee

Can you check if the bundle is active on publish?

Via /system/console/bundles

Avatar

Correct answer by
Community Advisor

Please validate the bundle in OSGi console that the package "sample.core.vo" is exported.

If not, please add a package-info.java in the codebase under this package. 

 

@version("1.0.0")
package sample.core.vo;

import org.osgi.annotation.versioning.Version;

 


Aanchal Sikka