Getting an exception org.osgi.dto.DTO not found. | Community
Skip to main content
Nitiks25
Level 2
March 21, 2018
Solved

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

  • March 21, 2018
  • 3 replies
  • 2372 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VeenaVikraman

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>

3 replies

VeenaVikraman
Community Advisor
Community Advisor
March 21, 2018

Hi Nitik

   Can you explain why exactly are you using this ??

Nitiks25
Nitiks25Author
Level 2
March 21, 2018

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.

VeenaVikraman
Community Advisor
VeenaVikramanCommunity AdvisorAccepted solution
Community Advisor
March 21, 2018

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>