Highlighted

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

Avatar

Avatar

meghag95928867

Avatar

meghag95928867

meghag95928867

30-03-2018

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

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

31-03-2018

Did you rebuild the code using AEM 6.3 UBER JAR?

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

01-04-2018

Highlighted

Avatar

Avatar

meghag95928867

Avatar

meghag95928867

meghag95928867

25-04-2018

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