hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Cash" <meaneyed...@hotmail.com>
Subject Simple example fails to run, Service point X does not exist
Date Sat, 23 Oct 2004 21:14:02 GMT
I have been desparatly trying to get Hivemind working, but for whatever 
reason, it just won't go. I must be doing something incredibly stupid, since 
I can't find any similar posts on this list from other users. In any case, 
here goes:

I am getting this exception:

org.apache.hivemind.ApplicationRuntimeException: Service point messageMover 
does not exist.
	at 
org.apache.hivemind.impl.RegistryImpl.getServicePoint(RegistryImpl.java:142)
	at org.apache.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:149)
	at hivexample.Main.main(Main.java:17)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Exception in thread "main"

My Main class looks like this:

public class Main {
    public static void main(String[] args) throws Exception {
        System.err.println("Path: " + new File(".").getAbsolutePath());
        Registry registry = RegistryBuilder.constructDefaultRegistry();
        IMessageMover mover = (IMessageMover) 
registry.getService("messageMover", IMessageMover.class);

        mover.go();
    }
}

And my hivemodule.xml looks like this:

<?xml version="1.0"?>
<module id="hivexample" version="1.0.0">

  <service-point id="messageSource" interface="hivexample.IMessageSource">
    <create-instance class="hivexample.impl.ConsoleSource"/>
  </service-point>

  <service-point id="messageWriter" interface="hivexample.IMessageWriter">
    <create-instance class="hivexample.impl.ConsoleWriter"/>
  </service-point>

  <service-point id="messageSource" interface="hivexample.IMessageSource">
    <create-instance class="hivexample.impl.ConsoleSource"/>
  </service-point>

  <service-point id="messageMover" interface="hivexample.IMessageMover">
    <create-instance class="hivexample.impl.SimpleMessageMover"/>
  </service-point>

</module>


The structure of the project looks like this:

\src
     \hivexample
                     \Main.java
                     \${all my interfaces}
                     \Impl
                            \${all my implemented interfaces}
\META-INF
              \hivemodule.xml


I am guessing that my code RegistryBuilder.constructDefaultRegistry() isn't 
picking up the config file.

Other Info:
    - Exectuing in IntelliJ 4.5.2
    - Hivemind 1.0
    - JDK 1.4.2 (not that it should matter)
    - Windows XP (again, shouldn't matter)

Any help is appreciated !!!
thanks!
JC.



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message