• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic