Expand my Community achievements bar.

SOLVED

Getting an exception org.osgi.dto.DTO not found.

Avatar

Level 3

I'm using ServiceComponentRuntime (http://javadox.com/org.osgi/osgi.cmpn/6.0.0/org/osgi/service/component/runtime/ServiceComponentRuntime.html ) to get Component configuration and description DTOs.

But on building the project, I get the exception org.osgi.dto.DTO not found.

I searched for this package in depth finder and was referred to org.apache.felix.framework.xml as the dependency that needs to be added to include this class. But if I search through this bundle it contains no inclusion of this class and no info on it in Manifest.MF either. It's a fragment bundle and is dependent on the system bundle (org.apache.felix..) but the parent bundle has no inclusion of this class either.

Does anyone have any idea of which bundle would actually have this class?

I'm using AEM 6.3. In 6.0, this class is included as part of org.apache.felix.scr package. But not so in case of 6.3.

Thanks for any help in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

My 6.3 depfinder says to use below dependency for org.osgi.service.component.runtime

<dependency>

     <groupId>com.adobe.granite.felix</groupId>

     <artifactId>org.apache.felix.scr</artifactId>

     <version>2.1.0-B001</version>

     <scope>provided</scope>

</dependency>

View solution in original post

3 Replies

Avatar

Community Advisor

Hi Nitik

   Can you explain why exactly are you using this ??

Avatar

Level 3

Hi Veena,

Thanks for the response. We're using this to get an active/inactive state of OSGi components programmatically.

Previously we could use ScrService and Component classes available in Felix.scr package in 6.0. But in newer versions, these packages are not available and we have to use ServiceComponentRuntime class instead.

Avatar

Correct answer by
Community Advisor

My 6.3 depfinder says to use below dependency for org.osgi.service.component.runtime

<dependency>

     <groupId>com.adobe.granite.felix</groupId>

     <artifactId>org.apache.felix.scr</artifactId>

     <version>2.1.0-B001</version>

     <scope>provided</scope>

</dependency>