I am creating a simple add service using apache hivemind.
Whenever I am trying to call the add service it is giving the following exception
org.apache.hivemind.ApplicationRuntimeException: There is no service point for interface com.example.Adder.
Below are the classes that are used to create the add service
---------------------------------------------------
package com.example;
public interface Adder
{
public int add(int arg1, int arg2);
}
---------------------------------------------------
package com.example.impl;
import com.example.Adder;
public class AdderImpl implements Adder
{
public int add(int arg1, int arg2)
{
return arg1 + arg2;
}
}
---------------------------------------------------
package com.example;
import java.util.Locale;
import org.apache.hivemind.ClassResolver;
import org.apache.hivemind.Registry;
import org.apache.hivemind.impl.DefaultClassResolver;
import org.apache.hivemind.impl.RegistryBuilder;
public class Main {
public static void main(
String[] args) {
try
{
Registry registry = RegistryBuilder.constructDefaultRegistry();
Adder service = (Adder) registry.getService(Adder.class);
int sum = service.add(4, 7);
System.out.println("Result: " + sum);
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
}
---------------------------------------------------
Below is the hivemodule.xml in the META-INF
<?xml version="1.0" encoding="UTF-8"?>
<module id="com.example.Adder" version="1.0.0">
<service-point id="Adder" interface="Adder">
<create-instance class="com.example.impl.AdderImpl"/>
</service-point>
</module>
---------------------------------------------------
Please give some hint where it is going wrong.
Thanks