Home Help Center

stramge error when adding [["java:package:com.ractoc"]]

ractocractoc Member Mark SchrijverOrganization: PersonalProject: distributed Plugin framework
Hello,

I have a working slice file:
module com {
	module ractoc {
		module test {
			enum FUNCTION { COMBAT, MOVEMENT, MARKET };
			
			class FunctionMessage {
				FUNCTION funct;
			};
			
			class SectorMessage extends FunctionMessage {
				int sectorId;
			};
			
			class MovementMessage extends SectorMessage {
				int speed;
			};
			
			interface MessageTest {
				void sendMessage(FunctionMessage msg);
			};
		};
	};
};

This slice file works like a charm, and my client send the message, which is received by the server as intended.

Hoever, I don't like all those nested modules just to setup my java package. After digging around the docs a bit, I discovered
[["java:package:com.ractoc"]]

And decided to change my slice to the following:
[["java:package:com.ractoc"]]
module test {
	enum FUNCTION { COMBAT, MOVEMENT, MARKET };
	
	class FunctionMessage {
		FUNCTION funct;
	};
	
	class SectorMessage extends FunctionMessage {
		int sectorId;
	};
	
	class MovementMessage extends SectorMessage {
		int speed;
	};
	
	interface MessageTest {
		void sendMessage(FunctionMessage msg);
	};
};

However, now I'm getting the following error:
!! 12/19/11 10:57:17:069 CounterTestClient: error: main: Ice.UnknownLocalException
       unknown = "Ice::NoObjectFactoryException
                  Ice.NoObjectFactoryException
                      reason = ""
                      type = "::test::MovementMessage"
                  	at IceInternal.BasicStream.readObject(BasicStream.java:1440)
                  	at IceInternal.BasicStream.readPendingObjects(BasicStream.java:1665)
                  	at com.ractoc.test._MessageTestDisp.___sendMessage(_MessageTestDisp.java:94)
                  	at com.ractoc.test._MessageTestDisp.__dispatch(_MessageTestDisp.java:138)
                  	at IceInternal.Incoming.invoke(Incoming.java:159)
                  	at Ice.ConnectionI.invokeAll(ConnectionI.java:2357)
                  	at Ice.ConnectionI.dispatch(ConnectionI.java:1208)
                  	at Ice.ConnectionI.message(ConnectionI.java:1163)
                  	at IceInternal.ThreadPool.run(ThreadPool.java:302)
                  	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
                  	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
                  	at java.lang.Thread.run(Thread.java:679)
                  "
   	at IceInternal.Outgoing.invoke(Outgoing.java:147)
   	at com.ractoc.test._MessageTestDelM.sendMessage(_MessageTestDelM.java:42)
   	at com.ractoc.test.MessageTestPrxHelper.sendMessage(MessageTestPrxHelper.java:52)
   	at com.ractoc.test.MessageTestPrxHelper.sendMessage(MessageTestPrxHelper.java:28)
   	at com.ractoc.test.CounterTestClient.run(CounterTestClient.java:41)
   	at Ice.Application.doMain(Application.java:202)
   	at Ice.Application.main(Application.java:182)
   	at Ice.Application.main(Application.java:71)
   	at com.ractoc.test.CounterTestClient.main(CounterTestClient.java:47)

Does anyone have any idea what could be causing this and if I need to change other things besides just adding that meta-tag?

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Please see this FAQ.

    Regards,
    Mark
  • ractocractoc Member Mark SchrijverOrganization: PersonalProject: distributed Plugin framework
    Great, thanks. Adding the following line to the top of my server run method fixed it:
    communicator().getProperties().setProperty("Ice.Default.Package", "com.ractoc");
    
Sign In or Register to comment.