I have created an interface and then its Implementation.
When I run mvn clean install -e -X > installerrors.txt my text file has the following error
[ERROR] C:\Users\clive\git\Shoprite.Holdings.StoreLocator\Shoprite.Holdings.StoreLocator\bundle\src\main\java\shoprite\holdings\impl\StoreLocatorImpl.java [1:1]: @Component : Class must have public default constructor: shoprite.holdings.impl.StoreLocatorImpl
[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-descriptor) on project Shoprite.Holdings.StoreLocator-bundle: SCR Descriptor parsing had failures (see log) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-descriptor) on project Shoprite.Holdings.StoreLocator-bundle: SCR Descriptor parsing had failures
public interface IStoreLocator {
public ArrayList<Stores> getStores() throws Exception;
public ArrayList<FacilityTypes> getFacilityTypes() throws Exception;
}
@Service
@Component
public class StoreLocatorImpl implements IStoreLocator {
private ArrayList<Stores> storesArrayList = new ArrayList<Stores>();
private ArrayList<FacilityTypes> facilityTypesArrayList = new ArrayList<FacilityTypes>();
private String urlAddress = "";
public StoreLocatorImpl(String s) {
urlAddress = s;
}
Solved! Go to Solution.
Views
Replies
Total Likes
Hope you have defined both the method that has been declared in IStoreLocator interface.
Also, try giving service name property for @Service
Views
Replies
Total Likes
Hope you have defined both the method that has been declared in IStoreLocator interface.
Also, try giving service name property for @Service
Views
Replies
Total Likes
Thank you. I have done as you suggested and it resolved my error.
Views
Replies
Total Likes