Hi TaylorBastien,
Whenever your are using external packages(third party or pre-defined api's bundles ) in your osgi bundle class, then there is a need to import those classes into your bundle to make that them visible to the osgi bundle.So when you import com.adobe.cq.sightly.WCMUse class in sightly helper class, sometimes this WCMUse class will not be visible to your bundle,even though it is adobe provided package.So you need to import this package.
Please try to place the below in the maven-bundle-plugin of pom.xml where sightly helper class is defined,
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<!-- <version>2.3.5</version> -->
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
<!-- Let's export our primary package -->
com.test.yourpackage.model,
<!-- By default, don't export any other packages -->
!*
</Export-Package>
<Import-Package>
<!-- JSR 250 && 330 -->
javax.annotation;version=0.0.0.1_007_JavaSE,
javax.inject,
<!-- JEE Servlet -->
javax.servlet,
javax.servlet.http,
<!-- Sling -->
org.apache.sling.api,
org.apache.sling.api.resource,
org.apache.sling.auth.core,
org.apache.sling.jcr.api,
com.adobe.cq.sightly,
!*
</Import-Package>
</instructions>
</configuration>
</plugin>
Exporting the package and importing other api's(like javax.servlet) is optional(Do this only if an exception is throwed for that corresponding package).Try to import com.adobe.cq.sightly package.
Hope this works.
Thanks,
Swati