Unable to compile jsp importing bundle
Hi,
This is my first time working on Adobe AEM. I have followed some tutorials and created the osgi bundle which exposes a Service Component. The bundle installs and deploys without any errors, but when I test it out in one of the existing geometrix sites by importing the class and package. I am getting jsp compilation errors. Anything I am missing here.
Here is my code
package com.fca.service;
import org.apache.felix.scr.annotations.Service;
import org.apache.felix.scr.annotations.Component;
@Component
@Service
public class FCAServiceImpl implements FCAService {
@Override
public String sayHello(String val){
return "FCA Service says: " +val ;
}
}
serviceComponents.xml
<?xml version="1.0" encoding="UTF-8"?><components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<scr:component enabled="true" immediate="true" name="com.fca.service.FCAServiceImpl">
<implementation class="com.fca.service.FCAServiceImpl"/>
<service servicefactory="false">
<provide interface="com.fca.service.FCAService"/>
</service>
<property name="service.pid" value="com.fca.service.FCAServiceImpl"/>
</scr:component>
</components>
MANIFEST file
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: fcaservice
Bundle-SymbolicName: fcaservice
Bundle-Version: 1.0.0.SNAPSHOT
Bundle-Activator: com.fca.service.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.adobe.cq;uses:="org.slf4j,org.osgi.framework,org.osg
i.service.component";version="1.0.0.SNAPSHOT"
Import-Package: org.osgi.framework;version="[1.5,2)",org.osgi.service.co
mponent;version="[1.1,2)",org.slf4j;version="[1.5,2)"
Service-Component: OSGI-INF/serviceComponents.xml
my jsp code
<%@page session="false"%><%--
ADOBE CONFIDENTIAL
__________________
Copyright 2011 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: All information contained herein is, and remains
the property of Adobe Systems Incorporated and its suppliers,
if any. The intellectual and technical concepts contained
herein are proprietary to Adobe Systems Incorporated and its
suppliers and are protected by trade secret or copyright law.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from Adobe Systems Incorporated.
--%><%
%><%@include file="/libs/foundation/global.jsp" %><%
%>
<sling:defineObjects />
<%@page import="java.util.Collections,
java.util.Comparator,
java.util.Iterator,
java.util.List,
java.util.LinkedList,
org.apache.sling.api.resource.ResourceResolver,
org.apache.sling.api.resource.ResourceUtil,
com.day.cq.wcm.webservicesupport.ConfigurationManager,
com.day.cq.wcm.webservicesupport.ServiceConstants,
com.day.cq.wcm.webservicesupport.Service,
com.day.cq.wcm.webservicesupport.ServiceLibFinder,
com.fca.service.*"
%>
<%
com.fca.service.FCAService fca = sling.getService(com.fca.service.FCAService.class);
fca.sayHello("FCA");
ServiceLibFinder slf = sling.getService(ServiceLibFinder.class);
List<String> componentReferences = slf.getComponentReferences(pageProperties.getInherited("cq:cloudserviceconfigs", new String[] {}));
for ( String componentReference : componentReferences ) {
%><cq:include path="cloudservice" resourceType="<%= componentReference %>"/><%
}%>