hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor A. Deruga" <>
Subject Problem with JUnit
Date Sun, 14 Nov 2004 08:28:54 GMT
Hi, All!

I had a working program and I've tried to add some junit tests to it (some 
bugs were still there). This is what I have in my build.xml (I'm using 
Eclipse IDE + ant build file):
	<target name="test" description="Launch JUnit tests" depends="jar">
		<junit printsummary="on">
			<classpath refid="test.class.path"/>
			<formatter type="plain"/>
			<test name="src.server.test.impl.IMServerImplTest" />
//---------------------------------------End of Target----------------------

Here's a part of my hivemodule.xml:

	<service-point id="IMServer" interface="src.server.api.IMServer">
    	<invoke-factory model="singleton">
    	  <construct class="src.server.impl.IMServerImpl"/>
    	<interceptor service-id="hivemind.LoggingInterceptor"/>
//---------------------------------------End of Config----------------------

Here's my IMServer interface description:

public interface IMServer extends GWService{
//---------------------------------------End of Code----------------------

And HERE's what it says when I try to run all this stuff:

//---------------------------Error messages-----------------------------------
HiveMind service point is not instantiated: 
org.apache.hivemind.ApplicationRuntimeException: Service 
src.server.api.IMServer does not implement the requested interface 
(src.server.api.IMServer).  The declared service interface type is 
//-----------------------End of error messages------------------------------

But it does implement src.server.api.IMServer!!! Here's the declaration of 
IMServerImpl class:

public class IMServerImpl implements IMServer, ConnectionHandlerFactory, 
GWService {
//---------------------------------------End of Code----------------------

I don't believe that the error is in code. I have a "run" target that starts 
this server and it works fine. Any Ideas on what's this all about? I'm 
working on it for a second day and it's still at the same point :(

One more thing ;)
The testing code (maybe, the error is in this part?):

		try {
			Registry r = RegistryBuilder.constructDefaultRegistry();
			IMServer server = (IMServer)r.getService(IMServer.class);
		} catch(Exception e){
			System.out.println("Exception: " + e.getMessage());
//---------------------------------------End of Code----------------------


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message