Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

java.lang.NoClassDefFoundError: org/apache/felix/scr/ScrService

Avatar

Level 2

Hello Everyone,

We are upgrading our code from AEM6.1 to AEM6.3. In one of our Workflow process steps we get the above error.

Code snippet:

final ServiceReference scrServiceRef = context.getBundleContext()

                .getServiceReference(ScrService.class.getName());

final ScrService scrService = (ScrService) context.getBundleContext()

                .getService(scrServiceRef);

final org.apache.felix.scr.Component[] components = scrService

                .getComponents(WorkflowEmailNotificaton.EMAILNOTIFICATION_SERVICE_NAME);

Thanks,

Megha

3 Replies

Avatar

Level 10

Did you rebuild the code using AEM 6.3 UBER JAR?

Avatar

Level 2

Sorry for delayed response. We built it using uber jar 6.3 but ScrService was deprecated and getting the above error.

We resolved it using

org.osgi.service.component.runtime.ServiceComponentRuntime;

org.osgi.service.component.runtime.dto.ComponentDescriptionDTO;

Thanks,

Megha