This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Apache hivemind problem : There is no service point for interface. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache hivemind problem : There is no service point for interface. " Watch "Apache hivemind problem : There is no service point for interface. " New topic
Author

Apache hivemind problem : There is no service point for interface.

Shifali Rana
Greenhorn

Joined: Jul 08, 2010
Posts: 11
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Apache hivemind problem : There is no service point for interface.