We are using AEM 6.1 and Slice 4.2. We have all dependencies added to the pom including the AEM add-on, Activator created, and registered, and everything builds successfully. No errors in logs or Felix console.
We have a TestModel class set up with the SliceResource and JcrProperty annotations for a simple text field and a Sightly component to output it to the page.
When we load the page in the browser the annotated property always returns NULL even though we have verified it exists and is not empty in the CRX. Below are the values in our Activator:
INJECTOR_NAME = "testapp";
In the CRX our app is here "/apps/testapp".
BUNDLE_NAME_FILTER = "testapp-aem-bundle.*";
In the bundle pom.xml we have a Bundle-SymbolicName set as "testapp-aem-bundle". Is this correct or does the name need to come from the content package name (testapp-aem-content-1.0.0-SNAPSHOT.zip)?
BASE_PACKAGE = "com.testapp.aem"
This (java) package contains our Activator and TestModel classes.
First, please verify that all the bundles are active. Then you can verify if the models were correctly "registered" by taking a look at the list of Sling adapters (http://localhost:4502/system/console/adapters). For each class annotated with SliceResource, there should be an adapter registered. In your case you should look for TestModel and check if there is an adapter adapting to org.apache.sling.api.resource.Resource.
org.apache.sling.scripting.sightly.SightlyException: Identifier com.cognifide.demo.slice.demo.core.models.HelloWorldModel cannot be correctly instantiated by the Use API
Caused by: org.apache.sling.scripting.jsp.jasper.JasperException: /apps/slicedemo/components/content/helloworldJsp/helloworldJsp.jsp(2,2) The absolute uri: http://cognifide.com/jsp/slice cannot be resolved in either web.xml or the jar files deployed with this application