You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Johnny Cash <me...@hotmail.com> on 2004/10/23 23:14:02 UTC

Simple example fails to run, Service point X does not exist

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


RE: Simple example fails to run, Service point X does not exist

Posted by James Carman <ja...@carmanconsulting.com>.
Try using "hivexample.messageMover" as the id.

-----Original Message-----
From: Johnny Cash [mailto:meaneyedcat@hotmail.com] 
Sent: Saturday, October 23, 2004 5:14 PM
To: hivemind-user@jakarta.apache.org
Subject: Simple example fails to run, Service point X does not exist

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



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