wood burning stoves 2.0*
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
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
 
Don't get me started about those stupid light bulbs.
 
subject: Apache hivemind problem : There is no service point for interface.
 
Similar Threads
How to pass a two dimensional Object Array To a Stored Procedure
Spring AOP with mvc
JNDI not creating for EJB Local interfaces example
login issues with AOL program
Problem in JUnit