Getting cannot find the class file for org.osgi.framework.ServiceReference build error | Community
Skip to main content
GK-007
May 10, 2016
Solved

Getting cannot find the class file for org.osgi.framework.ServiceReference build error

  • May 10, 2016
  • 1 reply
  • 979 views

We are trying to deploy our code onto AEM 6.2 version and added dependency for below classes but still getting compilation errors.

org.osgi.framework.Constants;
org.osgi.framework.ServiceReference
;

Parent pom:

<dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.fragment.ws</artifactId>
                <version>1.0.2</version>
                <scope>provided</scope>
  </dependency>

Core pom:

<dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.fragment.ws</artifactId>
 </dependency>

Any idea on usage of this dependency??

attached error screenshot 

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 joerghoh

Hi,

during runtime these bundles are provided by the system bundle, but during compile time they are not available by default. Can you try with a scope of "compile"? What kind of project archetype have you used?

kind regards,
Jörg

1 reply

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
May 10, 2016

Hi,

during runtime these bundles are provided by the system bundle, but during compile time they are not available by default. Can you try with a scope of "compile"? What kind of project archetype have you used?

kind regards,
Jörg